Recipe 14.3. Configuring Server OptionsProblemYou want to configure DHCP options at the server level. These server options will be applied to all of the scopes on the server unless overridden within a scope. SolutionUsing a graphical user interface
Using a command-line interfaceThe following command configures a server option: > netsh dhcp server \\<ServerName> set optionvalue <OptCode> <DataType> <OptValue> In the following example, the "domain name" option (code 015) is configured with a value of "rallencorp.com" on the DHCP server named dhcp01: > netsh dhcp server \\dhcp01 set optionvalue 015 STRING rallencorp.com You can view all of the server options that have been configured with this command: > netsh dhcp server \\<ServerName> show optionvalue Using VBScriptSee the Introduction for more information on how to run the netsh command from within a script. DiscussionWhen a DHCP Server responds to a client request for a lease, the server also responds with any configured options for the scope. Options are nothing more than bits of configuration information, such as the servers to use for name resolution, the default domain name, default router, etc. Some options may be specific to a particular scope, for example, the default router for a subnet; these options are called scope options. Other options may be more global, such as the default domain name; these options are called server options. If you have more than a handful of scopes to configure global settings on, it can be tedious to change them later if you've configured them individually as scope options. This is where server options come in. Instead of configuring the default domain name option on each individual scope, you can configure it at the server level. All scopes will then use this server option. You can override any server options by configuring the same option on a scope. See AlsoRecipe 14.8 |