Network Guys

Share your knowledge!

Easy extend your IP-subnet

Hello guys!

Sometimes a /24 subnet is running out of free usable IP addresses and we need to extend the network. I want to show you how easy it is and what you have to keep in mind. First we need to plan our new network. The easiest way is to extend your current network, so you don’t have to change all of your devices. For example: We are currently running so we use the subnetmask We will extend this to /23 ( Keep in mind that you need to plan it right, because there are cases where you go up or down in your subnet-id. I suggest this online calculator:

For example:

  • to /23 =, subnetmask
    (usable IP addresses from to
  • to /23 =, subnetmask
    (usable IP addresses from to
  • to /22 =, subnetmask
    (usable IP addresses from to

We will go from to First we will export the Microsoft DHCP settings with this command (reserved-IPs are also getting exported):

netsh dhcp server dump all > c:\dhcp.txt

Delete your current DHCP scope and open the txt file with notepad, press Control+H and replace “Dhcp Server” with “netsh dhcp server”. Search for your current subnetmask and change it to Your subnet also needs to be replaced in the txt file, so press Control+H again to replace “” to “”.

After this, we need to manually change the iprange and excluderange (PUCK is my test-server ;-) ). Always use the full range, we will configure excluderanges at the start and the end of the subnet:

net dhcp server \\Puck Scope Add iprange
net dhcp server \\Puck Scope add excluderange
net dhcp server \\Puck Scope add excluderange

as you can see, our DHCP will return IP addresses from to In most cases, you can delete the areas with “classes”, “filter” and “options. Change the file ending from .txt to .bat and double click the file. You should now have your new DHCP scope:


after this you need to change the subnetmask of all devices with fixed IP-addresses:

  • firewall/gateway
  • all printers
  • all servers

The servers are running through so they don’t need a restart nor clients will have a disconnect. I’m always doing those changes within the customer working hours :-)


Have a nice day!

Leave a Reply

Click on the button to load the content from

Load content

This site uses Akismet to reduce spam. Learn how your comment data is processed.


ekahau Certified Survey Engineer
Post Categories
Post Archives