Using DHCP with specifc hostname

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using DHCP with specifc hostname

1,322 次查看
martinhug21
Contributor I

Hi

I' m using the MQX "MQX_VERSION (400)", the following functions from RTCS ipccfg.h are used:

- uint_32 ipcfg_init_device(uint_32, _enet_address)

The _enet_address is the mac-address of my device.

- uint_32 ipcfg_bind_dhcp(uint_32, boolean)

 

My goal is the following: 

The device should not use a static IP-Adress, a dynamic address (provided by the DHCP-Server) should be used instead. Additionally, each device should provide a unique hostname. This hostname can be used to access the device in the network.

When my device requests a ip-address from the DHCP-Server, a costum hostname should be sent to the remote DHCP-Server. As an example, the hostname should be: "device-00A8410A18A8", the number represents the MAC-address. The DHCP-Server itself registers the hostname/IP-Address at the DNS-Server.

Does the TCP/IP stack sends a hostname to the DHCP-Server during the initialization procedure?

Is it possible to add custom prefix to the hostname?

Thanks for your support!

Martin

 

标签 (1)
0 项奖励
1 回复

1,267 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Martin:

 

The DHCP Client Option12 feature specifies the hostname of the client.  While acquiring an IP address for an interface from the Dynamic Host Configuration Protocol (DHCP) server, if the client device receives the DHCP Hostname option inside the response, the hostname from that option is set.

Unfortunately MQX does not support this feature , so you need to implement it by yourself.

 

Regards

Daniel

0 项奖励