Monday 29 October 2012

Migrating DHCP scopes from Windows 2003 to Windows 2008 R2 server

In order to successfully migrate a DHCP server without disrupting the clients, you need to let the new server know about the current leases on the old server, otherwise it will lease the IPs that may already be leased by the old server. So it’s important to migrate the current leases as well as all the reservations.

If you configured IP Helper address on your switches, don’t forget to change it. On Cisco switches, it can be set by typing:

[no] ip helper-address ip_address

In order to migrate a DHCP server database with all leases and reservations between 2 Windows servers (e.g. the old one running Windows 2003 and the new one running Windows 2008 R2), simply export the entire DHCP database and import it to the new server.

On the old DHCP server run:
netsh dhcp server export c:\dhcp_config all

Copy the file over to the new server.

On the new DHCP server run:
netsh dhcp server import c:\dhcp_config all

Executing the netsh command will stop and restart the dhcp service.

If you get an error while importing the dhcp database “Error while importing option "6."”, just delete the existing options from the new server. 

If the new server is already hosting some scopes that don’t exist on the old server, or there are scopes on the old server that you don’t need on the new server, it’s possible to migrate only scopes you need on the new server.

On the old server, for each scope run:
netsh dhcp server export c:\scope_name scope_ip_address

Copy the file(s) over to the new server.

On the new server run:
netsh dhcp server import c:\scope_name scope_ip_address


More info:
Cisco Routing IP
How to move a DHCP database from a computer that is running Windows NT Server 4.0, Windows 2000, or Windows Server 2003 to a computer that is running Windows Server 2003
How to move a DHCP database from a computer that is running Windows Server 2003 to Windows Server 2008
Migrating DHCP scopes from server 2003 to 2008

No comments:

Post a Comment