Configuring a Windows client for Dynamic Host Configuration Protocol (DHCP) is easy. The DHCP client is automatically included when you install the TCP/IP protocol, so all you have to do is configure TCP/IP to use DHCP.

To do this, bring up the Network Properties dialog box by choosing Network or Network Connections in the Control Panel (depending on which version of Windows the client is running). Then, select the TCP/IP protocol and click the Properties button.

This brings up the TCP/IP Properties dialog box, as shown in the illustration below. To configure the computer to use DHCP, select the Obtain an IP Address Automatically option and the Obtain DNS Server Address Automatically option.


Automatic Private IP Addressing

If a Windows computer is configured to use DHCP but the computer can’t obtain an IP address from a DHCP server, the computer automatically assigns itself a private address by using a feature called Automatic Private IP Addressing (APIPA). APIPA assigns a private address from the 169.254.x.x range and uses a special algorithm to ensure that the address is unique on the network. As soon as the DHCP server becomes available, the computer requests a new address, so the APIPA address is used only while the DHCP server is unavailable.

Renewing and releasing leases

Normally, a DHCP client attempts to renew its lease when the lease is halfway to the point of being expired. For example, if a client obtains an eight-day lease, it attempts to renew the lease after four days. However, you can renew a lease sooner by issuing the ipconfig /renew command at a command prompt. You may want to do this if you changed the scope’s configuration or if the client’s IP configuration isn’t working correctly.

You can also release a DHCP lease by issuing the ipconfig /release command at a command prompt. When you release a lease, the client computer no longer has a valid IP address. This is shown in the output from the ipconfig /release command:

C:>ipconfig /release
Windows IP Configuration
Ethernet adapter Local Area Connection:
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . :
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . :

Here, you can see that the IP address and subnet masks are set to and that the Default Gateway address is blank. When you release an IP lease, you can’t communicate with the network by using TCP/IP until you issue an ipconfig /renew command to renew the IP configuration or restart the computer.

About This Article

This article can be found in the category: