Troubleshooting

How to Configure DHCP Failover for High Availability on Windows Server 2025

Aseem Kishore
16 min read

The Back Room Tech is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Two DHCP servers can keep an IPv4 scope available when one server goes down. This guide sets up the pair with PowerShell, shows the DHCP console path, and checks the healthy relationship, replicated scope, and client settings.

You’ll choose Load balance or Hot standby. Both need two reachable DHCP servers. This walkthrough uses two nonclustered servers; Microsoft also supports clustered DHCP together with DHCP failover.

What Is Windows Server 2025 DHCP Failover?

DHCP failover lets two servers serve the same IPv4 scope. They exchange lease data over TCP port 647. If one server goes down, the other can keep serving clients under the relationship’s failover rules.

A relationship has exactly two servers and supports DHCPv4 scopes only. The nonclustered setup here creates a DHCP failover relationship without configuring cluster resources. This scope does not exclude Microsoft’s supported clustered-DHCP option. Microsoft lists the limits in its DHCP failover overview (retrieved October 15, 2026).

Prerequisites

These examples use two domain-joined Windows Server 2025 machines. Active Directory authorization in Step 3 applies to this domain environment. Microsoft’s DHCP Server installation quickstart lists the static IPv4 address and installation-permission requirements. Check these items before you change a production scope:

  • Two Windows Server 2025 machines with static IPv4 addresses. This walkthrough uses domain-joined servers and their DNS names.
  • An Administrators account, or equivalent, to install the DHCP role on each server. For Step 3, also have the permissions needed to authorize the servers in Active Directory.
  • One planned DHCPv4 subnet and address range. This guide uses 192.0.2.0/24, a documentation network. Replace every example address before you run the commands.
  • Routing and firewalls that allow the servers to communicate over TCP 647.
  • Synchronized partner clocks. Microsoft requires time synchronization; the failover wizard stops if the servers differ by more than one minute. Check the time source and clock synchronization on both servers before setup.
  • A client path to both DHCP servers. Put them on the same broadcast network or configure a DHCP relay with both server addresses.
  • No separate copy of the scope on the second server.
  • A maintenance window if you’re moving a live scope or testing an outage with live clients.
  • Enough capacity for either server to handle the site’s DHCP load alone. Separate hosts and power paths help. A UPS for each host is useful if power loss is part of your plan.

Run the commands below in an elevated Windows PowerShell session on dhcp1.example.com. Run the role installation command on dhcp2.example.com too. If the scope already exists, skip its creation and check its range and options before you add failover.

Step-by-Step Guide

Step 1: Set the server and scope values

On the first server, open an elevated Windows PowerShell session. Edit these values for your network before you paste the block.

$dhcp1 = "dhcp1.example.com"
$dhcp2 = "dhcp2.example.com"
$dhcp1Address = "192.0.2.10"
$dhcp2Address = "192.0.2.11"
$scopeId = "192.0.2.0"
$relationshipName = "Site-A-Failover"

Check DNS before you install or authorize anything:

Resolve-DnsName $dhcp1
Resolve-DnsName $dhcp2

Expected result: Each name resolves to its server’s address. Fix stale DNS records or routing before you go on. The partners need a reliable path between them.

Step 2: Install the DHCP Server role on both servers

Run this command in an elevated Windows PowerShell session on each Windows Server 2025 machine:

Install-WindowsFeature DHCP -IncludeManagementTools

-IncludeManagementTools adds the applicable management tools alongside the DHCP role; the Install-WindowsFeature reference documents this switch. Microsoft’s RSAT tools reference identifies the DHCP Management Console and DHCP Server Windows PowerShell module among the DHCP Server tools.

Expected output: Success is True, and the result lists the DHCP Server role.

Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True    No             Success   {DHCP Server, ...}

Microsoft’s DHCP installation quickstart states that this DHCP role installation does not require a reboot. You can also install the role through Server Manager → Manage → Add Roles and Features → Role-based or feature-based installation → DHCP Server.

Step 3: Authorize both DHCP servers in Active Directory

