Using DHCP with specifc hostname

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using DHCP with specifc hostname

Contributor I


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!



Labels (1)
0 Kudos
1 Reply

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.




0 Kudos