<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Computer Support &#187; DHCP</title>
	<atom:link href="http://www.xiitec.com/blog/tag/dhcp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xiitec.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 30 Dec 2009 08:40:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding the DHCP Servers on a Subnet</title>
		<link>http://www.xiitec.com/blog/2008/02/22/finding-the-dhcp-servers-on-a-subnet/</link>
		<comments>http://www.xiitec.com/blog/2008/02/22/finding-the-dhcp-servers-on-a-subnet/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 20:44:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[subnet]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=174</guid>
		<description><![CDATA[This is useful if you believe there is a rogue DHCP Server causing problems for your clients.
The dhcploc command lets you see a computer&#8217;s DHCP traffic for a broadcast domain. Simply pass in the IP address of the machine from which you are running the command:
&#62; dhcploc 192.168.32.24

You will not see any output from the [...]]]></description>
			<content:encoded><![CDATA[<p>This is useful if you believe there is a rogue DHCP Server causing problems for your clients.</p>
<p>The dhcploc command lets you see a computer&#8217;s DHCP traffic for a broadcast domain. Simply pass in the IP address of the machine from which you are running the command:</p>
<pre>&gt; dhcploc 192.168.32.24</pre>
<p><span id="more-174"></span></p>
<p>You will not see any output from the command until it captures some DHCP traffic. You can try running ipconfig /renew to force some traffic to be generated. You can also press the &#8220;d&#8221; key when you have dhcploc running to have it generate a DISCOVER message.</p>
<p>Here is some sample output from the command:</p>
<pre>9:34:58 (IP)0.0.0.0        NACK      (S)192.168.31.84     ***
 9:36:38 (IP)192.168.190.130 OFFER     (S)192.168.12.226   ***
 9:36:38 (IP)192.168.196.231 ACK       (S)192.168.13.53
 9:36:53 (IP)192.168.196.231 ACK       (S)192.168.13.53
 9:37:05 (IP)192.168.196.234 OFFER     (S)192.168.13.53
 9:37:05 (IP)192.168.193.232 OFFER     (S)192.168.12.198
 9:37:06 (IP)192.168.190.132 OFFER     (S)192.168.12.221   ***</pre>
<p>The first column contains a timestamp, the second column is the IP address of the target computer, the third is the DHCP request type, the fourth is the IP address of the DHCP Server, and the fifth is a flag that indicates whether the DHCP Server is authorized. If it is not authorized, you&#8217;ll see three stars (***). In the previous output, you can see that 192.168.31.84, 192.168.12.226, and 192.168.12.221 are all unauthorized DHCP Servers.</p>
<p>dhcploc can also send alerts if it detects an unauthorized server. This allows you to start dhcploc, leave it running, and let it proactively notify you when it discovers an unauthorized server. To do so, specify the /a: option followed by the list of users to alert as shown here:</p>
<pre>&gt; dhcploc /a:"rallen" 192.168.32.24</pre>
<p>dhcploc works by capturing all of the DHCP traffic it sees on the network. Since most DHCP traffic is sent via broadcast, every computer in the broadcast domain (e.g., all computers connected to a hub on a local segment), can look at DHCP traffic. Most computers simply discard the traffic unless it is destined for them, but dhcploc captures all DHCP traffic.</p>
<p>Do not run dhcploc from a DHCP Server. DHCP traffic will be delivered to dhcploc instead of the DHCP Server. By running the command directly on a DHCP Server, it is likely the server won&#8217;t be able to respond to any client requests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/22/finding-the-dhcp-servers-on-a-subnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Server Options</title>
		<link>http://www.xiitec.com/blog/2008/02/20/configuring-server-options/</link>
		<comments>http://www.xiitec.com/blog/2008/02/20/configuring-server-options/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:41:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[configure]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=159</guid>
		<description><![CDATA[When 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 [...]]]></description>
			<content:encoded><![CDATA[<p>When 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&#8217;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.</p>
<p><span id="more-159"></span></p>
<p><strong>Using a graphical user interface</strong></p>
<ol>
<li>Open the DHCP snap-in.</li>
<li>In the left pane, right-click on DHCP and select Add Server.</li>
<li>Type in the name of the DHCP Server you want to target and click OK.</li>
<li>Expand the server entry in the left pane.</li>
<li>Click on Server Options, then right-click it and select Configure Options.</li>
<li>Check the box beside the option you want to configure.</li>
<li>This will make the Data entry section of the dialog box active.</li>
<li>Enter the value(s) for the option and click OK.</li>
</ol>
<p><strong>Using a command-line interface</strong></p>
<p>The following command configures a server option:</p>
<pre>&gt; netsh dhcp server \\<servername> set optionvalue <optcode> <datatype> <optvalue></optvalue></datatype></optcode></servername></pre>
<p>In the following example, the &#8220;domain name&#8221; option (code 015) is configured with a value of &#8220;rallencorp.com&#8221; on the DHCP server named dhcp01:</p>
<pre>&gt; netsh dhcp server \\dhcp01 set optionvalue 015 STRING rallencorp.com</pre>
<p>You can view all of the server options that have been configured with this command:</p>
<pre>&gt; netsh dhcp server \\<servername> show optionvalue</servername></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/20/configuring-server-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authorizing a DHCP Server</title>
		<link>http://www.xiitec.com/blog/2008/02/20/authorizing-a-dhcp-server/</link>
		<comments>http://www.xiitec.com/blog/2008/02/20/authorizing-a-dhcp-server/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:30:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[authorize]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=158</guid>
		<description><![CDATA[Windows 2000 and Windows Server 2003-based DHCP servers that belong to an Active Directory domain must be authorized before they can give out leases to clients. This feature helps reduce the danger of a rogue Windows 2000 or Windows Server 2003 DHCP Server that an end-user sets up, perhaps unintentionally. A rogue DHCP Server can [...]]]></description>
			<content:encoded><![CDATA[<p>Windows 2000 and Windows Server 2003-based DHCP servers that belong to an Active Directory domain must be authorized before they can give out leases to clients. This feature helps reduce the danger of a rogue Windows 2000 or Windows Server 2003 DHCP Server that an end-user sets up, perhaps unintentionally. A rogue DHCP Server can provide incorrect lease information or deny lease requests altogether, ultimately causing a denial of service for clients on your network.</p>
<p><span id="more-158"></span></p>
<p>If the DHCP Server service is enabled on a domain controller, it is automatically authorized. A DHCP Server that is a member server of an Active Directory domain performs a query in Active Directory to determine whether it is authorized. If it is, it will respond to DHCP requests; if not, it will not respond to requests.</p>
<p>A standalone DHCP server that is not a member of an Active Directory domain sends out a DHCPINFORM message when it first initializes. If an authorized DHCP Server responds to the message, the standalone server will not respond to any further DHCP requests. If it does not receive a response from a DHCP Server, it will respond to client requests and give out leases.</p>
<p>DHCP servers are represented in Active Directory as objects of the dhcpClass class, which can be found in the cn=NetServices,cn=Services,cn=Configuratation,<forestrootdn> container. The relative distinguished name of these objects is the DHCP Server&#8217;s IP address. There is also an object in the same container named cn=dhcpRoot, which is created after the first DHCP Server is authorized. It has an attribute named dhcpServers that contains all authorized servers. I enumerated this attribute in the VBScript solution to display all authorized servers.</forestrootdn></p>
<p>By default, only members of the Enterprise Admins group can authorize DHCP Servers. You, however, can delegate the rights to authorize a DHCP Server. Do the following to delegate the necessary permissions to a group called DHCP Admins:</p>
<ol>
<li>Open ADSI Edit from the Support Tools while logged on as a member of the Enterprise Admins group.</li>
<li>In the left pane, expand the Configuration Container  CN=Configuration  CN=Services  CN=NetServices.</li>
<li>Right-click on CN=NetServices and select Properties.</li>
<li>Select the Security tab.</li>
<li>Click the Advanced button.</li>
<li>Click the Add button.</li>
<li>Use the object picker to select the DHCP Admins group.</li>
<li>Check the boxes under Allow for Create dHCPClass objects and Delete dHCPClass objects.</li>
<li>Click OK until all dialog boxes are closed.</li>
<li>Back in the left pane of ADSI Edit, right-click on CN=dhcpRoot (if you&#8217;ve previously authorized DHCP Servers) and select Properties.</li>
<li>Select the Security tab.</li>
<li>Click the Advanced button.</li>
<li>Click the Add button.</li>
<li>Use the object picker to select the DHCP Admins group.</li>
<li>Check the boxes under Allow for Write.</li>
<li>Click OK until all dialog boxes are closed.</li>
</ol>
<p><strong>Using a graphical user interface</strong></p>
<p>Windows 2000 DHCP Servers cannot be authorized with the Windows Server 2003 version of the DHCP snap-in unless the DHCP Server has Service Pack 2 or higher installed.</p>
<ol>
<li>Open the DHCP snap-in.</li>
<li>In the left pane, right-click on DHCP and select Add Server.</li>
<li>Type in the name of the DHCP Server you want to target and click OK.</li>
<li>Click on the server entry in the left pane.</li>
<li>Right-click on the server and select Authorize.</li>
</ol>
<p>If the DHCP Server is not a member of an Active Directory domain, you will not see the Authorize option.</p>
<p><strong>Using a command-line interface</strong></p>
<p>The following command authorizes a DHCP Server in Active Directory:</p>
<pre>&gt; netsh dhcp add server <dhcpservername> <dhcpserverip></dhcpserverip></dhcpservername></pre>
<p>This example shows how to authorize the DHCP Server named dhcp01.rallencorp.com with IP 192.168.191.15:</p>
<pre>&gt; netsh dhcp add server dhcp01.rallencorp.com 192.168.191.15</pre>
<p><strong>Using VBScript</strong></p>
<p>See the Introduction for more information on how to run the netsh command from within a script. The following script prints out the list of authorized DHCP Servers in Active Directory:</p>
<pre>' ------ SCRIPT CONFIGURATION ------
 strForestRootDN = "<forestrootdn>"  ' e.g., dc=rallencorp,dc=com
 ' ------ END CONFIGURATION ---------
 set objCont = GetObject("LDAP://CN=DhcpRoot,CN=NetServices,CN=Services," &amp; _
                         "CN=Configuration," &amp; strForestRootDN)
 colDHCPServers = objCont.GetEx("dhcpServers")
 for each strDHCPServer in colDHCPServers
    Wscript.Echo strDHCPServer
 next</forestrootdn></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/20/authorizing-a-dhcp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing DHCP Server</title>
		<link>http://www.xiitec.com/blog/2008/02/20/installing-dhcp-server/</link>
		<comments>http://www.xiitec.com/blog/2008/02/20/installing-dhcp-server/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 00:26:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DHCP]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=157</guid>
		<description><![CDATA[The DHCP Server service is an optional Windows Component, so you can install it using the Add or Remove Programs applet in the Control Panel. There are no configuration options when you install the DHCP Server, so installation is a breeze. After you&#8217;ve installed the service, you&#8217;ll need to authorize the server, if you have [...]]]></description>
			<content:encoded><![CDATA[<p>The DHCP Server service is an optional Windows Component, so you can install it using the Add or Remove Programs applet in the Control Panel. There are no configuration options when you install the DHCP Server, so installation is a breeze. After you&#8217;ve installed the service, you&#8217;ll need to authorize the server, if you have an Active Directory environment.</p>
<p><span id="more-157"></span></p>
<p><strong>Using a graphical user interface</strong></p>
<ol>
<li> From the Control Panel, open the Add or Remove Programs applet.</li>
<li>Click Add/Remove Windows Components.</li>
<li>Double-click Network Services.</li>
<li>Check the box beside Dynamic Host Configuration Protocol (DHCP).</li>
<li>Click OK.</li>
<li>Click Next.</li>
<li>Click Finish.</li>
</ol>
<p><strong>Using a command-line interface</strong></p>
<p>First, create a file using a text editor such as Notepad with the following contents:</p>
<pre>[netoptionalcomponents]
 dhcpserver=1</pre>
<p>Next, use the sysocmgr.exe utility with the following parameters (assuming the file you just created is named c:\dhcp_install.txt):</p>
<pre>&gt; sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\dhcp_install.txt</pre>
<p>If the server you installed DHCP on is multihomed (i.e., has multiple active network adapters), you&#8217;ll want to make sure the correct network adapters are enabled for use by the DHCP Server. You can enable or disable adapters for use by DHCP Server by doing the following:</p>
<ol>
<li>Open the DHCP snap-in.</li>
<li>In the left pane, click on the server node.</li>
<li>From the menu, select Action  &gt; Properties.</li>
<li>Select the Advanced tab.</li>
<li>Click the Bindings button.</li>
<li>Make sure the interfaces where the DHCP Server should respond are checked.</li>
<li>Click OK until all dialog boxes are closed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/20/installing-dhcp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renewing or Releasing a DHCP IP Address</title>
		<link>http://www.xiitec.com/blog/2008/02/14/renewing-or-releasing-a-dhcp-ip-address/</link>
		<comments>http://www.xiitec.com/blog/2008/02/14/renewing-or-releasing-a-dhcp-ip-address/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 23:11:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[renew]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=128</guid>
		<description><![CDATA[  Using a graphical user interface

From the Control Panel, open the Network Connections applet.
Right-click the DHCP-enabled network connection you want to  renew and select Repair. This will automatically  attempt to renew the connection&#8217;s IP address.


Using a command-line interface
The following commands renew and release a DHCP IP address,  respectively:
&#62; ipconfig /renew

&#62; ipconfig [...]]]></description>
			<content:encoded><![CDATA[<p><strong>  Using a graphical user interface</strong></p>
<ol>
<li>From the Control Panel, open the <span class="docEmphBold">Network Connections</span> applet.</li>
<li>Right-click the DHCP-enabled network connection you want to  renew and select <span class="docEmphBold">Repair</span>. This will automatically  attempt to renew the connection&#8217;s IP address.</li>
</ol>
<p><span id="more-128"></span></p>
<p><strong>Using a command-line interface</strong></p>
<p>The following commands renew and release a DHCP IP address,  respectively:</p>
<pre>&gt; ipconfig /renew

&gt; ipconfig /release</pre>
<p>With either of these commands, you can specify a pattern to  match if you want to affect only a subset of adapters. The following command  would release the IP address for any adapter that had &#8220;Con&#8221; (e.g., Local Area  Connection 1) in its name:</p>
<pre>&gt; ipconfig /renew *Con*</pre>
<p><strong>Using VBScript</strong></p>
<pre>' This code releases all DHCP IP addresses.

' ------ SCRIPT CONFIGURATION ------

strComputer = "."

' ------ END CONFIGURATION ---------

set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")

set objAdapterConfig = objWMI.Get("Win32_NetworkAdapterConfiguration")

intRC = objAdapterConfig.ReleaseDHCPLeaseAll( )

if intRC = 0 then

   WScript.Echo "Released all DHCP IP addresses"

elseif intRC = 1 then

   WScript.Echo "You must reboot to release all DHCP IP addresses"

else

   WScript.Echo "There was an error releasing all DHCP IP addresses: " &amp; intRC

end if' This code shows performs the same function as the previous example

' but it performs a query for all DHCP enabled IP addresses.  Use this

' if you don't want to release all IP addresses.  Modify the WQL statement

' based on the criteria you need.

' ------ SCRIPT CONFIGURATION ------

strComputer = "."

' ------ END CONFIGURATION ---------

set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")

set colNetworkAdapters = objWMI.ExecQuery _

    ("Select * From Win32_NetworkAdapterConfiguration Where DHCPEnabled = True")

for each objNetworkConfig in colNetworkAdapters

   intRC = objNetworkConfig.ReleaseDHCPLease( )

   if intRC = 0 then

      WScript.Echo "Released IP address for " &amp; objNetworkConfig.Description

   elseif intRC = 1 then

      WScript.Echo "You must reboot to release the IP address for " &amp; _

                   objNetworkConfig.Description

   else

      WScript.Echo "There was an error releasing the IP address for " &amp; _

                   objNetworkConfig.Description &amp; ": " &amp; intRC

   end if

next

' This code renews all DHCP IP addresses.

' ------ SCRIPT CONFIGURATION ------

strComputer = "."

' ------ END CONFIGURATION ---------

set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")

set objAdapterConfig = objWMI.Get("Win32_NetworkAdapterConfiguration")

intRC = objAdapterConfig.RenewDHCPLeaseAll( )

if intRC = 0 then

   WScript.Echo "Renewed all DHCP IP addresses"

elseif intRC = 1 then

   WScript.Echo "You must reboot to renew all DHCP IP addresses"

else

   WScript.Echo "There was an error renewing all DHCP IP addresses: " &amp; intRC

end if

' This code renews all adapters made by Intel that are installed on the server.

' ------ SCRIPT CONFIGURATION ------

strComputer = "."

' ------ END CONFIGURATION ---------

set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")

set colNAs = objWMI.ExecQuery("select * " &amp; _

                              " from Win32_NetworkAdapter    " &amp; _

                              " where manufacturer = 'Intel' " )

for each objNA in colNAs

   set colSubNAConfig = objWMI.ExecQuery _

      ("ASSOCIATORS OF {Win32_NetworkAdapter.DeviceID='" &amp; _

        objNA.DeviceID &amp; "'} " &amp; _

      " WHERE resultClass = win32_NetworkAdapterConfiguration ")

for each objNAConfig in colSubNAConfig

      if objNAConfig.DHCPEnabled = True then

         intRC = objNAConfig.RenewDHCPLease( )

         if intRC = 0 then

            WScript.Echo "Renewed IP address for " &amp; objNA.Name

         elseif intRC = 1 then

            WScript.Echo "You must reboot to renew the IP address for " &amp; _

                   objNA.Name

         else

            WScript.Echo "There was an error renewing the IP address for " &amp; _

                   objNA.Name &amp; ": " &amp; intRC

         end if

      end if

   next

next</pre>
<p>Fortunately, the whole DHCP release/renew process is automatic  and not something you have to do manually. When a client receives a DHCP lease  for an IP address, it will automatically attempt to renew that address after 50%  of the lease duration. The DHCP Server can grant the renewal, after which the  client restarts its lease timer. If the server doesn&#8217;t respond, the client tries  again after 87.5% of the lease duration and then attempts to contact other DHCP  Servers.</p>
<p>Even though this process is automatic, there may be times when  you need to initiate it yourselfespecially if you&#8217;ve made network configuration  changes. For example, let&#8217;s say you configured a reservation on your DHCP Server  for a particular host. If that host already has an IP address, you&#8217;ll need to  release the current lease and run the renew command  to get the new address.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/14/renewing-or-releasing-a-dhcp-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring an IP Address</title>
		<link>http://www.xiitec.com/blog/2008/02/14/configuring-an-ip-address/</link>
		<comments>http://www.xiitec.com/blog/2008/02/14/configuring-an-ip-address/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 22:54:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[IP]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=127</guid>
		<description><![CDATA[Using a graphical user interface
&#160;

From the Control Panel, open the Network Connections applet.
Double-click the connection you want to configure.
Click the Properties  button.
Double-click Internet Protocol  (TCP/IP).
To enable DHCP, select Obtain an IP  address automatically. To use a static address, select Use the following IP address. Then configure the IP  address, subnet mask, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Using a graphical user interface</strong></p>
<p style="font-weight: bold">&nbsp;</p>
<ol>
<li>From the Control Panel, open the <span class="docEmphBold">Network Connections</span> applet.</li>
<li>Double-click the connection you want to configure.</li>
<li>Click the <span class="docEmphBold">Properties</span>  button.</li>
<li>Double-click <span class="docEmphBold">Internet Protocol  (TCP/IP)</span>.</li>
<li>To enable DHCP, select <span class="docEmphBold">Obtain an IP  address automatically</span>. To use a static address, select <span class="docEmphBold">Use the following IP address</span>. Then configure the IP  address, subnet mask, and default gateway.</li>
<li>Click <span class="docEmphBold">OK</span> until all windows are  closed.</li>
</ol>
<p><span id="more-127"></span><br />
<strong>Using a command-line interface</strong></p>
<p>The following command configures DHCP for a connection:</p>
<pre>&gt; netsh int ip set address name="<tt><em>&lt;ConnectionName&gt;</em></tt>" source=dhcp</pre>
<p>Here is an example for configuring the connection named &#8220;Local  Area Connection&#8221; to use DHCP:</p>
<pre>&gt; netsh int ip set address name="Local Area Connection" source=dhcp</pre>
<p>This configures a connection with a static IP and default  gateway:</p>
<pre>&gt; netsh int ip set address name="<tt><em>&lt;ConnectionName&gt;</em></tt>" source=static <tt><em>&lt;IP&gt;</em></tt> <tt><em>&lt;Mask&gt;</em></tt> <tt><em>&lt;GateWayIP&gt;</em></tt> <tt><em>&lt;Metric&gt;</em></tt></pre>
<p>This example configures a static IP address for &#8220;Local Area  Connection&#8221;:</p>
<pre>&gt; netsh int ip set address name="Local Area Connection" source=static 10.3.53.3
255.255.255.0 10.3.53.1 1</pre>
<p><strong>Using VBScript</strong></p>
<pre>' This code enables DHCP for the specified connection.
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
strConnection = "Local Area Connection"
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")
set colNA = objWMI.ExecQuery("select * " &amp; _
                             " from Win32_NetworkAdapter " &amp; _
                             " where NetConnectionID = '" &amp; strConnection &amp; "'" )
for each objNA in colNA
   set colNAConfig = objWMI.ExecQuery _
      ("ASSOCIATORS OF {Win32_NetworkAdapter.DeviceID='" &amp; _
        objNA.DeviceID &amp; "'} " &amp; _
      " WHERE resultClass = win32_NetworkAdapterConfiguration ")
   for each objNAConfig in colNAConfig
      if objNAConfig.DHCPEnabled = True then
         WScript.Echo "DHCP already enabled for " &amp; strConnection
      else
         intRC = objNAConfig.EnableDHCP( )
         if intRC = 0 then
            WScript.Echo "DHCP Enabled for " &amp; strConnection
         elseif intRC = 1 then
            WScript.Echo "You must reboot to start using DHCP for " &amp; _
                         strConnection
         else
            WScript.Echo "There was an error enabling DHCP for " &amp; _
                         strconnection &amp; ": " &amp; intRC
         end if
      end if
   next
next

' This code configures an IP address, subnet mask, and default gateway
' for the specified connection.
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
strConnection = "Local Area Connection"
strIP = Array("1.22.2.2")
strMask = Array("255.255.255.0")
strGatewayIP = Array("1.2.3.3")
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2")
set colNA = objWMI.ExecQuery("select * " &amp; _
                            " from Win32_NetworkAdapter " &amp; _
                            " where NetConnectionID = '" &amp; strConnection &amp; "'" )
for each objNA in colNA
   set colNAConfig = objWMI.ExecQuery _
      ("ASSOCIATORS OF {Win32_NetworkAdapter.DeviceID='" &amp; _
        objNA.DeviceID &amp; "'} " &amp; _
      " WHERE resultClass = win32_NetworkAdapterConfiguration ")
   for each objNAConfig in colNAConfig
      intRC = objNAConfig.EnableStatic(strIP,strMask)
      intRC2 = objNAConfig.SetGateways(strGatewayIP)
      if intRC = 0 and intRC2 = 0 then
         WScript.Echo "IP address configured for " &amp; strConnection
      elseif intRC = 1 or intRC2 = 1 then
         WScript.Echo "You must reboot for the changes to take effect for " &amp; _
                      strConnection
      else
         WScript.Echo "There was an error configuring IP for " &amp; _
                      strconnection &amp; ": " &amp; intRC &amp; " and " &amp; intRC2
      end if
   next
next</pre>
<p>If you use static IP addresses, any time you build a new  server, you have to configure an IP address on that server. However, there is no  reason why you can&#8217;t automate the process using either the <em>netsh</em> command shown in the command-line  solution or WMI. You still have to find an available IP address, which may not  be easy to automate depending on your environment, but at least you can  provision the IP address in an automated fashion.</p>
<p>This leads to a discussion of using DHCP on servers. You&#8217;ll  find some people dead set against it and others who wouldn&#8217;t do it any other  way. Since network adapters are by default configured to use DHCP, you can  remove the step of configuring network settings, such as IP address, DNS  servers, etc., on your servers by using DHCP. After the server completes the  build process and reboots, it will automatically request an IP address. But as  you probably know, DHCP addresses aren&#8217;t set in stone. The next time the server  reboots, it might obtain a different address. And since you more than likely  want to add an A record (and possibly a PTR record) in DNS for this server, if  it got a new address, those records would no longer be valid.</p>
<p>There are two ways to work around this. First, you can  configure a reservation on the DHCP server for a specific IP address. You only  need to retrieve the MAC address of the server&#8217;s network adapter order to  configure a reservation (you can get this via the <tt>ipconfig</tt>  <tt>/all</tt> command). With this  configuration, the server will always receive the same IP address even though it  is getting it from DHCP. The benefit of this is that you don&#8217;t have to manually  configure the other settings such as DNS and WINS servers directly on the  server. The potential drawback is that if you have to change network adapters  for any reason, the reservation would also have to be updated.</p>
<p>The second option is to use dynamic DNS to have the server  automatically update DNS based on its current IP address. In fact, you could  have the sever itself send the dynamic updates or use DHCP to do that. That way, even if the server gets a new IP address after every  reboot, DNS will be updated automatically. The benefit to this is that it is the  most automated solution. There is very little configuration you have to do on a  per-server basis (and it is therefore attractive for large environments). The  downside is that DNS could have outdated information for a period of time until  the server dynamically updates its new information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/14/configuring-an-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Static Hosts to dhcp</title>
		<link>http://www.xiitec.com/blog/2008/02/12/adding-static-hosts-to-dhcp/</link>
		<comments>http://www.xiitec.com/blog/2008/02/12/adding-static-hosts-to-dhcp/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 04:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[static hosts]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=112</guid>
		<description><![CDATA[You have some servers  or other machines to which you want to assign static IP addresses. You can use /etc/hosts, but it&#8217;s a bit of bother to edit /etc/hosts on each of the zillion PCs you&#8217;re  responsible for. Can you do it in dhcpd.conf?

Yes, you surely can.  You&#8217;ll need the MAC address [...]]]></description>
			<content:encoded><![CDATA[<p>You have some servers  or other machines to which you want to assign static IP addresses. You can use <em>/etc/hosts</em>, but it&#8217;s a bit of bother to edit /etc/hosts on each of the zillion PCs you&#8217;re  responsible for. Can you do it in <em>dhcpd.conf</em>?</p>
<p><span id="more-112"></span></p>
<p>Yes, you surely can.  You&#8217;ll need the MAC address of your network card, which you can find with ifconfig:</p>
<pre>$ /sbin/ifconfigeth0      Link encap:Ethernet  HWaddr 00:03:6D:00:83:CF

inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

.....</pre>
<p>You want the <em>HWaddr</em> value.</p>
<p>On Windows 95/98/ME, open a DOS prompt and run <em>winipcfg</em>. On NT/2000/XP, run <em>ipconfig</em>.</p>
<p>Make an entry in <em>dhcpd.conf</em> like this:</p>
<pre>host mail1 {   hardware ethernet 00:03:6D:00:83:CF;

fixed-address 192.168.1.100;

}</pre>
<p>Note that multiple-line directives must be enclosed in curly  braces.</p>
<p>Name servers have their own directive in <em>dhcpd.conf</em>, so  they don&#8217;t need MAC addresses:</p>
<pre>option domain-name-servers 192.168.1.10, 192.168.1.11</pre>
<p>That&#8217;s all there is to it. Use this for any machine you wish to  have a static IP address.</p>
<p>You can still use <em>/etc/hosts</em> for important servers, as a  fallback for local users. Remember, with <em>/etc/hosts</em> the network does not  break when a single server goes down.</p>
<p>Every network card ever made has a unique 48-bit Media Access  Control (MAC  address). The Institute of Electrical and Electronics Engineers, Inc.  (IEEE) assigns the first 24 bits, then the manufacturer assigns the  remaining 24 bits.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/12/adding-static-hosts-to-dhcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring dhcp Clients</title>
		<link>http://www.xiitec.com/blog/2008/02/12/configuring-dhcp-clients/</link>
		<comments>http://www.xiitec.com/blog/2008/02/12/configuring-dhcp-clients/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 04:04:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=110</guid>
		<description><![CDATA[In Windows,  open Control Panel -&#62; Networking, then open the Properties box for  TCP/IP. Check &#8220;Obtain an IP address automatically.&#8221;
It&#8217;s just as easy in Linux; the only hard part is  that every distribution puts the configuration file in a different  place. In Red Hat and Fedora, edit /etc/sysconfig/network-scripts/ifcfg-eth0 as follows:
TYPE=EthernetDEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

DHCP_HOSTNAME=stinkpad
On Debian, [...]]]></description>
			<content:encoded><![CDATA[<p>In Windows,  open Control Panel -&gt; Networking, then open the Properties box for  TCP/IP. Check &#8220;Obtain an IP address automatically.&#8221;</p>
<p>It&#8217;s just as easy in Linux; the only hard part is  that every distribution puts the configuration file in a different  place. In Red Hat and Fedora, edit <em>/etc/sysconfig/network-scripts/ifcfg-eth0</em> as follows:</p>
<pre>TYPE=EthernetDEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

DHCP_HOSTNAME=stinkpad</pre>
<p>On Debian, edit <em>/etc/network/interfaces</em> as follows:</p>
<pre>auto loiface lo inet loopback

auto eth0

iface eth0 inet dhcp</pre>
<p>You may wish to use a graphical configuration tool. On Red Hat  and Fedora, use system-config-network.  KDE and Gnome have their own GUI configuration tools (as does  practically every Linux distribution), so you won&#8217;t be short of  choices. Another option is netGo, a system-independent network  configuration utility that lets you create profiles for easily connecting to  different networks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/12/configuring-dhcp-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up a DHCP Server</title>
		<link>http://www.xiitec.com/blog/2008/02/12/setting-up-a-dhcp-server/</link>
		<comments>http://www.xiitec.com/blog/2008/02/12/setting-up-a-dhcp-server/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 04:01:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.xiitec.com/blog/?p=109</guid>
		<description><![CDATA[Install and configure dhcp. You can get the source  tarball from http://www.isc.org. RPMs and Debian packages are also  available; just look for packages named &#34;dhcp.&#34; Configure client PCs to point to  your dhcp server, and you&#8217;re done.
A dhcp server can feed all network configuration data to  the clients. The configuration file [...]]]></description>
			<content:encoded><![CDATA[<p>Install and configure <em>dhcp</em>. You can get the source  tarball from <a href="http://www.isc.org/" mce_href="http://www.isc.org/" target="_blank">http://www.isc.org</a>. RPMs and Debian packages are also  available; just look for packages named &quot;dhcp.&quot; Configure client PCs to point to  your <em>dhcp</em> server, and you&#8217;re done.</p>
<p>A <em>dhcp</em> server can feed all network configuration data to  the clients. The configuration file is <em>/etc/dhcpd.conf</em>. Here is a sample  configuration:</p>
<pre># /etc/dhcpd.conf

default-lease-time 259200;

max-lease-time 518400;

subnet 192.168.1.0 netmask 255.255.255.0 {

   option subnet-mask 255.255.255.0;

   option broadcast-address 192.168.1.255;

   option routers 192.168.1.1;

   option domain-name &quot;test.net&quot;;

   range 192.168.1.50 192.168.1.100;

   option domain-name-servers 152.163.199.56, 198.83.210.28;

}</pre>
<p>This is pretty straightforward. The lease times are  in seconds, so the minimum and maximum in this example are three days  and six days. &quot;Option routers&quot; points to your Internet gateway, or the  gateway to the subnet. A pool of 50 addresses is made available in the  &quot;range.&quot; The name servers are either your own private caching server or  servers, or the name servers at your ISP.</p>
<p>This example uses private, nonroutable IPv4  (Internet Protocol Version 4) addresses. Here are the private IPv4  address classes, in both dotted-quad and Classless Inter-Domain Routing  (CIDR) notation:</p>
<pre>10.0.0.0     - 10.255.255.255  (10/8)

172.16.0.0   - 172.31.255.255  (172.16/12)

192.168.0.0  - 192.168.255.255 (192.168/16)</pre>
<p>These are for use on private networks, so you&#8217;ll select your  subnet ranges from these.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xiitec.com/blog/2008/02/12/setting-up-a-dhcp-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

