How to increase scope (change netmask) in windows server 2012
As you may have noticed, there is no easy way to change the netmask of a scope. The only way is to delete and recreate it.
If you have a network anywhere near as complex as the one I’m dealing with right now, you KNOW manual insertion is not even remotely an option. Luckily there is an easy way…. command prompt 🙂
Step 1. open up cmd as administrator and export your scope
The command is:
C:>netsh dhcp server \dhcp_server_name scope my_scope dump>c:dhcp.txt
eg. C:>netsh dhcp server \dc1 scope 192.168.1.1 dump>c:dhcp.txt
Step 2. Open that document and find the line saying
Dhcp Server \xyz.domain.local add scope 10.0.10.0 255.255.255.0 “scope_name” “scope_description”
and change the netmask to whatever you wish it to be… In my case I changed to 255.255.254.0 for an extra 255 Ip addresses so instead of 192.168.1.1-254 I have 192.168.1.1 – 192.168.2.254
Step 3. Delete your scope…
Yes, delete your scope… Be sure that you have opened up the dhcp.txt and confirmed that all your reservations and other configurations are stored in there. (Note. delete using the default GUI MMC console)
Step 4. Import modified scope.Â
I called my modified scope dhcp_custom.txt and so I will import it with
C:>netsh exec c:dhcp_custom.txt
done and done!!Â
Should the 255.255.255.254 really be 255.255.254.0?
You’re right! can’t believe that error has been there for 5 years..
fixed