Configure DHCP options using Netsh

| | No TrackBacks

DHCP configuration can be changed not only from default configuration GUI-type application, but also from command line. This is especially useful when applying dynamic changes to DHCP, for testing or other purposes.

It can also be used by unattended DHCP control (e.g., to force DHCP server to provide certain given parameters such as gateway address) to the served network.

DHCP options that can be configured from command-line are pieces of additional information the DHCP server provides to clients leasing addresses. They can be configured at server, scope or reservation level.

To configure a scope option that makes IP 10.50.10.1 the default gateway address to clients that request addresses from the 10.50.10.0 scope, use the following command:

netsh dhcp server scope 10.50.10.0. set optionvalue 003 IPADDRESS 10.50.10.1

After issuing the command, verify the result:

netsh dhcp server scope 10.50.10.0 show optionvalue

To assign the option at the server level rather than at the scope level, use the following command instead:

netsh dhcp server 10.50.10.0 set optionvalue 003 IPADDRESS 10.50.10.1

No TrackBacks

TrackBack URL: /blog/mt-tb.cgi/5

blog comments powered by Disqus

About this Entry

This page contains a single entry by Konstantin Boyandin published on November 30, 2009 4:25 PM.

Backing up DHCP database using Netsh was the previous entry in this blog.

Authorizing a DHCP server using Netsh is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.