Dynamic Host Configuration Protocol (DHCP) is a core network service that makes it easy to manage the TCP/IP settings of the computers on your network. Without DHCP, you'd need to go to each computer and manually assign it an IP address, subnet mask, default gateway and other network settings.
DHCP handles all this automatically, but what happens if your DHCP server goes down? While this might not immediately affect existing computers on the network because of the way DHCP leases are renewed, it would certainly impact any new computers that try to join the network. Therefore, it's important, especially in environments where computers frequently come and go, to ensure that DHCP services are always available for computers that need them.
How can you ensure DHCP availability? With DHCP servers running previous versions of Windows Server, you had three ways of doing this: split scopes, failover clustering and standby server. Let's briefly review each of these approaches and describe the challenges associated with them.
1. Split Scopes
The split scope approach shown in Figure 1 involves two DCHP servers that provide addresses for your computers. These servers are typically on separate subnets connected by routers that act as DHCP relay agents to forward DHCP traffic between the subnets. Normally one DHCP server will handle 80 percent of the addresses pool, while the other server handles the remaining 20 percent.
The main problem here is that if you have almost 100 percent of the addresses in the pool leased out, then there aren't many left to ensure availability when these are needed.
Figure 1: Split scope approach to DHCP availability.
2. Failover Clustering
The failover clustering approach shown in Figure 2 involves two DHCP servers configured as nodes in a failover cluster. Both servers manage the same pool of addresses, but only one of the servers is active at any given time. Should the active server fail or go offline (for example, for routine maintenance), then the other server will automatically come online to take over the first server's load.
The main problem with this approach is that implementing failover clustering is a somewhat complicated task for administrators. It also requires hardware that passes the cluster validation test, so you may need to purchase additional hardware to make it work. Lastly, because the DHCP database is located on cluster-shared storage in this scenario, the shared storage can become a single point of failure.
Figure 2: Failover clustering approach to DHCP availability.
You can improve on the failover clustering approach by combining it with the split scope approach. This hybrid solution will ensure greater DHCP availability, but it also adds more complexity and management overhead to the process.
3. Standby Server
The third approach uses a standby server, as shown in Figure 3. This standby server might be stored in a closet in the server room, and it can manage either the same pool of addresses as the DHCP server on your production network or it can be configured to lease an additional pool of addresses.
The main problem here is that the administrator must manually intervene to connect the standby server to the network and boot it when the main DHCP server fails or is taken offline for maintenance.
Additional complexities are also introduced when the standby server handles the same address pool. For example, you'll need to implement server-side address conflict detection to ensure that duplicate addresses are not assigned to computers. You may also need to perform additional configuration steps if DHCP is being used to automatically update DNS records, which is common in Active Directory environments.
Figure 3: Standby server approach to DHCP availability.
4. DHCP Failover
While each of the above methods has its limitations, there is also a new way of ensuring DHCP availability in Windows Server 2012. This new approach is called DHCP failover, and it provides a way to configure two DHCP servers so that they can lease addresses from the same address pool without the risk of duplicate addresses on your network. DHCP failover can ensure that DHCP services are available at all times so that both new and existing computers will always be able to communicate when they are physically connected to your network.
Implementing DHCP failover is easy. You start by deploying two DHCP servers running Windows Server 2012 and configuring scopes and scope options on them. Designate one of these servers as the primary DHCP server and the other as the secondary. Open the DHCP console and add the primary server, then right-click on any scope for which you want to ensure availability and select Configure Failover, as shown in Figure 4 below. Note that DHCP failover enables availability on a per-scope basis, not a per-server basis.
Figure 4: Configuring DHCP failover using the DHCP console.
When the Configure Failover Wizard opens, you have two ways of configuring DHCP failover. The first way is called load-sharing mode. This approach is typically used when you have two DHCP servers at the same physical site.
Figure 5 shows two servers being configured in load-sharing mode with DHCP requests being load-balanced between them on an equal basis (each server handles 50 percent of the DHCP requests from computers on the network).
Figure 5: Configuring DHCP failover in load-sharing mode.
The other way you can implement DHCP failover is called hot-standby mode. This approach is typically used when an organization has a central (hub) site and multiple branch office (spoke) sites. Each branch office has its own primary DHCP server, while a single DHCP server at corporate headquarters acts as the secondary server to each of the branch office servers. Figure 6 shows two servers being configured in hot-standby mode, with a small portion (5 percent) of the address pool being reserved for the standby (secondary) server.
Figure 6: Configuring DHCP failover in hot-standby mode.
There are a few more things you need to know about configuring DHCP failover — you can even implement it using Windows PowerShell instead of the GUI server management tools included on the Windows Server platform — but this article is only an overview. For more details, and for a step-by-step walkthrough of configuring DHCP failover using PowerShell, see my latest book, Installing and Configuring Windows Server 2012: Training Guide, from Microsoft Press.