Microsoft product support team often encounters migrated DHCP servers which are dysfunctional. The reason quite often for the bad state of the DHCP server is because backup/restore has been used by the customers for migrating the DHCP server across server versions (e.g. migrating from Windows Server 2003 DHCP to Windows Server 2008). Backup and Restore are not expected to work across server versions as the DHCP database format has changed between Windows Server 2003 and Windows Server 2008.
The recommended procedure for DHCP server migration is to use the export import commands through netsh. Following is the procedure for migrating DHCP server from Windows Server 2003 to Windows Server 2008 outlined in brief:
Export the DHCP database from the server that is running Microsoft Windows Server 2003
To migrate a DHCP database and configuration from a server that is running Windows Server 2003 to another server that is running Windows Server 2003:
1. Log on to the source DHCP server by using an account that is a member of the local Administrators group or the DHCP Administrators group
2. Click Start, click Run, type cmd in the Open box, and then click OK.
3. Type netsh dhcp server export C:\dhcpdatabase.dat all, and then press ENTER.
Note: While the export command runs, DHCP server is stopped and does not respond to clients seeking new leases or lease renewals.
At the end of this step, you will have the DHCP configuration as well as address lease information exported into the dhcpdatabase.dat file. You can now stop the DHCP service on the source server.
Install the DHCP server service on the server that is running Windows Server 2008
To install the DHCP Server service on an existing Windows Server 2008 computer:
1. Start Server Manager.
2. Click on Add Roles.
3. Select the DHCP server role and press Next.
4. Click through the next sequence for screens of the installation wizard to complete the DHCP server installation. You should not authorize the DHCP server at this point.
Import the DHCP database
1. Log on as a user who is a member of the local Administrators group or DHCP administrators group.
2. Copy the exported DHCP database file to the local hard disk of the Windows Server 2008 computer.
3. Verify that the DHCP service is started on the Windows Server 2008 computer.
4. Click Start, click Run, type cmd in the Open box, and then click OK.
5. At the command prompt, type netsh dhcp server import c:\dhcpdatabase.dat all, and then press ENTER, where c:\dhcpdatabase.dat is the full path and file name of the database file that you copied to the server.
6. After you receive the message that the command completed successfully, quit the command prompt.
Authorize the DHCP server
1. Click Start, point to All Programs, point to Administrative Tools, and then click DHCP. You must be logged on to the server by using an account that is a member of the Administrators group. In an Active Directory domain, you must be logged on to the server by using an account that is a member of the Enterprise Administrators group.
2. In the console tree of the DHCP snap-in, expand the new DHCP server. If there is a red arrow in the lower-right corner of the server object, the server has not yet been authorized.
3. Right-click the server object, and then click Authorize.
4. After several moments, right-click the server again, and then click Refresh. A green arrow indicates that the DHCP server is authorized.
While the netsh export command exports the lease database as well as the configuration of the DHCP server, the DHCP server registry settings are not handled by export/import. Attached with this post is a tool which will help you migrate all the DHCP configuration including the registry settings. Type dhcmpmig -help for usage information on the tool.
The scripted tool (bat file) is provided on an "as is" basis and not supported by Microsoft.
DHCP Server Team