We recently migrated our Windows Server 2003 based DHCP Server to Windows Server 2008 R2 because I wanted to use Network Access Protection to improve our network security. After half an hour the software was installed and I started to configure the DHCP server. I quickly defined scope, NAP configuration, and all the other options and all I had left to do was move the DHCP reservations to the new server. I had no intention of transferring the addresses manually—it’s not that I am lazy, but copying and pasting many items is an error-prone process—and so I started looking for a migration tool.
- Set up a SharePoint 2010 development environment - Mon, Sep 3 2012
- MBAM 2.0 - BitLocker Administration and Monitoring changes in Windows 8 - Thu, Jul 26 2012
- BitLocker in Windows 8 - Thu, Jul 19 2012
Microsoft’s GUI for managing DHCP doesn’t provide any solution for this matter. Gladly I found a script called the DHCP Reservation Manager that does exactly what I needed: automatically migrate DHCP reservations. You can read about its features here. The tool offers four options:
- Migrate reservations from one DHCP server to another
- Synchronize reservations between two DHCP servers
- Dump leases
- Read reservations from a text file
In my case I just had to type the following command:
cscript rmanager.vbs Rmanager –migrate 192.168.1.1 192.168.1.2 all
The script correctly transferred all reservations to the new server. However, I realized that the script didn’t copy the description field of the reservations. As our organization no longer uses this field this was not a problem.
If you don’t want to synchronize every scope to another server, you can still use the tool because it allows you to identify which scopes to transfer. You can limit the scopes by adding them to the command:
cscript rmanager.vbs Rmanager –migrate 192.168.1.1 192.168.1.2 192.168.1.0 192.168.2.0 192.168.3.0
This command would add the reservations from the three subnets 192.168.1.0, 192.168.2.0, and 192.168.3.0 to the DHCP server. I don’t want to go into more detail here because the blog entry at blogs.technet.com is quite comprehensive.
This tool saved me a significant amount of time and made the migration as smooth as it can be. Everybody’s reserved IP address was retained after the old server was switched off. I doubt that this would have been the case if I would have moved them manually. Until Microsoft includes such a feature in the GUI, this tool is an acceptable alternative for managing DHCP reservations.