Solved

Increase DHCP numbers

Posted on 2010-09-03
21
883 Views
Last Modified: 2012-05-10
I have a current DHCP scope of 192.168.1.X with a subnet of 255.255.255.0. I am planning to increase the DHCP capacity by changing the subnet to 255.255.252.0. I recently moved the current DHCP server from a 2003 server to a 2008 server. I have already changed all the static devices. I think I need to unauthorize the current server. change the subnet and reauthorize. If I do this will I lose my reservations? Is there an easy way to do this? I am new to 2008. So far everything I have done has gone without a hitch. I want to keep it that way. Thanks in advance for your help and advice.
0
Comment
Question by:old_hickory
  • 11
  • 10
21 Comments
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
Here's the process I always use to move DHCP scope from an old server to new.  (2003 > 2003 -or- 2003 > 2008 -or-2008 > 2008).  This copies the entire DHCP database from old to new server.  It will keep all your scope and reservation settings.

On oldserver:
 run from command promp: netsh dhcpserver export C:\dhcp.txt all
Copy dhcp.txt to new server

On newserver:
netsh dhcp server import <path to dhcp.txt> all
Authorize new server

Stop DHCP on old server, set service to disabled

Update scope as needed to reflect new subnet and any other changes, for example change DNS to reflect newserver as primary, oldserver as secondary if new server is primary DNS


Reference:
http://blogs.technet.com/networking/archive/2008/06/27/steps-to-move-a-dhcp-database-from-a-windows-server-2003-or-2008-to-another-windows-server-2008-machine.aspx
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
edit - the command on oldserver should be:

netsh dhcp server export C:\dhcp.txt all

space between dhcp and server...
0
 

Author Comment

by:old_hickory
Comment Utility
This is what I did to move the DHCP from the old server to the new server. I want to change the subnet to make more IP numbers available. Thanks for your comment.
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
Ah, I see what you mean.  As far as I know, you have to delete the scope and recreate it in order to change subnet.  This would also mean you have to recreate your reservations.

See this link for some other insight in how best to hand out the new scope by reducing lease time and minimize conflict by hforcing DHCP to check for IP's in use:

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_22450986.html
0
 

Author Comment

by:old_hickory
Comment Utility
So there is not an option to export the reservations from a 2008 server and import them into the new scope?? They have to all be entered again manually?
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
Give this a shot:

Stop DHCP service on newserver
Dump config to a text file on oldserver : netsh dhcp server \\yourservername dump >c:\config.txt
Delete everything except the lines "under "Start Add ReservedIp to the Scope" towards the end
***Make sure to change the DHCP Server IP to reflect your newserver
Import the modified config.txt on new server : netsh dhcp server \\yourservername import config.txt
Restart the DHCP service.


0
 

Author Comment

by:old_hickory
Comment Utility
OK. newserver and oldserver are the config before and after the new scope is created. I have not used netsh before. Is that at the command prompt? It looks like a good solution. I just need a little more help.
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
Yup, netsh is from the command line.  

Edit the steps in my last comment.  I think you can import the entire scope this way, and update the subnet while keeping your reservations.

Also note, the "import" command should be:
netsh exec c:\config.txt

You could try these modified steps:
- delete scope on the 2008 newserver
- stop DHCP service on 2008
- on 2003:  netsh dhcp server \\yourservername dump >c:\config.txt
- edit this dump file ---Search and replace 2003oldserver IP with 2008newserver IP, then find the "start Add Ipranges" line and change your submnet mask right there.
- Carefully look through the dump and make any other changes you need to.
- import edited config.txt onto 2008newserver: netsh exec c:\config.txt
- restart DHCP service

in theory this will bring your entire dhcp scope, with modified subnet, and all reservations.
0
 

Author Comment

by:old_hickory
Comment Utility
I really appreciate the time you are taking to help me through ths. Currently here is only one DHCP server. I already moved to the 2008 server, so there is no 2003 server involved any longer. Would the dump command be different on 2008? I set my lease times to 8 hours. I will be doing this tomorrow.

Thanks again for helping me.
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
No problem.  Hopefully this will work for you.  Ok, I see.  You have DHCP on 2008 with the correct reservations, but want to change the subnet.  This scope was previously moved from 2003, and 2003 no longer exists.

I would do this:

1. backup existing DHCP database (current scope, reservations, and 255.255.255.0 subnet):
       netsh dhcpserver export C:\dhcp.txt all
2. dump existing DHCP to file:
       netsh dhcp server \\yourservername dump >c:\config.txt
