Welcome to TechNet Blogs Sign in | Join | Help

Microsoft Windows DHCP Team Blog

The world's most deployed DHCP Server! Deploy and discuss about your fav. server, here!
Migration of DHCP Server from Windows Server 2003 to Windows Server 2008

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.

Prasad

DHCP Server Team

Posted: Wednesday, February 18, 2009 4:34 PM by teamdhcp
Filed under: ,

Attachment(s): DhcpMig.zip

Comments

Gis Bun said:

Does the script work from Server 2003 to another Server 2003? We're decomissioning a server soon.

# February 18, 2009 1:51 PM

teamdhcp said:

Hey Gis,

You could try Backup Restore if not migrating across different server versions.

Raunak Pandya

DHCP Server Team

# February 19, 2009 12:50 PM

Gis Bun said:

But I'll assume the above procedure also works?

# February 19, 2009 1:03 PM

Rookie_ee said:

Hi Gis, I use this netsh method to backup (and restore to the new server if needed) Windows 2003 DHCP server. It works, tested.

# February 20, 2009 6:47 AM

Abdul Rahiman said:

I don't think it works from win2k3 to win2k8 Server Core. Some one can test it out.

Thanks

Abdul Rahiman

# March 6, 2009 12:41 AM

teamdhcp said:

Hi Abdul,

Are you talking about the migration script?

Can you please send me the copy of the error message you got so that I can look into that?

I tried once today and the migration succeeded.

Thanks,

Pandian

DHCP Server Team

# March 6, 2009 5:27 AM

teamdhcp said:

Watch the demo of DHCP Server migration using the new Server Migration Tools on Windows Server 2008 R2 http://edge.technet.com/Media/Migrating-DHCP-using-the-Windows-Server-2008-R2-Migration-Tools/

Thanks,

Prasad

# April 13, 2009 8:13 AM

Mickey said:

Hi,

what are the differences between export/import and backup/restore?

# May 13, 2009 10:09 AM

teamdhcp said:

Export/ Import is the way to migrate from one OS version to another. Backup restore is supported only across similar OS versions.

Thanks

Raunak Pandya

DHCP Server Team

# May 13, 2009 1:25 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker