Skip to content

Commit e320b49

Browse files
authored
Merge pull request #7006 from meaghanlewis/migrate-dhcp-failover
Add migration guide for DHCP failover and update table of contents
2 parents fa906c6 + 42061d7 commit e320b49

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Migrate to DHCP failover in Windows Server
3+
description: Learn how to migrate DHCP failover relationships in Windows Server. This guide provides steps for migrating an existing DHCP failover deployment on Windows Server.
4+
ms.topic: how-to
5+
author: meaghanlewis
6+
ms.author: mosagie
7+
ms.date: 05/06/2025
8+
---
9+
# Migrate to DHCP failover
10+
11+
This guide provides guidance for migrating your existing DHCP server deployment to a DHCP failover configuration in Windows Server. Whether you're transitioning from a split-scope or clustered DHCP setup, this document outlines the necessary steps to ensure a smooth migration.
12+
13+
## Prerequisites
14+
15+
- The DCHP Server role is installed on both DHCP servers used to configure the failover relationship. To install the DHCP server role, follow the steps in [Install and configure DHCP server](/windows-server/networking/technologies/dhcp/quickstart-install-configure-dhcp-server).
16+
- An existing DHCP server that is set up and running.
17+
18+
## Export DHCP settings and leases
19+
20+
If you're using clustered DHCP, you only need to export DHCP settings from the currently active DHCP server. Perform the following procedure for both the currently active DHCP server, and the backup server only if you're using a split-scope design and need to replicate DHCP leases from both DHCP servers.
21+
22+
> [!IMPORTANT]
23+
> You can't import DHCP leases for the same scope from two different DHCP servers. You must consolidate the exported files into a single file.
24+
25+
### Export DHCP settings and leases
26+
27+
1. On the DHCP server that will be used to initially configure DHCP failover, **dhcp-failover-server.contoso.com**, open an elevated Windows PowerShell prompt, type the following commands, and then press ENTER:
28+
29+
```powershell
30+
mkdir C:\export
31+
mkdir C:\backup
32+
Export-DhcpServer -ComputerName "dhcp-server.contoso.com" -File "C:\exportdir\dhcpexport.xml"
33+
```
34+
35+
This example exports all of the DHCP server, DHCPv4 and DHCPv6, configurations including scopes present on the DHCP server service to the specified export file in XML file format.
36+
37+
1. If needed, perform the export step again specifying a computer name of **dhcp-server-2.contoso.com**, and exporting to the file **C:\exportdir\dhcpexport2.xml**. When you're finished, you have one XML file for every DHCP server that has leases you wish to import to **dhcp-failover-server.contoso.com**.
38+
39+
1. If you have multiple files that contain leases for the same scope ID, these files must be consolidated before importing data to **dhcp-failover-server.contoso.com**.
40+
41+
## Import DHCP settings and leases to DHCP failover server
42+
43+
Before you perform this procedure, verify that you have consolidated and saved leases and settings from your current DHCP servers in a file on the new DHCP server. The following procedure assumes DHCP settings and leases are saved in the **C:\export\dhcpexport.xml** file on a DHCP server with a host name of **dhcp-failover-server.contoso.com**.
44+
45+
### Import DHCP settings and leases
46+
47+
- At an elevated Windows PowerShell prompt, type the following commands and press ENTER:
48+
49+
```powershell
50+
Import-DhcpServer -ComputerName "dhcp-failover-server.contoso.com" -File "C:\exports\dhcpexport.xml" -BackupPath "C:\dhcpbackup\"
51+
```
52+
53+
This example imports the configuration data in the specified file onto the DHCP failover server service named **dhcp-failover-server.contoso.com**. The file can contain DHCPv4 and DHCPv6 configuration data.
54+
55+
By default, all scopes are imported. A scope won't be imported if it already exists on the destination server. To specify only some scopes for import, use the **–ScopeId** parameter. For example:
56+
57+
```powershell
58+
Import-DhcpServer -ComputerName "dhcp-failover-server.contoso.com" -File "C:\exports\dhcpexport.xml" -BackupPath "C:\dhcpbackup\" -ScopeId 10.10.10.0,10.20.20.0
59+
```
60+
61+
This example imports the configuration data for scopes 10.10.10.0 and 10.20.20.0 from the specified file onto the DHCP server service that runs on the computer named **dhcp-failover-server.contoso.com**. If the export file contains scopes besides 10.10.10.0 and 10.20.20.0, those scopes are ignored. The DHCPv4 server level configuration data, if present in the export file, is also imported onto the DHCP server service.
62+
63+
> [!IMPORTANT]
64+
> Verify that options and settings on the failover server are correct before proceeding. Options such as DNS servers, reservations, or filters also might need to be updated on the failover server.
65+
66+
## Import server level settings to DHCP failover partner server
67+
68+
Use the following steps to import server-level settings from **dhcp-server.contoso.com** to the failover partner server **dhcp-failover-server-2.contoso.com**.
69+
70+
### Import server level settings
71+
72+
- At an elevated Windows PowerShell prompt on the failover partner server, type the following commands and press ENTER:
73+
74+
```powershell
75+
mkdir C:\dhcpbackup\
76+
Import-DhcpServer -ComputerName "dhcp-failover-server-2.contoso.com" -File "C:\exports\dhcpexport.xml" -BackupPath "C:\dhcpbackup\"
77+
```
78+
79+
The DHCP server’s database is backed up locally on the same server where the DHCP Server service is running even if you run the **Import-DhcpServer** cmdlet remotely.
80+
81+
## Configure DHCP failover
82+
83+
Next, configure DHCP failover for some or all scopes on **dhcp-failover-server.contoso.com**, specifying **dhcp-failover-server-2.contoso.com** as the failover partner server. For steps to configure DHCP failover, see [Configure DHCP Failover](/windows-server/networking/technologies/dhcp/manage-dhcp-failover-relationships?tabs=powershell#configure-failover-relationships) using either PowerShell or Server Manager.
84+
85+
## Update DHCP relay agents and complete migration
86+
87+
Finally, update [DHCP relay agents](/windows-server/networking/technologies/dhcp/dhcp-failover#relay-agents) to use the new DHCP servers and complete DHCP migration.
88+
89+
After leases and settings have been imported to the DHCP failover servers, settings are verified, and DHCP relays are updated, the migration is complete. You can stop the DHCP Server service on **dhcp-server.contoso.com**, and **dhcp-server-2.contoso.com** so that new DHCP leases are only issued from the DHCP failover servers.
90+
91+
## Related content
92+
93+
- [DHCP failover overview](/windows-server/networking/technologies/dhcp/dhcp-failover)
94+
95+
- [Manage DHCP failover relationships](/windows-server/networking/technologies/dhcp/manage-dhcp-failover-relationships?tabs=powershell)

WindowsServerDocs/networking/toc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ items:
264264
href: technologies/dhcp/dhcp-failover.md
265265
- name: Manage DHCP failover relationships
266266
href: technologies/dhcp/manage-dhcp-failover-relationships.md
267+
- name: Migrate to DHCP failover
268+
href: technologies/dhcp/migrate-to-dhcp-failover.md
267269
- name: Replicate DHCP failover settings
268270
href: technologies/dhcp/replicate-dhcp-failover.md
269271
- name: DHCP failover events

0 commit comments

Comments
 (0)