For this domain-based setup, use an elevated session with DHCP authorization rights. Microsoft says not to run Add-DhcpServerInDC outside a domain environment. Enter each server’s real DNS name and IP address:

Add-DhcpServerInDC -DnsName $dhcp1 -IPAddress $dhcp1Address
Add-DhcpServerInDC -DnsName $dhcp2 -IPAddress $dhcp2Address
Get-DhcpServerInDC

Expected result: Get-DhcpServerInDC lists both names and addresses. Domain-joined DHCP servers need authorization before they serve clients.

IPAddress   DnsName
---------   -------
192.0.2.10  dhcp1.example.com
192.0.2.11  dhcp2.example.com

If a server is missing, check that your account has the needed Active Directory rights. Also check that its DNS name points to the address you authorized.

Step 4: Create the IPv4 scope on the first server

Create the scope only on dhcp1. Failover setup will create the partner copy. This example assigns 192.0.2.100 through 192.0.2.199 and sets a router, DNS server, and DNS domain.

Add-DhcpServerv4Scope `
    -ComputerName $dhcp1 `
    -Name "Site A LAN" `
    -StartRange 192.0.2.100 `
    -EndRange 192.0.2.199 `
    -SubnetMask 255.255.255.0 `
    -State Active

Set-DhcpServerv4OptionValue `
    -ComputerName $dhcp1 `
    -ScopeId $scopeId `
    -Router 192.0.2.1 `
    -DnsServer 192.0.2.53 `
    -DnsDomain "example.com"

The backtick at each line’s end continues the PowerShell command. Use router and DNS addresses that clients on your subnet can reach.

Check the scope and its options:

Get-DhcpServerv4Scope -ComputerName $dhcp1 -ScopeId $scopeId
Get-DhcpServerv4OptionValue -ComputerName $dhcp1 -ScopeId $scopeId

Expected result: The first command shows scope 192.0.2.0 as Active. The second shows the router and DNS settings you entered.

If you have a working scope, check it instead of creating another. Check the partner too:

Get-DhcpServerv4Scope -ComputerName $dhcp2

Expected result: The intended scope ID is absent from dhcp2. If it’s present, find out how it got there. Check its leases, reservations, and current relationship before you remove any production scope.

Step 5: Check partner and client network paths

Check that both servers resolve and can reach each other. From dhcp1, run:

Test-Connection -ComputerName $dhcp2 -Count 2

Run the matching check from dhcp2 to dhcp1. Host and network firewalls must allow TCP 647 in both directions. Once you’ve created the relationship, check the port directly:

Test-NetConnection -ComputerName $dhcp2 -Port 647

Expected result after relationship creation: TcpTestSucceeded : True. Some networks block ping, so a failed ping alone doesn’t prove DHCP is broken. Check TCP and the relationship state.

Check every DHCP relay for the client subnet. Each relay must forward requests to both servers. If clients share a broadcast network with the servers, check that both server interfaces are on it. A healthy partner link won’t help clients reach a server that’s missing from the relay.

Step 6: Choose Load balance or Hot standby

Choose one command in Step 7. A scope can’t belong to two failover relationships at once.

ModeChoose it whenRoutine behavior
Load balanceBoth servers should handle normal DHCP trafficBoth partners serve clients; 50 sets an even allocation
Hot standbyOne server should normally serve the scope and the other should waitThe active server handles routine traffic; the standby takes over under failover rules

Load balance fits when both servers have similar capacity and network access. Hot standby fits a primary site and recovery site, or a setup with one routine server. The standby can’t take over every lease at once. Lease timing, reserved addresses, and relationship state still matter. Microsoft covers both modes in its DHCP failover documentation (retrieved October 15, 2026).

Microsoft Learn hot-standby documentation with the published partner-role diagram and reserve-pool timing guidance

Documentation capture: Microsoft Learn, captured 2026-10-16 12:08:19.074 UTC. This is Microsoft’s published guidance and example, not an executed Windows test for this article.

The examples use message authentication with a shared secret. If you later manage the relationship in the console, use the same secret at both ends. This prompt hides your input and avoids writing the secret as a literal in the command text:

$secureSecret = Read-Host "Enter the DHCP failover shared secret" -AsSecureString
$secretPointer = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureSecret)

try {
    $sharedSecret = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($secretPointer)
}
finally {
    [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($secretPointer)
}

The DHCP cmdlet needs a string for -SharedSecret, so the conversion creates a plain-text copy in this PowerShell process. Use a protected administrative session. Keep the secret out of pasted commands, screenshots, transcripts, and debugging captures; protect any existing secret-bearing records. Removing a variable is cleanup, not proof that every memory copy or recorded copy has been erased.

Step 7: Create the failover relationship with PowerShell

For Load balance, run this command on dhcp1:

Add-DhcpServerv4Failover `
    -ComputerName $dhcp1 `
    -Name $relationshipName `
    -PartnerServer $dhcp2 `
    -ScopeId $scopeId `
    -LoadBalancePercent 50 `
    -SharedSecret $sharedSecret

-LoadBalancePercent 50 selects load balance and splits routine traffic evenly. Add-DhcpServerv4Failover has no -Mode parameter; its load-balance and hot-standby parameter sets select the mode. You can change the percentage if one server has less capacity. Both still need enough capacity to handle an outage.

Or, for Hot standby, run this command instead:

Add-DhcpServerv4Failover `
    -ComputerName $dhcp1 `
    -Name $relationshipName `
    -PartnerServer $dhcp2 `
    -ScopeId $scopeId `
    -ServerRole Active `
    -ReservePercent 5 `
    -SharedSecret $sharedSecret

