Planning for DHCP Traffic

DHCP client and server TCP/IP configuration traffic does not use significant network bandwidth during normal periods of usage. However, there are two phases of DHCP client configuration that do generate some network traffic load. These phases are:

IP Address Lease

When a new client initializes TCP/IP for the first time (and is configured as a DHCP client), its first step is to acquire an IP address using DHCP. This process results in a conversation between the DHCP client and server consisting of four packets, the first of which is the client computer broadcasting a Dhcpdiscover packet in an attempt to locate a DHCP server.

DHCP Discover

The Dhcpdiscover frame will be either 342 or 590 bytes total. (Older versions of Windows for Workgroups TCP/IP stack, TCP/IP-32 3.11a, as well as Windows NT 3.5, used 590-byte frames.) The first 14 bytes constitute the Ethernet header portion of the packet. The first distinguishing characteristic is the destination address, which is the Ethernet broadcast address of 255.255.255.255. The client computer has no knowledge of where any DHCP servers reside, and so it initiates a broadcast which is an Ethernet Type 0800 frame (IP).

The next 20 bytes are the IP header portion of the packet. The interesting things to note are the source and destination addresses. The source address is 0.0.0.0; because the client does not yet have a valid IP address, it initializes with an address of 0.0.0.0. The destination address is 255.255.255.255, which is the IP network broadcast address. As with the Ethernet header, the client does not know the location or address of any DHCP servers, and so it initiates an IP broadcast.

DHCP is a UDP-based protocol, and so the next 8 bytes are the UDP header. The UDP source and destination ports are both BOOTP (68 and 67, respectively). DHCP is an extension of the BOOTP protocol, and thus uses its ports for messaging.

The remainder of the frame contains the Dhcpdiscover packet components. The majority of the remaining fields are either zeros or blank, because the client has no knowledge of any IP addresses or parameters. Upon examining the DHCP Option Field section, you will notice the Client Identifier, which is its MAC address, and its Host name. These are added to the frame in the event that a DHCP server may have a reserved address for the client which is identified by its MAC address.

The host will broadcast up to four Dhcpdiscover messages in an attempt to find a DHCP server. If, after four attempts, a server cannot be located, the computer will cease trying, and then attempt to locate a DHCP server every five minutes until it is successful.

DHCP Offer

Once a DHCP server has received the Discover packet, and determined that it can accommodate the client's request, it responds with a Dhcpoffer message. The Dhcpoffer frame is 342 bytes total. The first 14 bytes constitute the Ethernet header portion of the packet. The first distinguishing characteristic is the destination address, which is the Ethernet broadcast address of 255.255.255.255. The server responds to the client with a broadcast which is an Ethernet Type 0800 frame (IP).

The next 20 bytes are the IP header portion of the packet. The interesting things to note are the source and destination addresses. The source address is that of the DHCP server, and the destination address is 255.255.255.255, which is the IP network broadcast address. As with the Ethernet header, the client responds with an IP broadcast.

DHCP is a UDP-based protocol, and so the next 8 bytes are the UDP header. The UDP source and destination ports are both BOOTP (67 and 68, respectively).

The remainder of the frame (300 bytes) contains the Dhcpoffer packet components. The new items configured are Your IP address, which is set to the proposed address for the client, and proposals for the IP address lease time (including renewal periods). The DHCP server's IP address is also listed here.

DHCP Request

The Dhcprequest frame will be either 342 or 590 bytes total, depending on the size of the Dhcpdiscover message. The first 14 bytes constitute the Ethernet header portion of the packet. The first distinguishing characteristic is the destination address, which is the Ethernet broadcast address of 255.255.255.255. The client computer knows the address of the server it is accepting its address from, but responds with a broadcast to let all DHCP servers know that it has selected an address from a specific server. It is an Ethernet Type 0800 frame (IP).

