DHCP

DHCP stands for Dynamic Host Control Protocol.

Static IP addresses are useful during application development, but they are impractical for product deployment because:

DHCP provides an alternative to static IP address assignment. DHCP servers exist on local networks to dynamically allocate IP addresses to nodes on the same network. When a network enabled product boots up it contacts the DHCP server to request its IP address, removing the need for each node to be statically configured.

If ipconfigUSE_DHCP is set to 1 in FreeRTOSIPConfig.h then FreeRTOS+TCP will attempt to obtain its IP address from a DHCP server, and only revert to using a static IP address (AutoIP is also on the roadmap) if a DHCP server cannot be contacted.

The device running FreeRTOS+TCP can register its hostname with the DHCP server. See the ipconfigDHCP_REGISTER_HOSTNAME configuration constant for more information.

Expert users can influence the DHCP process using an application DHCP hook (or 'callback') function.