Recipe14.7.Activating or Deactivating a Scope


Recipe 14.7. Activating or Deactivating a Scope

Problem

You want to activate or deactivate a scope. A DHCP Server will not respond to lease requests for a given scope unless that scope is activated. When you deactivate a scope, you prevent clients from obtaining leases from it.

Solution

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. Expand the server in the left pane.

  5. Click on the scope you want to activate or deactivate.

  6. Right-click on the scope and select either Activate or Deactivate.

  7. Click Yes to confirm.

Using a command-line interface

The following command activates a scope:

> netsh dhcp server \\<ServerName> scope <SubnetID> set state 1

And this command deactivates a scope:

> netsh dhcp server \\<ServerName> scope <SubnetID> set state 0

Using VBScript

See the Introduction for more information on how to run the netsh command from within a script.

Discussion

Once you create a scope, you have to activate it before clients can obtain leases from it. But before you activate a scope, be sure to configure any necessary scope options. If you activate a scope before configuring options, clients may obtain leases, but still not be able to communicate on the network if settings such as the default router are not set.

Deactivating a scope is an easy way to disable a scope temporarily. Clients will still be able to use their existing lease, but will not be able to renew it.


See Also

Recipe 14.5 and Recipe 14.8



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net