Hi
I look after a network with a single Win 2012 server acting as DC, DNS and DHCP server.
The DHCP server provides addresses in the range 192.168.1.1-254
192.168.1.1-119 are excluded to provide for printers, switches, WAPs, IP phones etc
192.168.1.245-254 are excluded to provide for remote dial in clients
I am getting warning messages in the event log that only 20 IP addresses remain for allocation.
I’ve not had to concern myself with this number of IP addresses on other networks I work with.
In order to get more IP addresses available can I simply extend the scope by changing the End IP address from 192.168.1.254 to 192.168.2.254 ?
If I do that in the scope properties but without hitting ‘apply’ as I don’t want to screw anything up, the subnet mask (which is greyed out at 255.255.255.0 Length 24) does not change. Should the subnet mask be something other than 255.255.255.0 so that devices with 192.168.1.x addresses can see devices with 192.168.2.x addresses and vice versa?
OR…
Could I just add another scope of 192.168.2.1-254 which I then allocate using Reserved IP addresses to the VoIP phones / Tel Exchange on the network? If I do this, how do I stop a PC from being allocated a 192.168.2.x address which would give me the subnet mask problem mentioned above. Just limit the range for distribution to the physical number of VoiP devices? This seems a tad clunky?
@Microsoft
10 Spice ups
DoctorDNS
(DoctorDNS)
2
You have some challenges here!
If you just extend the subnet mask to /23 (thus allowing extra addressess), and create two scopes (one for 192.168.0.XXX and the other for 192.168.1.xxx). But if you do this most of your clients on the .1 subnet will get very confused as those on the.1 subnet won’t be able to see those on the .0 subnet.
What you can do is this:
-
create two scopes (one for the .1 subnet, the other for .0).
-
On the router, ensure that .1 and .0 route to each other.
This means if you get an address on the .0 subnet, your traffic for something on the .1 subnet will always go via the router. This slows things up a little bit for such traffic, but most client trafic is likely to be for somewhere else.
Alternatively, you could just extend the DHCP subnet mask to, say 255.255.254.0 and have much bigger subnet. You will need to do some re-configuration on static IP addressed systems.
1 Spice up
Thanks for the response tfl.
My original thought was to change the subnet mask to 255.255.254.0 as I thought this would address my issue.
But I cannot see where to do this? The mask is greyed out in the Scope properties. By re-configuration on systems with static IP addresses you mean change the subnet mask?
1 Spice up
kkyishkkii
(Kkyishkkii)
4
1 Spice up
DoctorDNS
(DoctorDNS)
5
TO change the subnet mask, you need to remove then re-create the DHCP scope.
DoctorDNS
(DoctorDNS)
6
But you don’t have to change your subnet mask - just get the router to route the .1 subnet to the .0 and vice versa. Remember most client traffic will NOT be between these subnets, so the extra traffic is trivial.
Looks Perfect! Just what I’m looking for – I think!
But trying to follow the instructions I get errors 
Using Powewrshell:
PS C:\Users\Administrator> netsh dhcp server\“192.168.1.2” scope"192.168.1.0" dump>C:\BeaufortNetworks\dhcp.txt
The following command was not found: dhcp server\192.168.1.2 scope192.168.1.0 dump>C:\BeaufortNetworks\dhcp.txt.
PS C:\Users\Administrator> netsh dhcp server “192.168.1.2” scope “192.168.1.0” dump>C:\BeaufortNetworks\dhcp.txt
Changed the current scope context to 192.168.1.0 scope.
The following command was not found: dhcp server 192.168.1.2 scope 192.168.1.0 dump>C:\BeaufortNetworks\dhcp.txt.
I’ve tried
netsh dhcp server “192.168.1.2” scope “192.168.1.0” dump>C:\BeaufortNetworks\dhcp.txt
netsh dhcp server \“192.168.1.2” scope “192.168.1.0” dump>C:\BeaufortNetworks\dhcp.txt
netsh dhcp server \“oc-server” scope “192.168.1.0” dump>C:\BeaufortNetworks\dhcp.txt
All essentially give the same error - “The following command was not found…”
Obviously I’m missing something basic here as this is supposed to be "
“How to Easily change a DHCP’s Scope Subnet” 
Dashrender
(Dashrender)
8
Are you running this from a Powershell prompt?
You can’t just click start > run and type cmd, then type this command. You need to be in powershell.
When I ran this command on my workstation I got
Changed the current scope context to 172.16.1.0 scope.
like you did, you need to run this on the server that houses DHCP.
Yes - I am running in Powershell on the Server providing the DHCP
The problem is that PS does not seem to recognise the rest of the command to dump the DHCP info to text file.
Found that netsh dhcp server dump > c:\beaufortnetworks\dhcp.txt DID output a text file that contains a load of netsh dhcp commands that look like they create a new scope.
I found the line
Dhcp Server \OC-Server.oldercare.local add scope 192.168.1.0 255.255.255.0 “Oldercare network” “”
which I changed to
Dhcp Server \OC-Server.oldercare.local add scope 192.168.1.0 255.255.254.0 “Oldercare network” “”
When I have the time to be on hand and fix any errors that may result I’ll run If
netsh exec c:beaufortnetworks\dhcp.txt HOPEFULLY that will achieve what I need.
If it does @kkyishkkii I’ll give you Best Answer. And may even buy you a beer if we can arrange a get together 
Just found this : Increase the number of IP addresses on a subnet - Windows Server | Microsoft Learn
Looks like Supercsoping may be simpler : tfl - you alluded to this I believe. Just have to figure how to configure the router!!
Dashrender
(Dashrender)
11
Superscoping does require that your router supports it though. Currently you don’t appear to have but one network, so a firewall is routing between your internet connection and your internal network. Your firewall might not be able to superscope for you.
I solved this year ago buy using one of my Layer 3 switches as an internal router, and had a rule on that switch, that any packets destine for an outside network were sent to the firewall. You’ll also need to let your firewall know that any traffic destine for networks behind your new ‘router’ how to get there.
chamele0n
(Chamele0n)
12
According to the documentation: Netsh commands for DHCP: Dynamic Host Configuration Protocol (DHCP); Scripting | Microsoft Learn
The command should be:
netsh dhcp server SERVERNAME scope 192.168.1.0 dump > \\Backup\Dhcp\Scopecfg.dmp
Where SERVERNAME is either the NetBios/DNS name or the IP of the server.
This will dump the configuration to a file on a remote server. You can replace \Backup\Dhcp\Scopecfg.dmp with something like C:\Backup\Scopecfg.dmp to save it to your local computer.
Dashrender
(Dashrender)
13
OK now I’m curious, why can’t I run this command from a remote machine?
When I run
netsh dchp server \\servername scope 192.168.1.0 dump
what I get back is
Changed the current scope context to 192.168.1.0 scope.
and then a prompt. It’s not dumping the information from the server.
Adding > path/file does nothing but dump that same output into a file I specify.