Link to home
Create AccountLog in
Avatar of Donna Johnson
Donna JohnsonFlag for United States of America

asked on

How to migrate DHCP configuration from two DHCP servers configured for failover hot-standby?

How to migrate DHCP configuration from two DHCP servers configured for failover hot-standby?


Are there any good articles, documentation, videos on how to migrate DHCP configuration?

Existing environment:

1) Two DHCP servers running Window Server 2016 Standard where each scope is configured with DHCP failover in stand-by mode.  

2) Need to standup a third (new) DHCP server with the same scope configurations as the two current DHCP servers.

3) Need to decommission one of the original two DHCP servers that is already a member of the failover.

What is Microsoft best practices to accomplish this?

Do we need to break the failover relationship prior to starting this project?

Thank you

Avatar of Robert
Robert
Flag of United States of America image

When you configure failover in DHCP it should automatically send the main servers DHCP configuration to the failover server.
As far as I know you can only have 2 servers in this configuration I know you used to be able to do full DHCP failover clustering but I haven't looked into this in a few years.
So basically you would need to remove the other server from the failover configuration then add the new server in the wizard. 
Using PowerShell or CMD on the primary and destination:
# Migrate DHCP

# TODO Export
$OldDHCPServer = "MY-OldDC"
$Domain = "DOMAIN.Com"
Export-DhcpServer -File C:\DHCPdata.xml -Leases -Force -ComputerName "$($OldDHCPServer).$($Domain)" –Verbose

# TODO Import
$NewDHCPServer = "MY-TempDC"
$Domain = "DOMAIN.Com"
Import-DhcpServer -File C:\DHCPdata.xml -BackupPath C:\DHCP\ -Leases -ScopeOverwrite -Force -ComputerName  "$($OldDHCPServer).$($Domain)" –Verbose

# Using CMD
netsh DHCP server export C:\dhcp.txt

netsh DHCP server import C:\Temp\dhcp.txt

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Hello There
Hello There

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Donna Johnson

ASKER

What would you do differently if you wanted to keep the same IP address on the new server? I know I would have to change the IP address on the second server to DHCP and assign the IP address to the 3rd server but would I have to do anything else?

Regards
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Just to make sure, I would do this in the order below?

1. Break the DHCP failover
2. Change the IP's
3. Prepare a third DHCP server and install the DHCP role
4. Stop DHCP on the second DHCP server
4. Authorize DHCP on the third server
5. Configure the DHCP failover

Correct (note that you could technically unauthorize / stop DHCP on the second server right after you break the failover. However the order you provided/listed would also work. 
  1. Break the DHCP failover.
  2. Stop DHCP on the second DHCP server.
  3. Change the IP's
  4. Prepare a third DHCP server and install the DHCP role
  5. Authorize DHCP on the third server
  6. Configure the DHCP failover
So is the above correct? Sorry for all the questions but we have never done this before and don't want to break DHCP.
Yes the order you provided will work.