DHCP simplifies IP addressing and reduces administrative overhead by assigning IP addresses automatically from its scope, or pool, of addresses. In this article, we’ll examine how DHCP works, look at its impact on network traffic, and provide a checklist of considerations when implementing DHCP.
What is DHCP?
DHCP (Dynamic Host Configuration Protocol) is a service that automatically supplies TCP/IP addresses and configuration parameters to workstations on the network. DHCP reduces the overall administrative load by eliminating the need for the administrator to enter TCP/IP configuration information on each workstation.
The DHCP service needs very little processing power, so it doesn’t require a dedicated computer. The service can be installed on domain controllers without much impact.
The DHCP server must have a manually configured static IP address, subnet mask, and default gateway. The server is configured with “scopes,” or ranges of IP addresses to distribute, along with additional configuration parameters. For instance, a scope might be set up for a range of IP addresses, and it might also include a default gateway, DNS server, NetBIOS name server, WINS server, and so forth.
Understanding your DHCP scope
When configuring DHCP, it’s critical for the administrator to ensure that IP address spools are allocated correctly. If two DHCP servers have overlapping scopes or pools of IP addresses, an address could be assigned to more than one machine.
Prior to Windows NT Server 4.0 Service Pack 2, DHCP server could not detect IP addresses already in use by non-DHCP clients. If a host were manually configured for a specific IP address, and this address fell within the scope of a DHCP server, the DHCP server might lease the address to a DHCP client, thus creating a duplicate IP address on the network. However, this problem has been addressed in Service Packs 2 and later.
Each DHCP server must have a unique static address. In addition, any other IP-configured devices that cannot participate in the DHCP service—including routers, domain controllers, and IP printers—require a unique static address.
Finally, scopes configured on DHCP servers must exclude all manually configured IP addresses. A WINS server, DNS server, DHCP server, or any other computer whose IP address is specified in another host’s TCP/IP configuration should not be assigned IP addresses from DHCP scopes. Microsoft recommends using static IP addresses on servers and reserving the address in a DHCP scope.
The administrator should partition a scope across two DHCP servers using a 70 percent/30 percent ratio. Of the addresses available for lease, 70 percent will reside on one server and 30 percent on the other.
Before adding the DHCP service to any currently deployed server, the administrator should establish a performance baseline for the server because the addition of DHCP may prove too burdensome for the machine. The network administrator may need to add processor, memory, or disk resources before the server can adequately support the added DHCP service.
Your company should keep the following points and procedures in mind when designing a DHCP implementation:
- One online DHCP server and one backup DHCP server can generally support 10,000 clients. However, when deciding how many DHCP servers your network will need, consider the location of routers on the network and whether you want a DHCP server in each subnet.
- To determine where to install the DHCP servers, consider the physical characteristics of your LAN or WAN infrastructure rather than the logical groupings of the Windows NT domain concepts. Note that you can administer DHCP servers remotely from a DHCP- or WINS-enabled computer running Windows NT Server.
- Identify router interfaces that have multiple subnets defined. For more information, see the Microsoft Knowledge Base article “Using DHCP ‘Superscopes’ to Serve Multiple Logical Subnets.”
- Isolate the areas of the network where processes must continue uninterrupted and then target these areas for the last stages of implementation.
- Review the network structure—both physical and geographic—to determine the best plan for defining logical subnets as segments of the intranet.
- Develop a phased plan for testing and adding components to the new system.
- Create a pilot project for testing.
- Create a second test phase to test the DHCP server/client configuration for efficiency. Determine strategies for implementing backup servers and for partitioning the address pool each server will provide for local vs. remote clients.
In formulating a plan, the company should document all architecture and administration issues for network administrators and also collect the following information:
- The number and type of client systems that will require support.
- The required degree of interoperability with existing systems.
- A list of hardware items that will require support, noting any related software/hardware compatibility that may be required.
- Tools that will aid in network analysis and design, such as network monitoring software and simple network management protocol (SNMP).
DHCP provides a simpler IP address management capability for network administrators and ultimately for network users. Keep in mind that Microsoft DHCP is easiest to establish during new implementations. Existing network clients with static IP addresses must be updated before they can accept dynamically assigned IP addresses. To do so, network admins must either manually convert every network client—a process that requires a visit to each one—or use a tool that can modify the client with little or no user intervention.
DHCP IP address lease conversation
When a DHCP client initializes TCP/IP for the first time, it must acquire an IP address using DHCP. This process results in a four-part conversation between the DHCP client and server. The process proceeds as follows:
- The client computer detects no indication of the location of any DHCP server, so it broadcasts a DCHP Discover packet in an attempt to locate a DHCP server.
- Once a DHCP server receives the DHCP Discover packet and determines that it can accommodate the client’s request, it responds with a DHCP Offer message.
- When the client receives the DHCP Offer message, it broadcasts a DHCP Request frame to inform all DHCP servers that it has selected an address from a specific server.
- The DHCP server receives the DHCP Request packet and responds with a DHCP ACK message. The IP address, which is set to the proposed address for the client, is configured.
Whenever a DHCP client reboots, or at periodic intervals, the client must renew its IP address with its DHCP server. This renewal requires a simple two-part conversation consisting only of a DHCP Request packet and, if successful, a DHCPACK packet. This conversation is directed, not broadcast, because the client and server already know about each other. If any new DHCP options have been configured since the client acquired the IP address lease, the client receives them during the renewal process.
DHCP traffic summary
The entire process of acquiring an IP address lease through DHCP requires a total of four packets, varying between 342 and 590 bytes. This process typically takes around 300 milliseconds.
DHCP conversations generally occur in the following instances:
- When a DHCP client initializes for the first time
- Whenever a client restarts
- When the lease is half up
- When a client moves to a new subnet
- When a DHCP client replaces its network adapter card
- Whenever a client manually refreshes or releases its address with IPCONFIG or WINIPCFG
Reducing DHCP network traffic
DHCP doesn’t normally have much impact on network traffic. If you want to reduce the amount of traffic DHCP generates, you can either adjust the lease duration for IP addresses or change the DHCP threshold.
The default lease duration is three days; when the lease is half up, the client will initiate a renewal. A lease renewal involves only two packets, with a maximum total size of 932 bytes. To reduce the amount of network traffic, you can use DHCP Manager to increase the lease duration for IP addresses. Increased lease life will reduce the frequency of renewals on the network.
When the number of clients that use DHCP to acquire IP addresses is close to the number of IP addresses DHCP can assign—in other words, when IP addresses are relatively scarce—you should use short lease lives. Doing so allows servers to reclaim and redistribute IP addresses no longer in use.
However, if the number of DHCP-available IP addresses is much larger than the number of DHCP hosts, longer lease periods make more sense. Regardless of lease length, administrators should periodically review the lease renewal interval to determine whether they should increase the duration to reduce traffic or decrease it to keep the pool of IP addresses current.
The other option for reducing traffic is to change the DHCP threshold. This involves configuring the number of retries that must occur before a router forwards a local DHCP Discover request to other subnets. This is usually configured as the number of seconds to wait before forwarding the DHCP Discover request.
When a local DHCP server is busy, it may be unable to respond to a request immediately. By reconfiguring the DHCP threshold parameter, you can ensure that the server will allow at least two requests from the client to stay on the local subnet. The third request will be forwarded to other subnets to find an available DHCP server.
If you'd like to share your opinion, please post a comment below or send the editor an e-mail.