How It Works
DHCP is a client-server protocol that uses DHCP servers and DHCP clients. A DHCP server is a machine that runs a service that can lease out IP addresses and other TCP/IP information to any client that requests them. For example, on Microsoft Windows NT or Windows 2000 servers you can install the Microsoft DHCP Server service to perform this function. The DHCP server typically has a pool of IP addresses that it is allowed to distribute to clients, and these clients lease an IP address from the pool for a specific period of time, usually several days. Once the lease is ready to expire, the client contacts the server to arrange for renewal.
DHCP clients are client machines that run special DHCP client software enabling them to communicate with DHCP servers. All versions of Windows include DHCP client software, which is installed when the TCP/IP protocol stack is installed on the machine.
DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and various DHCP options from DHCP servers in a four-step process:
DHCPDISCOVER:The client broadcasts a request for a DHCP server.
DHCPOFFER:DHCP servers on the network offer an address to the client.
DHCPREQUEST:The client broadcasts a request to lease an address from one of the offering DHCP servers.
DHCPACK:The DHCP server that the client responds to acknowledges the client, assigns it any configured DHCP options, and updates its DHCP database. The client then initializes and binds its TCP/IP protocol stack and can begin network communication.
Graphic D-40. Dynamic Host Configuration Protocol (DHCP).
DHCP lease renewal consists only of steps 3 and 4, and renewal requests are made when 50 percent of the DHCP lease time has expired.
When you implement DHCP on a network, you should consider the following:
- DHCP servers do not share their database of leased IP addresses, so if your network has more than one DHCP server, be sure that their DHCP scopes do not overlap.
- Assign DHCP options to the DHCP server if clients need them.
- Assign static IP addresses to non-DHCP clients, and exclude these addresses from the scope on the DHCP server if necessary.
- Assign static IP addresses to all servers on your network or assign them DHCP client reservations on the DHCP server to ensure that they always lease the same IP address.
- Configure DHCP relay agents if one DHCP server must serve hosts on several subnets.
A small video explaining the concept of DHCP, an application-layer protocol that your own computer probably uses to get an IP address from your network.
Automatic IP Address allocation (DHCP)