HOWTO: Import and Export DHCP reservations in server 2003

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.

Advertisements
This entry was posted in HOWTO's, Microsoft. Bookmark the permalink.

38 Responses to HOWTO: Import and Export DHCP reservations in server 2003

  1. Maximus says:

    I would like to see a continuation of the topic

  2. koolbeans says:

    Have anything in particular in mind?

  3. hadit says:

    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 🙂

  4. hadit says:

    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!

  5. pepe says:

    Brilliant! Worked like a charm. Thanks!

  6. Dan says:

    This works for 08 as well just FYI

  7. Marco says:

    Thx, worked perfectly 🙂

  8. rush5150 says:

    I have been looking for this for sometime. God bless you…..

  9. Allan McMillan says:

    Hi, just seen this after having a bit of a nightmare with my DHCP database, it was something i overlooked in the backup schedule and lost the server, thankfully managed to export IP and MAC addresses from a netowkr monitor system and netsh them in as reservations via txt file so all was ok in the end.
    This is a great method to sync IP’s across 2 servers, is there anyway to batch file and automate this maybe?

    ****DHCP BATCH FILE START
    netsh dhcp server [ip address] scope [scope address] dump>reserv.txt

    EDIT THE RESERV.TXT FILE SOME WAY TO UPDATE DHCP TARGET SERVER IP

    netsh exec C:\reserv.txt

    ****DHCP BATCH END

  10. Fabiano says:

    ThanX man… It does helps a lot!!!

  11. rome says:

    Can anyone guide me how to do it on multiple scope and with reservation each scope?

    Thanks!
    R

  12. Marius says:

    For multiple scopes use:

    netsh dhcp server [ip address] dump>reserved.txt

    Don’t forget to replace the IP of the target server before running netsh exec.

  13. Pingback: How do I get Windows Server 2003 DHCP to hand out my newly-expanded Subnet Mask? Drija

  14. Calazas says:

    valew véio….rsrsrs

    Foi foda o comando…

  15. Rick says:

    Great info many thanks

  16. Alejandro Aguado says:

    Thanks for the info. One note, I migrate a W2003 to W2008 and have create the scope, not working. Delete the scope in the final server run the line and all Ok.

  17. Pingback: How do I get Windows Server 2003 DHCP to hand out my newly-expanded Subnet Mask? - Admins Goodies

  18. Ahmed El Shimy says:

    Thank You very Much …. 100% working.

  19. Steve Fuller says:

    Thanks a lot for this. We’re going through a dhcp scope consolidation and change right now and this saved me a lot of work.

  20. Pingback: techblaze

  21. Kevin says:

    Any idea what this will do with duplicate entries? Will it overwrite, ignore or actually duplicate an entry that already exists?

    • Kevin says:

      Nevermind. I shot from the hip and tried an import with known duplicates and they just error’d out. Sweet!

  22. For newest news you have to pay a visit world-wide-web and on world-wide-web I
    found this web site as a most excellent web site for latest updates.

  23. I visited several sites except the audio quality for audio songs current
    at this web site is in fact excellent.

  24. Pingback: How do I get Windows Server 2003 DHCP to hand out my newly-expanded Subnet Mask? - Just just easy answers

  25. liquidation says:

    They key is not how much the company will be productive paying dividends.
    Related ContentStory: Wilshire Grand closes doors
    after 59 years liquidation 4 less torrance The liquidation sale will continue until September or until all of the merchandise that is popular has been sold.
    This story is just one more indicator that gift cards are never a sure bet when it
    comes to inventory, buyers liquidation 4 less torrance and
    sellers.

  26. Valentin says:

    Greate article. Keep posting such kind of info on your page.

    Im really impressed by your site.
    Hey there, You’ve performed a fantastic job. I’ll definitely digg it
    and in my view recommend to my friends. I am sure
    they’ll be benefited from this site.

  27. China Vps says:

    Hello my friend! I wish to say that this article is amazing, great written and come with almost all significant infos. I’d like to look more posts like this .

  28. 7even says:

    Works with 2012 as well, and after then just right click the server and choose for replicating the scopes.
    that’s it.
    Thank you:)

  29. Hmm is anyone else having problems with the pictures on this blog loading?
    I’m trying to figure out if its a problem on my end or if it’s the blog.

    Any suggestions would be greatly appreciated.

  30. Hi, i read your blog from time to time and i own a similar
    one and i was just curious if you get a lot of spam feedback?

    If so how do you stop it, any plugin or anything you can recommend?
    I get so much lately it’s driving me mad so
    any help is very much appreciated.

  31. Very good info. Lucky me I recently found
    your site by accident (stumbleupon). I’ve saved it for later!

  32. Why viewers still use to read news papers when in this technological globe all
    is accessible on web?

  33. MW says:

    Great Info.. Thank you. We are prepping to migrate from 03 to 2012 and this is just what we needed..

  34. I was recommended this blog via my cousin. I’m not certain whether or not this publish is written by means of him as no one else recognize such certain about
    my difficulty. You’re incredible! Thanks!

  35. Roxana says:

    If somе one wishes expert vieա on thе topic of blogging afterward i advise him/her to viѕit this webpage, Keep up the plᥱasant work.

  36. You made some respectable points there. I appeared on the internet for the issue and found most individuals will go along with with your website.

  37. First of all I want to say fantastic blog! I had a quick question which I’d like
    to ask if you do not mind. I was curious to
    find out how you center yourself and clear your thoughts before writing.
    I have had a tough time clearing my thoughts in getting my thoughts out there.
    I truly do enjoy writing however it just seems like the first 10 to 15 minutes are generally lost just trying to figure out how to
    begin. Any recommendations or hints? Appreciate it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s