Link to home
Start Free TrialLog in
Avatar of J.R. Sitman
J.R. SitmanFlag for United States of America

asked on

How do you change the subnet mask for the entire domain?

I need to change our subnet mask from 255.255.255.0 to 255.255.0.0.  I know for all the static equipment I have to do it manually, so my question is how do I do it so it gets applied to the entire domain.
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

What are you using for a DHCP server?  You would make the change there.
In newer Windows servers, you will find it under the General Properties of the Scope in the DHCP manager.  You will likely have to delete and recreate the scope to change the netmask.
Once a scope is created then you can't change the subnet mask - you have to delete the scope and recreate it with the new mask
ASKER CERTIFIED SOLUTION
Avatar of Stelian Stan
Stelian Stan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SetStaticIP.ps1
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.EnableStatic($wmi.IPAddress[0], "255.255.0.0")
$wmi.SetGateways("$wmi.DefaultIPGateway, 1)

Open in new window

Avatar of J.R. Sitman

ASKER

Ok I under stand what needs to be done.

@clonyxlro please clarify "It also require you to change all subnet host and gateway.
while creating the new scope I got the attached error.  Should I deactivate the existing scope first?
dhcp.png
Should I also change the subnet mask of the DHCP server first?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your new scope overlaps the old one, so delete the old scope first.
Thanks to all.  It worked