HOWTO: Import and Export DHCP reservations in server 2003
Posted by koolbeans on July 31, 2007
Load-balancing your DHCP has been well documented, but the matter of synchronizing your IP reservations has always the fly in the ointment. But no more.
To export DHCP reservations, from the source server:
netsh dhcp server [ip address] scope [scope address] dump>reserv.txt
Open up ‘reserv.txt’ in a text editor, do a Find->Replace for the source server IP, change to the destination server IP. Trim out everything in the file except for the reservations themselves.
On the destination server, make sure your scope is already created, and run the following command:
netsh exec C:\reserv.txt
Tada. The only problem is that as your add more and more reservations, you’ll need to add them to each server that you are load balancing. It’s easier to do that than to do another export.
Maximus said
I would like to see a continuation of the topic
koolbeans said
Have anything in particular in mind?
hadit said
lets say you have to expand your scope because you are out of IP’s on your network.. and say you wish to export you old reserves from the original scope into the new expanded scope.. but using the commands above give you
“The scope parameter are incorrect. Either the scope already exists or it’s subnet address and mask is inconsistent with the subnet address and mask of the existing scope”
I did change the subnet of the new scope, so how does one import the reserves.?. please
hadit said
ok I got this to work by manually editing the exported txt file and first removing the information at the top that was to create the new scope, then changed the reservation scopes that were listed to reflect the new scope and it imported as it should.. always happens once you post something you figure it out.. hope it helps someone else out there
cheers!
pepe said
Brilliant! Worked like a charm. Thanks!
Dan said
This works for 08 as well just FYI
Marco said
Thx, worked perfectly
rush5150 said
I have been looking for this for sometime. God bless you…..