Creating a Scope

A scope is group of settings that define how the DHCP Server is supposed to handle requests for a given network.

Before creating scopes, decide how you are going to manage them. Develop a naming convention for the scopes that make them easy to identify their networks. Use good descriptions. You may want to add contact information to the description of a specific scope if there are certain people you need to contact when problems arise on that network (e.g., running out of leases). Use contiguous IP address space as much as possible and avoid using excluded IP ranges to keep a straightforward scope layout.

Once you create a scope, you may need to do one or more of the following:

Activate the scope

When you create a scope, it is deactivated (or disabled) by default. You’ll need to activate it before the DHCP Server will start offering leases from it.

Create a superscope

If you’ve created this scope on a secondary subnet and plan to use it in addition to an existing scope on a single network, you’ll need to create a superscope and add both the secondary and primary scopes to the superscope.

Create reservations

If you plan on allocating IP addresses to your servers via DHCP, you may want to ensure they always receive the same IP address by creating reservations.

Configure scope options

With each scope, you can configure scope options to give out settings (e.g., default router) that are specific to a given network.

Using a graphical user interface

  1. Open the DHCP snap-in.
  2. In the left pane, right-click on DHCP and select Add Server.
  3. Type in the name of the DHCP Server you want to target and click OK.
  4. Right-click the server in the left pane and select New Scope.
  5. Click Next to begin the New Scope Wizard .
  6. Enter a name and description for the scope and click Next.
  7. Enter the beginning and end of the IP address range, the subnet mask, and bit length, and click Next.
  8. In the next screen, you can enter any IP addresses you want to exclude. Click Next after you are done or if you don’t need to add any exclusions.
  9. Enter the lease duration and click Next.
  10. You will now be presented with a choice to configure scope options. If you want to configure them, select Yes or No and click Next.
  11. If you selected to configure scope options, you will be presented with a screen to set the default gateway IP address for the scope. Click Next after you are done.
  12. On the next screen, you configure the default domain name and DNS servers to be used by clients of the scope. Click Next after you are done.
  13. Next, you can enter one or more WINS Servers. Click Next after you are done.
  14. The last screen allows you to activate the scope or leave it inactive. Click Next.
  15. Click Finish.

Using a command-line interface

It takes several commands to create and configure a scope. The following command creates a scope:

> netsh dhcp server add scope <SubnetID> <SubnetMask> "<ScopeName>" 
"<ScopeDescription>"

For instance, the following command creates a scope for the subnet 192.168.1.0:

> netsh dhcp server add scope 192.168.1.0 255.255.255.0 "Floor1" "Scope used for
desktop users on floor 1"

These next three commands configure an IP range, an excluded IP range, and activate the scope, respectively:

netsh dhcp server scope 192.168.1.0 add iprange 192.168.1.1 192.168.1.254
netsh dhcp server scope 192.168.1.0 add excluderange 192.168.1.1 192.168.1.10
netsh dhcp server scope 192.168.1.0 set state 1