Changes

Configuring Windows Server 2008 DHCP Servers

1,784 bytes added, 19:12, 4 September 2008
Configuring Scopes at the Command Prompt
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 add iprange 192.168.2.1 192.168.2.100
 
Changed the current scope context to 192.168.2.0 scope.
 
Command completed successfully.
</pre>
 
To list a scope IP address range:
 
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 show excluderange
 
Changed the current scope context to 192.168.2.0 scope.
 
=========================================================
Start Address - End Address - Address type
=========================================================
192.168.2.1 - 192.168.2.100 - DHCP ONLY
 
Number of IP Ranges : 1 in the Scope : 192.168.2.0.
 
Command completed successfully.
</pre>
 
To delete a scope using netsh:
 
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 delete iprange 192.168.2.1 192.168.2.100
 
Changed the current scope context to 192.168.2.0 scope.
 
Command completed successfully.
</pre>
 
To display the current state of a scope:
 
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 show state
 
Changed the current scope context to 192.168.2.0 scope.
 
Current State of the Scope 192.168.2.0 : Active
 
Command completed successfully.
</pre>
 
To add an exclude range to a scope:
 
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 add excluderange 192.168.2.10 192.168.2.20
 
Changed the current scope context to 192.168.2.0 scope.
 
Command completed successfully.
<pre>
 
To display an exclude ranges:
 
<pre>
netsh dhcp server \\winserver-1 scope 192.168.2.0 show excluderange
 
Changed the current scope context to 192.168.2.0 scope.
 
=====================================
Start Address - End Address
=====================================
192.168.2.10 - 192.168.2.20
 
Number of ExcludeRanges : 1 in the Scope : 192.168.2.0.
 
Command completed successfully.
</pre>