Edit subnet mask or scope in dhcp server running in windows server - Solved

Copper Contributor

it's not possible to directly change the subnet mask of an existing DHCP scope in a running Windows DHCP server.

Here are the steps:

1. Export the Existing Scope Configuration:

  • Open a command prompt with administrative privileges.

  • Type the following command to export the scope configuration to a text file:


    netsh dhcp server \\<DHCP_Server_Name> scope <Scope_IP_Address> dump > C:\dhcp.txt


2. Modify the Configuration File:

  • Open the dhcp.txt file in a text editor.
  • Locate the line that specifies the subnet mask (e.g., SubnetMask
  • Change the subnet mask to the desired value.
  • Save the changes to the file.

3. Delete the Old Scope:

  • In the DHCP management console, right-click the scope you want to modify and select "Delete."

4. Import the New Scope:

  • In the command prompt, type the following command to import the modified configuration:


    netsh exec c:\dhcp.txt

5. Verify the Changes:

  • In the DHCP management console, check if the scope has been re-created with the new subnet mask.
  • Right-click the scope and select "Properties" to confirm the subnet mask change.

(Major Point - Ensure that your existing network address and subnet network address remain the same after making changes. If they are not the same, you need to modify the entire network address in the text file. For example, if the original subnet is and the network address is, and you change it to, then the network address should also be updated to Therefore, you must replace all instances of with in the entire text file (using Ctrl+H for the replacement).

Thats it....

0 Replies