2.7 DHCP and Easy IP
2.7.2 DHCP operation
The DHCP client configuration process is shown in the figure. This process follows these steps:
  1. The client sends a DHCPDISCOVER broadcast to all nodes. Then a client set up for DHCP needs an IP configuration (typically at boot time), it tries to locate a DHCP server by sending a broadcast called a DHCPDISCOVER.
  2. The server sends a DHCPOFFER unicast to client. When the server receives the broadcast, it determines whether it can service the request from its own database. If it cannot, the server may forward the request on to another DHCP server or servers, depending on its configuration. If it can, the DHCP server offers the client IP configuration information in the form of a unicast DHCPOFFER. The DHCPOFFER is a proposed configuration that may include IP address, DNS server address, and lease time.
  3. The client sends a DHCPREQUEST broadcast to all nodes. If the client finds the offer agreeable, it will send another broadcast, a DHCPREQUEST, specifically requesting those particular IP parameters. Why does the client broadcast the request instead of unicasting it to the server? A broadcast is used because the very first message, the DHCPDISCOVER, may have reached more than one DHCP server (after all, it was a broadcast). If more than one server makes an offer, the broadcasted DHCPREQUEST lets everyone know which offer was accepted (it is usually the first offer received).
  4. The server sends a DHCPACK unicast to client. The server that receives the DHCPREQUEST makes the configuration official by sending a unicast acknowledgment, the DHCPACK. Note that it is possible but highly unlikely that the server will not send the DHCPACK because it may have leased that information to another client in the interim. Receipt of the DHCPACK message enables the client to begin using the assigned address immediately.

Depending on an organization's policies, it may be possible for an end user or an administrator to statically assign a host an IP address that belongs in the DHCP server's address pool. Just in case, the Cisco IOS DHCP server always checks to make sure that an address is not in use before the server offers it to a client. The server issues ICMP echo requests (ping) to a pool address before sending the DHCPOFFER to a client. Although configurable, the default number of pings used to check for potential IP address conflict is two (the more pings, the longer the configuration process takes).