Migrating DHCP Servers

  • Post author:
  • Post category:Software

With server hardware and operating systems reaching end of life, one of the Windows server roles that you may need to migrate is the DHCP role. This can be a simple task, depending on the complexity of your DHCP configuration. You may be able to manually recreate the scopes on the new server if you only have 1 or 2 scopes, but if you have numerous scopes with many reservations, you might be better served exporting and importing the configuration.

Export the Configuration

In the DHCP console, right-click on the server, and choose Backup. Choose your destination folder, and click ok.  Verify the file was created in the backup destination you chose. You could also use the EXPORT command via PowerShell to accomplish the same task.

Export-DhcpServer -ComputerName “servername.domainname.com” -Leases -File “C:\DHCP\OldDHCPConf.xml” –Verbose

Install the DHCP Role

On your new server, open Server Manager, then choose Add Roles and Features. Under the Server Roles page, select DHCP server, and install. A reboot should not be required to install the DHCP role.

Import the Configuration

From your old server, copy the DHCP backup file to a folder on your new server. In the DHCP console on the new server, restore the DHCP scope from the file copied. Once restored, right-click on the server name and select Authorize. You can also use the IMPORT command via PowerShell to accomplish the same task.

Import-DhcpServer -Leases –File “C:\DHCP\OldDHCPConf.xml” -BackupPath “C:\DHCP\Backup” –Verbose

If you have VLANs set up in your network, make sure to check all your relay devices and update the DHCP relay address to the new server. Make sure to check all of your switches, routers, firewalls, and wireless access points. This can be a crucial step that is often overlooked.

Clean up

Once you authorize your new DHCP server, go back and stop the DHCP services on the old server. You can reboot a few workstations for testing and confirm they are receiving DHCP information from the new server by reviewing the updated lease information. Once you confirm devices are successfully receiving leases from your new DHCP server, you can remove the role from the old server. In server manager, select Manage in the top right corner, then choose Remove Roles and Features. Uncheck the DHCP role, and it will be removed from the server. Again, no reboot is required.

Have any questions about how to migrate the DHCP role or about Windows Servers in general? Please contact our experts at any time!