How to Configure DHCP Failover on Windows Server 2012 R2

DHCP Failover is a new feature introduced in Windows Server 2012 R2 that allows two DHCP servers to share a pool of IP addresses for one or more subnets. Before this feature, providing redundant DHCP service required manual IP range splitting (the 80/20 rule) — an error-prone approach that wasted address space and did not provide true automatic failover. DHCP Failover supports two operational modes: Hot Standby, where one server actively leases addresses and the other takes over only when the primary fails, and Load Balance, where both servers actively issue leases simultaneously, sharing the address pool. The two DHCP servers synchronize lease state information between themselves, ensuring that each knows about all active leases and can serve the same subnet seamlessly.

Prerequisites

Two Windows Server 2012 R2 servers with the DHCP Server role installed and authorized in Active Directory. Each DHCP server must have network connectivity to the other server for replication traffic (TCP port 647 by default). The DHCP scopes to be replicated must already exist on the primary server — the failover wizard copies them to the partner server automatically. Both servers must have their clocks synchronized (NTP). A strong shared secret for authenticating the failover relationship is required. The partner server must not already have the scope defined — the failover process creates it.

Step 1: Install and Authorize DHCP on Both Servers

Install the DHCP Server role on both servers if not already done:

# Run on both DHCP01 and DHCP02
Install-WindowsFeature DHCP -IncludeManagementTools

# Authorize both servers in Active Directory
Add-DhcpServerInDC -DnsName "DHCP01.contoso.com" -IPAddress "192.168.1.10"
Add-DhcpServerInDC -DnsName "DHCP02.contoso.com" -IPAddress "192.168.1.11"

# Verify authorization
Get-DhcpServerInDC

Step 2: Create a DHCP Scope on the Primary Server

Configure the scope on the primary DHCP server before setting up failover:

# On DHCP01 - Create the scope
Add-DhcpServerv4Scope -Name "Corp LAN" `
    -StartRange "192.168.1.100" `
    -EndRange "192.168.1.200" `
    -SubnetMask "255.255.255.0" `
    -LeaseDuration (New-TimeSpan -Days 8) `
    -State Active

# Configure scope options
Set-DhcpServerv4OptionValue -ScopeId "192.168.1.0" `
    -Router "192.168.1.1" `
    -DnsServer "192.168.1.20","192.168.1.21" `
    -DnsDomain "contoso.com"

# Verify the scope
Get-DhcpServerv4Scope | Select-Object ScopeId, Name, StartRange, EndRange, State

Step 3: Configure DHCP Failover in Load Balance Mode

Set up DHCP Failover in Load Balance mode — both servers actively serve leases. This is the preferred mode for continuously connected servers:

Add-DhcpServerv4Failover -Name "Corp-Failover" `
    -PartnerServer "DHCP02.contoso.com" `
    -ScopeId "192.168.1.0" `
    -LoadBalancePercent 50 `
    -SharedSecret "Str0ngSharedSecret2024!" `
    -Mode LoadBalance `
    -AutoStateTransition $true `
    -StateSwitchInterval (New-TimeSpan -Minutes 60)

# Verify the failover relationship was created
Get-DhcpServerv4Failover | Select-Object Name, PartnerServer, Mode, LoadBalancePercent, State

The -LoadBalancePercent 50 means each server handles 50% of new lease requests. The -AutoStateTransition $true and -StateSwitchInterval settings control automatic failover if the partner becomes unreachable — after 60 minutes of no contact, the server transitions to Partner Down state and takes over the full address pool.

Step 4: Configure DHCP Failover in Hot Standby Mode

Alternatively, use Hot Standby mode where DHCP02 only activates if DHCP01 fails:

Add-DhcpServerv4Failover -Name "Corp-HotStandby" `
    -PartnerServer "DHCP02.contoso.com" `
    -ScopeId "192.168.2.0" `
    -ReservePercent 5 `
    -SharedSecret "Str0ngSharedSecret2024!" `
    -Mode HotStandby `
    -AutoStateTransition $true `
    -StateSwitchInterval (New-TimeSpan -Minutes 60)

# The -ReservePercent 5 means DHCP02 holds 5% of addresses reserved for failover
# DHCP01 actively serves the other 95%

Step 5: Verify Scope Replication to Partner Server

Verify that the scope was automatically replicated to DHCP02:

# On DHCP02 - verify scope was replicated
Get-DhcpServerv4Scope -ComputerName "DHCP02" | Select-Object ScopeId, Name, StartRange, EndRange, State

Get-DhcpServerv4Failover -ComputerName "DHCP02" | Select-Object Name, PartnerServer, Mode, State

Step 6: Add More Scopes to the Failover Relationship

Add additional subnets to the same failover relationship without creating a new relationship:

# Add a new scope to the primary server
Add-DhcpServerv4Scope -Name "Branch Office" `
    -StartRange "10.10.1.100" `
    -EndRange "10.10.1.200" `
    -SubnetMask "255.255.255.0" `
    -State Active

Set-DhcpServerv4OptionValue -ScopeId "10.10.1.0" `
    -Router "10.10.1.1" `
    -DnsServer "192.168.1.20","192.168.1.21" `
    -DnsDomain "contoso.com"

# Add the new scope to the existing failover relationship
Add-DhcpServerv4FailoverScope -Name "Corp-Failover" -ScopeId "10.10.1.0"

Step 7: Synchronize Lease State Manually

Force an immediate replication of all lease state information between the failover partners:

Invoke-DhcpServerv4FailoverReplication -Name "Corp-Failover" -Force

# Verify lease counts match on both servers
Get-DhcpServerv4Lease -ScopeId "192.168.1.0" -ComputerName "DHCP01" | Measure-Object
Get-DhcpServerv4Lease -ScopeId "192.168.1.0" -ComputerName "DHCP02" | Measure-Object

Step 8: Test DHCP Failover

Test failover by stopping the DHCP service on the primary server and verifying clients can still obtain leases:

# Stop DHCP service on DHCP01 to simulate failure
Stop-Service DHCPServer -ComputerName "DHCP01"

# On DHCP02 - verify it's serving leases
Get-DhcpServerv4Failover -ComputerName "DHCP02" | Select-Object Name, State, PartnerServer

# From a client - renew the DHCP lease
ipconfig /release
ipconfig /renew
ipconfig /all

After testing, restart the primary DHCP server and verify the failover relationship returns to Normal state:

Start-Service DHCPServer -ComputerName "DHCP01"
Get-DhcpServerv4Failover | Select-Object Name, State, PartnerServer

Summary

DHCP Failover in Windows Server 2012 R2 eliminates the manual IP splitting workaround and provides true automatic failover for DHCP services. Both Load Balance and Hot Standby modes replicate lease state between partners, ensuring that clients receive leases without interruption even when one server fails. With automatic state transition enabled, DHCP services recover without administrator intervention during unplanned outages — a critical improvement for enterprise networks where DHCP downtime directly impacts all clients.