It's no secret that DHCP is a critical component in network infrastructure. On most networks, client computers use DHCP to receive their IP address information. The problem is, unlike DNS, making DHCP highly available hasn't always been a straightforward task. If a DHCP server fails and isn't returned to service quickly, clients will be unable to access the network because they won't have valid IP addresses. Unless you have a monitoring solution in place, it's likely that the first time you'll know about a DHCP failure is when an increasing number of users with IP addresses in the Automatic Private IP Addressing (APIPA) range call the service desk.
In previous Windows OSs, such as Windows Server 2008 R2 and Windows Server 2003, you have two general options if you want to make DHCP highly available:
- You can put the DHCP server on a failover cluster, with the configuration information stored on shared storage.
- You can configure split scopes. This involves carving up a normal scope so that 80 percent of the addresses in the lease are hosted on the DHCP server most likely to respond to client traffic on a particular subnet. The remaining 20 percent of the addresses in the lease are hosted on a DHCP server on a remote subnet. These addresses are used by clients only when the DHCP server with 80 percent of the addresses isn't available.
Windows Server 2012 simplifies and improves DHCP availability by introducing a DHCP failover feature to the DHCP role service. DHCP failover lets you provide a highly available DHCP service without having to configure split scopes or deploy a failover cluster. After I give you more details about this new feature, I'll show you how to configure it.
Understanding DHCP Failover
DHCP failover involves configuring two Server 2012 computers with the DHCP role service installed as a pair. This pair can provide a highly available DNS using one of the following techniques:
- Load balance mode. The load balance mode (sometimes referred to as the load sharing mode in the Microsoft documentation) is the default way of configuring DHCP failover. When you configure two DHCP servers in load balance mode, each server will serve IP addresses from the same scope in such a way that duplicate addresses aren't issued. Address leases from the scope are issued by each server in a load balanced manner. If one DHCP server fails, the other will continue to lease addresses until the first DHCP server returns to service. Figure 1 shows a DHCP scope configured to use the load balance mode.
- Hot standby mode. When you configure two servers with the DHCP role installed in hot standby mode, the servers operate in a failover relationship. The active server leases IP addresses and configuration information to clients. The secondary server only performs this function in the event that the primary isn't available. Figure 2 shows a DHCP scope configured to use the hot standby mode.
Configuring DHCP Failover
DHCP failover involves setting up a partnership between two DHCP servers. Only two DHCP servers can participate in a partnership, but you can configure multiple partnerships between DHCP servers. For example, you can configure DHCP-ONE and DHCP-TWO as partners, DHCP-TWO and DHCP-THREE as partners, and DHCP-ONE and DHCP-THREE as partners. An individual DHCP scope, however, can only be used with one partnership. For example, you can configure SCOPE-ALPHA as highly available on servers DHCP-ONE and DHCP-TWO, but this scope can't also be present on DHCP-THREE.
To configure DHCP failover, perform the following steps:
- Install the DHCP role on two separate servers running Server 2012 that are members of the same Active Directory (AD) domain.
- Ensure that the DHCP role on each server is authorized in AD.
- Create the relevant scopes on the first DHCP server.
- Click the scope for which you want to configure failover. On the Action menu, click Configure Failover.
- On the Introduction to DHCP Failover page of the Configure Failover wizard, verify that the scope you selected is present and click Next.
- On the Specify the partner server to use for failover page, click Add Server. As Figure 3 shows, the Add Server dialog box will list all the Server 2012 computers running the DHCP role service that have been authorized in the domain. Select the DHCP server you want to use as the partner and click OK.
- On the Specify the partner server to use for failover page, click Next.
- On the Create a new failover relationship page, select either Load balance or Hot standby in the Mode drop-down list.
- If you're configuring the server to use the load balance mode, specify the weight assigned to each server. The default is that each server shares an equal load, as shown in Figure 4.
If you're configuring the server to use the hot standby mode, specify the role of the partner server (which can be set to Active or Standby) and the percentage of addresses in the scope reserved for the standby server, as shown in Figure 5.
- If desired, configure the State Switchover Interval option. The setting determines the length of time before the standby begins leasing addresses to clients on the network.
- Choose a shared secret. This allows you to pair the DHCP servers. Click Next.
- On the final page, click Finish.
You can configure only one type of failover relationship between two DHCP servers. So, if you configure a load balance relationship between DHCP-ONE and DHCP-TWO, all scopes configured for DHCP failover will need to use the load balance mode. If you configure a relationship between DHCP-ONE and DHCP-THREE, that relationship can use a different failover method. You can view the relationships that a DHCP server has on the Failover tab of either the IPv6 Properties or IPv4 Properties dialog box, as Figure 6 shows.
Create a Highly Available DHCP Solution with Minimal Work
DHCP failover in Server 2012 provides a highly available DHCP solution without requiring you to configure split scopes or a failover cluster. In most situations, using the default load balanced DHCP failover configuration will be suitable. You can configure multiple relationships between different DHCP servers, but you can only make a scope highly available on a single relationship.