Automatic Client Configuration
One of the most important client services is the Dynamic Host Configuration Protocol (DHCP) client. The DHCP client has an expanded role in Windows 2000. The primary new feature is the ability to configure an IP address and subnet mask when the client is started on a network where no DHCP server is available to assign addresses. This feature allows autoconfiguration of an IP address and a subnet mask for small networks such as a home network.
If a Microsoft TCP/IP client is installed and set to dynamically obtain TCP/IP protocol configuration information from a DHCP server, then the DHCP client service is engaged each time the computer is restarted. The DHCP client service now uses a two-step process to configure the client with an IP address and other configuration information:
When the client is installed, it attempts to locate a DHCP server and obtain an IP address configuration. Most corporate and organizational TCP/IP networks use DHCP servers that are configured to hand out information to the clients on the network.
For a computer running Windows 2000, if this attempt to locate a DHCP server fails, the DHCP client autoconfigures the TCP/IP protocol with a selected IP address from the Internet Assigned Numbers Authority (IANA)-reserved class B network 169.254.0.0. with the subnet mask 255.255.0.0. The DHCP client performs duplicate address detection to ensure that the IP address it has chosen is not already in use. If the address is in use, it selects another IP address and reselects addresses up to 10 times. Once the DHCP client has selected an address that is verifiably not in use, it configures the interface with this address. The client continues to check for a DHCP server in the background every five minutes, and if a DHCP server is found, the autoconfiguration information is abandoned and the configuration offered by the DHCP server is used instead.
The autoconfiguration feature of Windows 2000 TCP/IP is known as Automatic Private IP Addressing (APIPA) and allows home users and small business users to create a functioning, single subnet TCP/IP network without having to manually configure the TCP/IP protocol or set up a DHCP server.
In case the DHCP client has previously obtained a lease from a DHCP server, the following modified sequence of events occurs:
If the client's lease is still valid at boot time (the lease has not expired), the client tries to renew its lease with the DHCP server. If the client fails to locate any DHCP server during the renewal attempt, it attempts to ping the default gateway that is listed in the lease. If pinging the default gateway succeeds, then the DHCP client assumes that it is still located on the same network where it obtained its current lease, and continues to use the lease. By default, the client attempts to renew its lease when 50 percent of its assigned lease time has expired.
If the attempt to ping the default gateway fails, the client assumes that it has been moved to a network that has no DHCP services currently available (such as a home network), and it auto-configures itself as described above. Once autoconfigured, it continues to try to locate a DHCP server every five minutes.