Here, -ServerRole Active makes dhcp1 active and dhcp2 standby. The parameter sets the role of the server named by -ComputerName, as Microsoft explains in the cmdlet reference. -ReservePercent 5 reserves 5% of the scope’s free addresses on the standby for new clients during failover. Check that this reserve meets your demand.

Microsoft Learn Add-DhcpServerv4Failover ServerRole parameter definition for the local target server

Documentation capture: Microsoft Learn, captured 2026-10-16 12:08:32.900 UTC. This is Microsoft’s published guidance and example, not an executed Windows test for this article.

After either command, remove the variables from this session. Microsoft documents Remove-Variable as removing a variable from its scope; this does not establish secure memory erasure:

Remove-Variable sharedSecret
Remove-Variable secureSecret

Expected result: The command finishes without an error, and the scope appears on dhcp2. Once the partners connect, the relationship should settle at Normal. Run the Step 9 checks; a quiet command isn’t proof of success.

Important: A live failover relationship changes how both servers serve leases. Create it during an approved change window if clients already use the scope.

Step 8: Use the DHCP console when you need the GUI path

PowerShell is the main procedure above. For a scope you haven’t set up with PowerShell, use the DHCP console wizard. Don’t run it again for the Step 7 scope.

On dhcp1, open Server Manager → Tools → DHCP. Expand the first server, right-click IPv4, and select Configure Failover.

Select the IPv4 scope to protect, then click Next. Check the scope ID. Another scope may need a different partner or mode.

On the Partner Server page, enter the second server’s name if needed. The wizard can reuse a relationship between these two servers for another scope. For the first setup, create a new relationship.

Enter a relationship name and choose Load balance or Hot standby. Review the controls for that mode. Leave Enable Message Authentication selected and enter a shared secret. Hide the secret in screenshots and change records. Check Maximum Client Lead Time and State Switchover Interval against your recovery policy. Then click Next and Finish.

The completion page should report success and scope replication. Microsoft covers the console steps in Manage DHCP failover relationships (retrieved October 15, 2026).

Step 9: Verify the relationship and scope on both servers

Check the relationship on each partner:

Get-DhcpServerv4Failover -ComputerName $dhcp1 -Name $relationshipName |
    Format-List Name,PartnerServer,Mode,ServerRole,State,ScopeId
Get-DhcpServerv4Failover -ComputerName $dhcp2 -Name $relationshipName |
    Format-List Name,PartnerServer,Mode,ServerRole,State,ScopeId