The next 20 bytes are the IP header portion of the packet. The interesting things to note are the source and destination addresses. The source address is 0.0.0.0; because the client does not yet have a valid IP address, it initializes with an address of 0.0.0.0. The destination address is 255.255.255.255, which is the IP network broadcast address. As with the Ethernet header, the client initiates an IP broadcast to let all DHCP servers accept the frame, and learn that it has accepted an offer.

DHCP is a UDP-based protocol, and so the next 8 bytes are the UDP header. The UDP source and destination ports are both BOOTP (68 and 67, respectively).

The remainder of the frame contains the Dhcprequest packet components. The majority of the remaining fields are either zeros or blank, because the client has no knowledge of any IP addresses or parameters. Upon examining the DHCP Option Field section, you will notice the Requested address, which is the IP address the client is requesting, and a Server Identifier (IP address of the server the request is being made of). These are added to the frame so that other DHCP servers are notified that the client has accepted an offer from a specific server, and they can offer the address they offered to this client to another DHCP client.

DHCP ACK

Once a DHCP server has received the Request packet, it responds with a Dhcpack message. The Dhcpack frame is 342 bytes total. The first 14 bytes constitute the Ethernet header portion of the packet. The first distinguishing characteristic is the destination address, which is the Ethernet broadcast address of 255.255.255.255. The server responds to the client with a broadcast. It is an Ethernet Type 0800 frame (IP).

The next 20 bytes are the IP header portion of the packet. The interesting things to note are the source and destination addresses. The source address is that of the DHCP server, and the destination address is 255.255.255.255, which is the IP network broadcast address. As with the Ethernet header, the client responds with an IP broadcast.

DHCP is a UDP-based protocol, and so the next 8 bytes are the UDP header. The UDP source and destination ports are both BOOTP (67 and 68, respectively).

The remainder of the frame contains the Dhcpack packet components. Your IP address, which is set to the proposed address for the client, is still configured, and parameters, such as IP Lease Time, and renewal and rebinding times, as well as other DHCP options, such as Router, NetBIOS Name Server address, NetBIOS Node Type, and so on, are listed in the Option Field portion of the frame. This portion will be variable, depending on the options requested from the client and those returned by the server.

IP Address Renewal

Whenever a DHCP client starts, it must renew its IP address with its DHCP server. When renewing an IP address using DHCP, the conversation is a simple one consisting of the last two packets of the IP address lease phase. The client computer will request a renewal of its current IP address with a Dhcprequest packet and, if successful, the DHCP server responds with a Dhcpack packet.

The only difference between the Dhcprequest and Dhcpack packets for a renewal and those of the acquisition is that the conversation is directed, and not broadcast, because the client and server already know about each other. Additionally, any new DHCP options, such as Domain Name Server address, that have been configured since the client acquired the IP address lease, are now sent to the client computer.

DHCP clients also renew their IP address lease at one-half of the TTL, which is a configurable length. At this time, the client issues a Dhcprequest packet to its DHCP server, and the server will respond with a Dhcpack, if the address is still valid for the client.

The DHCP client will retry its renewal attempt one time. If unsuccessful, it will try again at the next renewal period.

Summary of DHCP Traffic

To recap, the entire process of acquiring an IP address lease through DHCP takes a total of four packets, varying between 342 and 590 bytes in size. This process, on a clean network (no other network traffic using bandwidth), takes less than 1 second (about 300 milliseconds).

DHCP conversations generally occur in the following instances:

This process should not have a significant effect on network traffic, even if multiple DHCP clients are acquiring or renewing addresses simultaneously.

Planning Guideline for DHCP Traffic

DHCP does not normally have a big impact on network traffic. If you wish to reduce the amount of traffic generated by DHCP, it is possible to adjust the lease duration for IP address leases. This is done using DHCP Manager, and adjusting Lease Duration in the Scope Properties dialog box.

As noted earlier, the default lease duration is three days, which would cause each client to attempt to renew their lease every 18 hours from the time the client acquired the address. A lease renewal is only two packets, with a maximum totoal size of 932 bytes.