DHCP enables a client to dynamically obtain a valid IP address from a server.
The Dynamic Host Configuration Protocol (DHCP) dynamically assigns IP addresses to hosts and centrally manages host configurations. DHCP uses the client/server model. A client applies to the server for configuration parameters, such as an IP address, subnet mask, and default gateway address; the server replies with the requested configuration parameters.
A DHCP client exchanges messages with a DHCP server to obtain an IP address and other configuration parameters. A device interface can function as a DHCP client to dynamically obtain configuration parameters from a DHCP server. This facilitates configuration and centralized management.
A DHCP relay agent forwards DHCP messages exchanged between a DHCP client and a DHCP server that are located on different network segments, allowing them to complete their address configuration. The use of a DHCP relay agent eliminates the need for deploying a DHCP server on each network segment. This reduces network deployment costs and facilitates device management.
DHCP relay agents are not mandatory in the DHCP architecture. A DHCP relay agent is required only when the server and client are located on different network segments.
To protect a DHCP server against network attacks, such as man-in-the-middle attacks, starvation attacks, and DoS attacks by changing the CHADDR value, configure DHCP snooping on the intermediate device directly connecting to a DHCP client to provide DHCP security services.