Using DHCP with specifc hostname

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using DHCP with specifc hostname

1,323件の閲覧回数
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,268件の閲覧回数
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 件の賞賛