Microsoft KB Archive/301366

= You Cannot Add the Scope Options by Using the Netsh.exe Tool After an Unattended Installation =

PSS ID Number: 301366

Article Last Modified on 10/21/2003

-

The information in this article applies to:


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server

-



This article was previously published under Q301366



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
If you install the Dynamic Host Configuration Protocol (DHCP) service, and you use Netsh.exe tool commands to configure the DHCP scope options before you open the Microsoft Management Console (MMC) and connect to the server, you can receive the following error message:

DHCP server scope set OptionValue failed. Error = The specified option does not exist.

NOTE: An administrator can use the Netsh.exe tool at a command prompt to configure and monitor Windows 2000-based computers.



CAUSE
This behavior can occur because after the DHCP service is installed, and before you open the DHCP MMC and connect to the server, all of the option definitions have not been created. You can verify under the following registry key that the Optioninfo key does not have any subkey for scope options, such as, 51 for the lease duration, 3 for the router, 6 for DNS server, 44 for Windows Internet Name Service (WINS) server, and so on:

HKEY_LOCAL_MACHINE/Software/Microsoft/DhcpServer/Configuration/Optioninfo

The option definitions are created when you click the server object in the DHCP MMC.



WORKAROUND
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To work around this behavior, configure the DHCP scope options, as demonstrated in the following example.

NOTE: You need to configure DHCP server 10.1.1.1 to change the default lease duration, (optionvalue 51), to a value = &quot;2,592,000&quot; seconds (which is 30 days).
 * 1) Create the Optioninfo 51 by using the following Netsh command:

dhcp server 10.1.1.1 add optiondef 51 &quot;lease&quot; dword 0 comment=&quot;client ip address lease time in seconds&quot; 0
 * 1) Change the lease duration to 30 days by using the following Netsh command:

netsh dhcp server 10.1.1.1 scope 10.1.1.0 set optionvalue 51 dword &quot;2592000&quot;



STATUS
This behavior is by design.



MORE INFORMATION
If you need to define the scope options without opening the MMC, for example, for an unattended installation, when it is necessary to install and configure the scope by only using scripts, you need to create the option definition by using the Netsh tool.

For more information about the Netsh.exe tool, at a command prompt, type: netsh help.

Keywords: kbenv kbprb KB301366

Technology: kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Search kbwin2000Serv kbwin2000ServSearch kbWinAdvServSearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.