Configure DHCP options using Netsh

You can use the Netsh command to configure DHCP options from the command line. DHCP options are additional information a DHCP server provides to clients that lease addresses. This additional info typically includes the default gateway address, DNS server addresses, DNS domain names, and WINS server addresses. DHCP options can be configured at the server, scope or reservation level.

For example, to configure a scope option that assigns 10.10.20.1 as the default gateway address to clients that lease addresses from the 10.10.20.0 scope, use the following command:

netsh dhcp server scope 10.10.20.0. set optionvalue 003 IPADDRESS 10.10.20.1

To verify the result, type this command:

netsh dhcp server scope 10.10.20.0 show optionvalue

If you want to assign the option at the server level instead of the scope level, use this instead of the first command above:

netsh dhcp server 10.10.20.0 set optionvalue 003 IPADDRESS 10.10.20.1

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top