Windows DatabaseebooksStatistical Information

LWE10072 : Howto configure a dhcp server from the command line or from a remote system

Symptom:

You need to script your dhcp server configuration

Cause:

none

Solution:

You can use a command line or create a cmd file and execute it accordingly.
In the following commands the DHCP server is 10.1.1.10, the Router is 10.1.1.1 and the range we want to create runs

from 100 till 200. The DNS servers are 10.1.1.2 and 10.1.1.3.


netsh Dhcp Server 10.1.1.10 add scope 10.31.0.0 255.255.255.0 "Lubby DHCP Range" "Lubby DHCP Range"
netsh Dhcp Server 10.1.1.10 Scope 10.1.1.0 set state 0
netsh Dhcp Server 10.1.1.10 Scope 10.1.1.0 Add iprange 10.1.1.100 10.1.1.200
netsh Dhcp Server 10.1.1.10 Scope 10.1.1.0 set optionvalue 51 DWORD "691200"
netsh Dhcp Server 10.1.1.10 Scope 10.1.1.0 set optionvalue 3 IPADDRESS "10.1.1.1"
netsh Dhcp Server 10.1.1.10 Scope 10.1.1.0 set optionvalue 6 IPADDRESS "10.1.1.2" "10.1.1.3"

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics