Dynamic Host Configuration Protocol (DHCP) is a TCP/IP network protocol used to automate the configuration of devices connected to an IP network. Without DHCP, network administrators would be required to configure every device on the network by hand. This helps speed the introduction of new devices onto the network and eases the burden of network-wide configuration changes. The management and administration of large-scale networks would not be possible without the helping hand of DHCP.
The assignment of network configuration information via DHCP is essentially a four-stage process.
- Discovery - When the DHCP client is first plugged into the network, it
sends a broadcast packet notifying all DHCP servers on the network of its
presence. Some routers can be configured to forward this broadcast packet to
a pre-defined DHCP server. Cisco routers do this via the
- Offer - When a DHCP server receives a request from a client, it reserves an address in its address pool and offers it to the client.
- Request - Since a client may receive multiple offers from multiple DHCP servers, it must respond back to all DHCP servers with a broadcast packet that requests one of the offered addresses. The DHCP servers know which request is meant for them based on the transaction ID in the DHCPREQUEST packet. If the transaction ID does not match the ID issued by that server, it releases the address it had reserved in its pool.
- Acknowledgement - The DHCP server sends an acknowledgement packet back to the client. This packet includes all the network configuration information including DNS servers, gateway address, and lease time.