Windows 7 / Networking

DHCP communications

To design a DHCP strategy for an enterprise network and deploy it properly requires an understanding of the communications that occur between DHCP clients and servers. In Windows computers, the DHCP client is enabled by default, although it is not mentioned by name in the interface. The Obtain An IP Address Automatically option in the Internet Protocol Version 4 (TCP/IPv4) Properties sheet and the Obtain An IPv6 Address Automatically option in the Internet Protocol Version 6 (TCP/IPv6) Properties sheet control the activation of the client for IPv4 and IPv6, respectively.

DHCP LEASE NEGOTIATION

DHCP communication is always initiated by the client and proceeds as follows:

  1. When a computer boots for the first time with the DHCP client active, the client generates a series of DHCPDISCOVER messages to solicit an IP address assignment from a DHCP server and broadcasts them on the local network.
  2. All DHCP servers receiving the DHCPDISCOVER broadcast messages generate DHCPOFFER messages containing an IP address and other TCP/IP configuration parameters, and transmit them to the client.
  3. After a specified period, the client stops broadcasting and signals its acceptance of one of the offered addresses by generating a DHCPREQUEST message containing the address of the server from which it is accepting the offer, and broadcasting it on the local network.
  4. When the server offering the accepted IP address receives the DHCPREQUEST message, it adds the offered IP address and other settings to its database.
  5. The server then transmits a DHCPACK message to the client, acknowledging the completion of the process. If the server cannot complete the assignment, it transmits a DHCPNAK message to the client and the whole process begins again.
  6. As a final test, the client transmits the offered IP address in a broadcast using the Address Resolution Protocol (ARP), to ensure that no other system on the network is using the same address. If the client receives no response to the ARP broadcast, the DHCP transaction is completed. If another system does respond to the ARP message, the client discards the IP address and transmits a DHCPDECLINE message to the server, nullifying the transaction. The client then restarts the entire process.

DHCP LEASE RENEWAL

By default, the DHCP Server service in Windows Server 2012 uses dynamic allocation, leasing IP addresses to clients for eight-day periods. At periodic intervals during the course of the lease, the client attempts to contact the server to renew the lease, using the following procedure:

  1. When the DHCP client reaches the 50 percent point of the lease's duration (called the renewal time value), the client begins generating DHCPREQUEST messages and transmitting them to the DHCP server holding the lease as unicasts.
  2. If the server does not respond by the time the client reaches the 87.5 percent point of the lease's duration, the client begins transmitting its DHCPREQUEST messages as broadcasts in an attempt to solicit an IP address assignment from any DHCP server on the network.
  3. If the server receives the DHCPREQUEST message from the client, it responds with either a DHCPACK message, approving the lease renewal request, or a DHCPNAK message, which terminates the lease. If the client receives no responses to its DHCPREQUEST messages by the time the lease expires, or if it receives a DHCPNAK message, the client releases its IP address. All TCP/IP communication then ceases, except for the transmission of DHCPDISCOVER broadcasts.
[Previous] [Contents] [Next]