In this series, Ideen Jahanshahi walks through migrating DHCP from an old environment to a new environment.
With Windows 2012 / Windows 2012R2 now offering a way to failover DHCP, many organizations have opted to migrate their DHCP functions from an older operating system. There are multiple, creative ways to handling a migration from an old server a new server; this article outlines one method of migrating all DHCP scopes from an existing server to a newly deploy Microsoft Windows 2012R2 Server.
This article is a continuation of the “Installing a DHCP Server on a Windows 2012/2012R2 Server” article.
Migrating DHCP to a New Server
In the example explained below, the server to be decommissioned is a Windows Server 2003R2 Standard (I will call this DHCP-Old) and will be migrated to a Windows 2012R2 Datacenter server (I will call this DHCP-New). The existing DHCP server is handling multiple scopes and multiple locations via an IP DHCP helper. To avoid having to adjust multiple routers with a new DHCP helper address or having to go through a complex migration process, I will be utilizing the same IP address on the new DHCP server.
Note that in the case explained below, an outage was not required due to how the business operates, having a secondary Domain Controller/Global Catalog server, and how the DHCP lease times were configured. Each organization is unique, so it is imperative that the needs of the business be evaluated before migrating any critical services or doing any work that may impact services.
Back Up the Existing DHCP Server
The first step will be to log on to DHCP-Old navigate to CONTROL PANEL > Administrative Tools > DHCP. Once the DHCP tool opens up, make sure that the server listed under DHCP is the server that needs to be backed up. By default, it should go to the correct server; if for some reason another server is showing up, right-click on DHCP and click Add Server.
Next, browse for old DHCP server:
Once the correct server is listed in the DHCP tool, right-click on the server name (blurred out in my example) and click Backup:
This will prompt for a location to place the backup. With Windows 2003/2003R2 machines, I have experienced issues with trying to backup the DHCP scope to the non-default directory. So, I went ahead and left the default options. The default folder is located at C:WINDOWSsystem32dhcpbackup.
Unauthorize the Existing DHCP Server
Since one of my requirements was to utilize the same server IP address on DHCP-New, I need to start prepping DHCP-Old and DHCP-New before migrating in the scope.
On DHCP-New, I copied the entire backup folder from DHCP-Old and dumped it on the desktop of DHCP-New.
I then logged back on to DHCP-Old, navigated to the DHCP tool, and went to Manage authorized servers by right- clicking on DHCP:
Next, unauthorize the old DHCP server. If this is the only/last DHCP server in the environment, the following list will be blank after removing DHCP-Old.
Next, document the IP address of DHCP-Old, then adjust the IP address of DHCP-Old to another address on the network. I suggest using a static IP address, for quick and easy access back to the server. In my particular case, I was able to decommission the existing Domain Controller roles by following my “Decommissioning a Windows 2003 or Windows 2008 Domain Controller” article.
Once that is complete, log back onto DHCP-New and adjust the IP address of DHCP-New to the IP address that was previously being used on DHCP-Old.
At this stage, DHCP-New can be authorized as a server (see steps to “Complete DHCP configuration” in the previous article).
Importing the DHCP Scope and Finalizing the Migration
Now that DHCP-New has been authorized, open up the DHCP tool. Right-click on the server and select Restore:
Next, select the location of your DHCP backup files. In my case, I had copied the files to the desktop of the new DHCP server:
A prompt may appear warning that the existing user has insufficient privileges. In my case, I was logged in as the Domain Administrator so the warning could be ignored:
As with many Windows Services, the DHCP service will need to be stopped and restarted as part of the restart process:
On a virtual machine, the process took a few minutes to complete:
Once the database has been restored successfully, a prompt will appear. If there is something wrong with the DHCP backup files, the process will fail out.
Monitoring the DHCP Server
Although the DHCP server was reporting that the database properly imported, I have observed multiple cases where steps were skipped that caused finicky behavior on the new DHCP server. In a multi-scope environment, I have seen some scopes not fully import, and issues do not come to light until after leases start expiring. I was fortunate enough for many environments to be able to delete the bad scopes and recreate them from scratch; however, this cannot be done in every environment. Make sure to test the environment after the migration as the old DHCP server may need to be reauthorized.