3. Edit the config.txt.
       - You shouldn't have to worry about the server IP fields since this is the same server.
       - Just update the subnet mask
4. Delete existing, active DHCP scope through DHCP MMC. (you have a full backup as taken in step 1 that will at least get you back to current status with the 255.255.255.0 subnet if need be)
5. Stop DHCP Service
6. import edited dump file:
       netsh exec c:\config.txt
7. Restart DHCP

This should configure the scope with the new subnet and keep your reservations.

If that doesn't work, I'm out of ideas, and you'll probably have to recreate the scope and all the reservations.


 


0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
edit - damn, the command in step 1 is:

netsh dhcp server export C:\dhcp.txt all

that damn space between dhcp and server gets me every time...
0
 

Author Comment

by:old_hickory
Comment Utility
I ran step 1, but it is only partially readable. I can sort of see some of the info, but not enough to edit it.
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
step 1 is a full backup of the DHCP database - not editable.  Get that file and put it somewhere safe.

Step 2 is the file you want to create to edit and re-import in step 6
0
 

Author Comment

by:old_hickory
Comment Utility
Here is the spot I think I should edit by changing the 0.0.0.0 to 255.255.252.0. Why does it not show 255.255.255.0, which is the current subnet?

# =====================================
#     Add Optiondef                    
# =====================================


Dhcp Server \\myserver Add Optiondef 121 "Classless Static Routes" BINARY 0 comment="Destination, mask and router IP addresses in priority order"
Dhcp Server \\myserver Add Optiondef 1 "Subnet Mask" IPADDRESS 0 comment="Subnet mask in network byte order" 0.0.0.0
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
Mine reads the same for that line.  I think you want to edit the subnet a few lines lower - here:

# =====================================
#     Add Scope                        
# =====================================

Dhcp Server 192.168.0.20 add scope 192.168.0.0 255.255.255.0 "FMB" "FMB Scope"
Dhcp Server 192.168.0.20 Scope 192.168.0.0 set state 1

Those are my IP's and FMB is my network and scope, so you should only have to change the 255.255.255.0 to 255.255.252.0.
0
 

Author Comment

by:old_hickory
Comment Utility
Found it.. great.. I will try this tomorrow and let you know how it goes. Thanks agian
0
 

Author Comment

by:old_hickory
Comment Utility
Well, it didn't work. I guess I will have to recreate everything. I got the message."Unable to determine the DHCP server version for the server 192.168.1.7. Server may not function properly."

When I opened DHCP there was nothing there.

Thanks for all your efforts.
0
 
LVL 4

Expert Comment

by:jffrybauer
Comment Utility
hmm...

This is from an MS KB, and applies to 2003, but try the import with the DHCP service started.  If you don't get any errors, do a restart on th DHCP service.  

And make sure the account you are logging in with is a direct memeber of the Administrators group, not a member of a group that is in the Administrators group.

http://support.microsoft.com/kb/325473

0
 

Author Comment

by:old_hickory
Comment Utility
Sorry, I already created a new scope. It is working fine with one exception. I am trying to disable ipv6 in DHCP. I have found registry edits online to disable ipv6, but am not sure what that will do to DHCP. Or, should i go ahead and set it up. I know very little about ipv6. Remember this is 2008.

I thought I accepted your solution, but it doesn't show as accepted.
0
 
LVL 4

Accepted Solution

by:
jffrybauer earned 500 total points
Comment Utility
You probably don't want to straight out disable ipv6 on server 2008.  It can have an effect on other things, like Peer-to-Peer networking platform, and who knows what else...

I don't think you'll like this answer, but i think ipv6 has to be disable during the install of DHCP.  When you run the Manage Server > Add Role > DHCP Wizard, there's an option to disable ipv6.  I don't think you can re-reun the wizard.  I think you'd have to remove dhcp, then go through the wizard making sure to disable ipv6.  You might want to do some googling on that to make sure.  Hopefully I;m wrong...

You may be able to take backup of your current dhcp db with the correct reserevations, remove dhcp and re-insyall w/o ipv6, then import your DB to try to keep everything.  Not sure if that will work, but worth a try.
0
 

Author Closing Comment

by:old_hickory
Comment Utility
I really appreciate the help, but I ended up creating a new scope and adding the reservations manually.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Ever wondered why you had to use DHCP options (dhcp opt 60, 66 or 67) in order to use PXE? Well, you don't!
A Cisco router can be configured as a DHCP Server. There are advantages and disadvantages in making your Cisco router work as DHCP Server. Almost all the features for windows DHCP can be configured on Cisco-based DHCP server. Some of the features me…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now