Configure DHCP Failover for Windows Server
The role of the DHCP (Dynamic Host Configuration Protocol) server is simple but essential. DHCP provides IP address configuration to workstations, laptops, phones, and tablets connected to an organization’s network. It can even provide IP address settings for certain virtual machines, servers, and network printers.
Here are examples of IP address settings:
- IP address and corresponding subnet mask;
- default gateway, such as a router; and
- Name resolution server IP addresses, such as DNS.
Many other configurations are possible, but these are the standard options.
The parameters provided by DHCP are essential. The router address allows clients to communicate outside their local network. Name resolution converts easy-to-remember host names to hard-to-remember IP addresses, making it easier to share files, browse the web, communicate via email, and access almost any other network service .
Initially, if the DHCP server goes down, clients with existing leases retain their addresses. By default, Windows leases are not renewed for eight days after the initial lease. This should give network administrators enough time to repair the DHCP server. However, new customers will not be able to rent addresses.
DHCP is essential, so how can network administrators better protect it from failure?
The Importance of DHCP Failover
DHCP services are critical enough to warrant fault tolerance. Prior to Windows Server 2012, such fault tolerance was relatively cumbersome to implement and maintain. However, newer versions of Windows Server include an easy way to manage DHCP redundancy.
These settings are not only for fault tolerance, but can also provide load balancing for large networks where DHCP servers support many transient clients across multiple subnets. For some administrators, the ability to load balance DHCP services can be just as critical as high availability.
Define redundancy requirements
For larger DHCP implementations involving many clients, scopes, subnets, and servers, be sure to develop a plan. Know which scopes benefit from DHCP failover; it may not be necessary to configure this function for each of them. For example, lab and classroom scopes may not need this option.
DHCP failover requirements
The requirements for Windows-based DHCP failover are no different from a standard Windows DHCP deployment. The DHCP server role must be installed on both servers and a corporate administrator must authorize the servers in Active Directory (AD).
To begin the process, create a new scope or choose an existing one. If you are creating a new scope, walk through the configuration wizard to set the values for the scope name, IP address range, subnet mask, default gateway name resolution, and the term of the lease.
After the initial scope is created, you can configure failover or load balancing options.
Note that one or both DHCP servers can be virtual machines. They just need membership in the appropriate network.
Steps to Configure DHCP Failover
First, select a Windows Server system as the second DHCP server. Install the DHCP server role on this device.
Then go back to the original DHCP server, right click on the scope you want to configure for failover and select Configure Failover. The wizard guides you through the remaining settings. The DHCP service must also be running on both systems.
Here are the detailed steps.
Step 1. Select Configure Failover
Right-click on the selected DHCP scope and select Configure Failover from the context menu.
Step 2. Specify Partner Server
In the Specify the partner server to use for failover zone, enter the server name or use the Add a server button to access it in AD.
The wizard validates the configuration of the partner server.
Step 3. Create a new failover relationship
Fill in the following values to set up a failover partnership (I’ve defined some sample values):
Relationship Name: DHCP-Server01-Server02
Mode: Hot standby
Enable Message Authentication: Check the box
Shared secret: abc123
For the Configuring Hot Standby mode, fill in the following values:
Mode: Hot standby
Hot Standby Configuration
Role of Partner Server: Standby
Addresses reserved for standby server: 10%
Step 4. Select Finish to complete setup
The wizard displays a summary of the settings. To select To finish to complete the setup.
Switch to the second DHCP server. In the DHCP console, note that the scope has been replicated.
Configuring DHCP Load Balancing
The load balancing settings are almost the same. When configuring a load balancing mode, instead of Hot Pose in the Fashion drop-down menu, select Load balance. Next, configure the following settings:
Mode for Load balance:
Load Balance Percentage
Local Server: 50%
Partner Server: 50%
Other settings remain the same as in failover mode. Set the appropriate load balancing ratio. In the example, I have defined 50% of the addresses for each server.
Manage DHCP Failover
Remember that DHCP logs information in Event Viewer. It also generates text logs on C:WindowsSystem32DHCP. These detailed logs show lease generation attempts and provide valuable information about DHCP functionality. Be sure to check these logs if you suspect DHCP-related issues.
The DHCP console displays the current lease information in the Address Leases node. If you configured your DHCP servers in load balancing mode, use this node to see which server provided IP configurations to different clients.
Test the configuration
Testing is a key part of disaster recovery planning, and DHCP failover is no different. Consider disabling one of your DHCP servers to ensure that client devices can still lease IP address configurations within your mean recovery time window.
DHCP servers provide critical information to client computers, and Windows Server offers simple configuration that supports fault tolerance or load balancing. Take the time to consider the DHCP scopes on your servers and identify which ones will benefit from redundancy. Then follow these steps to improve the reliability and performance of your AD environment.