Both should show the same relationship name and scope ID. With a healthy link, State should be Normal. For the hot-standby command above, expect Mode : HotStandby on both, ServerRole : Active on dhcp1, and ServerRole : Standby on dhcp2. For the load-balance command, expect Mode : LoadBalance. Stop and check any role or mode mismatch before testing an outage.

Then check the scope on each server:

Get-DhcpServerv4Scope -ComputerName $dhcp1 -ScopeId $scopeId
Get-DhcpServerv4Scope -ComputerName $dhcp2 -ScopeId $scopeId

Expected result: Both commands return scope 192.0.2.0, or your real scope ID. Output layout may vary. The relationship and scope checks should agree on the partner, mode, and scope.

In the DHCP console, expand IPv4 under each server and inspect the scope. Check the failover relationship view or scope properties against the PowerShell output.

Microsoft Learn relationship-verification documentation with its published Get-DhcpServerv4Failover example

Documentation capture: Microsoft Learn, captured 2026-10-16 12:09:15.425 UTC. This is Microsoft’s published guidance and example, not an executed Windows test for this article.

Finally, renew a lease from a noncritical client on the protected subnet. Check its address, router, and DNS options. On a Windows test client:

ipconfig /renew
ipconfig /all

Expected result: The client gets an address in the scope range and shows the expected gateway and DNS server. This checks ordinary client reachability and the returned settings. A healthy relationship plus a routine renewal does not prove outage takeover, or prove that this client separately obtained a lease from each partner.

Validate outage behavior separately with an approved maintenance-window plan and a noncritical isolated test client. Record the partner state, available addresses, lease timing, and client results. Do not release a production client’s lease or shorten timers merely to force a test. In hot standby, the reserve supports new clients during interruption; access to the full available pool depends on Partner Down and MCLT timing. Communication Interrupted alone does not establish unrestricted takeover. Inspect the actual relationship settings below: the creation commands in this guide do not enable automatic state transition, whose documented default is False. No outage test was performed for this article.

Configuration: Settings to Review After Setup

When both partners show a healthy state and clients get leases, review these settings:

SettingWhat to check
ModeUse Load balance when both servers can serve clients. Use Hot standby when one should handle routine traffic.
State Switchover IntervalDecide if the server should move toward partner-down handling on its own, and after how long. Don’t shorten it to mask a network fault.
Maximum Client Lead Time (MCLT)Check the lease-timing limit used during failover. It matters during lost communication and takeover. Match it to your lease and recovery policy.
Scope optionsCompare router, DNS, domain, reservations, and exclusions on both partners after changes. Clients need the same settings from either server.
Server placementUse separate hosts or fault domains when you can. Separate power helps only if clients or relays can still reach the live server.
Configuration exportKeep an export from each server under your backup controls. Exports can contain network and lease data, so limit access.

Inspect the relationship settings:

Get-DhcpServerv4Failover -ComputerName $dhcp1 -Name $relationshipName |
    Format-List Name,PartnerServer,Mode,State,ScopeId,MaxClientLeadTime,AutoStateTransition,StateSwitchInterval

The pipe sends the result to Format-List so the named settings are easier to read. Check the Windows Server 2025 DHCPServer PowerShell module for cmdlets on your server (retrieved October 15, 2026).

Replicate later scope changes manually

Creating the relationship copies the scope. Later scope configuration changes do not automatically replicate. The replication cmdlet reference includes scope properties, reservations, scope option values, and policies in scope configuration.

Warning: Replication copies the initiating server’s corresponding scope configuration over the partner’s settings. Select the server with the authoritative configuration first. The example below copies dhcp1 to its partner; do not run it unchanged if dhcp2 holds the settings you intend to keep:

Invoke-DhcpServerv4FailoverReplication `
    -ComputerName $dhcp1 `
    -ScopeId $scopeId `
    -Force

-Force skips the confirmation prompt. Check that the source has the right settings before you run it. Then compare the result on both servers:

Get-DhcpServerv4OptionValue -ComputerName $dhcp1 -ScopeId $scopeId
Get-DhcpServerv4OptionValue -ComputerName $dhcp2 -ScopeId $scopeId

Expected result: The option values match. The failover relationship exchanges lease data; this command copies scope configuration changes.

For a backup, make a protected directory on the machine running PowerShell. Export each server separately:

New-Item -Path "C:\DHCP-Backups" -ItemType Directory -Force

Export-DhcpServer `
    -ComputerName $dhcp1 `
    -File "C:\DHCP-Backups\dhcp1.xml" `
    -Leases `
    -Force

Export-DhcpServer `
    -ComputerName $dhcp2 `
    -File "C:\DHCP-Backups\dhcp2.xml" `
    -Leases `
    -Force

-Leases includes lease data. -Force replaces an export file with the same name. Keep the files under your normal access and retention controls.

Tips and Troubleshooting

The relationship shows “Communication Interrupted”

Cause: The partners have lost their connection. The state alone won’t tell you if DNS, routing, a firewall, or the service caused it.

Fix:

  • Check the DHCP Server service on both servers:
   Get-Service -Name DHCPServer
  • Resolve each partner’s name from the other server. Then test TCP 647 both ways:
   Resolve-DnsName $dhcp2
   Test-NetConnection -ComputerName $dhcp2 -Port 647
  • Check relationship state on both servers with Get-DhcpServerv4Failover. If TCP fails, check host and network firewall logs. Restore the link before you change switchover timing.

Expected result: The service is Running, DNS returns the right address, and TCP succeeds. The relationship should return to Normal after the link recovers.

The wizard or cmdlet rejects the scope

Cause: The partner already has its own copy of the scope, or the scope belongs to another failover relationship.

Fix: Run Get-DhcpServerv4Scope and Get-DhcpServerv4Failover on both servers. Check the existing scope’s leases and relationship before you change it. For a new relationship, the partner can’t have a separate copy of that scope. Plan any live scope migration with care; deleting a scope can affect active clients.

A scope option changed on one server but not the other

Cause: Later scope configuration changes need manual replication.

Fix: Find the server with the right value. Run Invoke-DhcpServerv4FailoverReplication from that server, then compare both partners. If they still differ, check the relationship state. Replicate again once communication is healthy.

Clients fail to get an address when one server is down

Cause: Clients may have no path to the live server, even if the partner link was healthy before the outage.

Fix: Check that the DHCP relay lists both server IP addresses. Check routing and firewalls for DHCP traffic to the live partner. Inspect its scope and relationship state, then test with a noncritical client.

DHCP renewals fail despite a healthy network path

Cause: The DHCP service or update level may be involved. Microsoft documented a DHCP service issue after the June 10, 2025 update KB5060842. Microsoft reported a fix in updates released on or after July 8, 2025, including KB5062553 (sources retrieved October 15, 2026).

Fix: Check update history on the affected Windows Server 2025 hosts. Apply a current supported cumulative update through your normal change process. Check service logs and update levels before you change the failover setup.

Help & Answers

Frequently Asked Questions

5 questions

Does DHCP failover require Windows Failover Clustering?

Windows Failover Clustering is not a prerequisite for the two-server, nonclustered setup in this guide. Microsoft also supports clustered DHCP in conjunction with DHCP failover; that optional architecture is outside this walkthrough.

Can the same scope already exist on the partner?

The partner can’t have a separate copy for a new relationship. Start with the scope on the first server and let failover setup copy it. If the partner has that scope ID, inspect it before you change anything.

How many servers can share one failover relationship?

Exactly two. You can create other relationships for other scopes. A relationship can’t include a third DHCP server.

Does native DHCP failover support DHCPv6?

No. This feature protects DHCPv4 scopes. These commands aren’t a DHCPv6 high-availability procedure.

Do later scope changes replicate automatically?

No. After a scope change, run Invoke-DhcpServerv4FailoverReplication from the server with the right settings. Then compare both partners. The first scope copy doesn’t cover later changes.

Wrapping Up

Check for a Normal relationship state, the scope on both Windows Server 2025 machines, and a successful client lease. Load balance fits two servers that can serve the site every day. Hot standby gives one server the routine load. Keep both client paths working, and replicate scope changes when you make them.