Let’s imagine you’re a system administrator at a large company. You are implementing a new network of several hundred computers. All is fine and well until you realize: you have to manually input every single IP address, subnet mask, and gateway settings onto every single computer. You’re paid well, but maybe not that well.
For those of us who don’t think many hours worth of data entry is fun, we turn to DHCP- or Dynamic Host Configuration protocol.
Dynamic Host Configuration Protocol was developed to automate the assignment of IP addresses, subnet masks, gateways, and other IP parameters. It allows for much capability- both with the administrator and end-user. It saves the administrator the trouble of modifying IP information every time an implementation or upgrade is conducted. End-users appreciate it since it allows for quick and simple connections to a network- often without any configuration needed.
DHCP was created by the Internet Engineering Task Force (IETF) and became a standard in 1993, where it succeeded the BOOTP protocol. DCHP is actually based on the BOOTP protocol, which can be seen as a simpler and less complex solution to DHCP. The transition was needed since BOOTP was not designed to provide dynamic address assignment. Instead, administrators tediously maintained configuration files for each host on the network. Instead of a multitude of configuration files, a dynamic alternative was created with DHCP.
DHCP works within four steps: DHCP discovery, DHCP offers, DCHP requests, and DHCP acknowledgement.
When a computer is connected to a DHCP-enabled network, it will send out a broadcast. This broadcast, known as DHCPDISCOVER, will be sent out in hopes of finding the DHCP server. Optionally, the client will request that the last known IP information the client used on the network be used. (Based on the settings of the DHCP server, this request may be fulfilled or denied.)
The DHCP will then receive a lease request from the client. This lease determines how long the client can expect to use the IP information it will obtain from the server. A DHCP message referred to as DHCPOFFER is sent back from the server to the client. This message contains the lease duration, IP address, subnet mask, the client’s MAC address, and the IP address of the DHCP server that issued the message.
Upon a successful transaction of information, the client must then tell the DHCP server that the information was indeed received and accepted. A broadcast is initiated with the DHCP server’s IP address. This will tell other possible DHCP servers that they shouldn’t issue IP information to the client, since the client already obtained the necessary information. This will help free up IP addresses for other computers, as only one lease can be obtained per network interface card.
DHCP acknowledgement is the final phase in the information exchange between server and client. In this phase the server obtains the DHCPREQUEST message from the client, and sends back a DHCPACK message. This packet of information includes the lease duration, as well as any configuration information the client may have requested. At this point the process is complete, and the client will configure its IP information accordingly.
As you’ll recall, the lease is the length of time the client can expect to hold the information obtained by the DHCP server. To fully grasp the need for leases in DHCP configuration, we need to know the significance of the network it is installed on. Leases are commonly set to anywhere from 15 minutes to several months- so what’s the ideal lease time?
DHCP is a very commonly used protocol. If you’ve ever looked at a computer’s IP settings and seen the option “Obtain an IP address automatically,” you can be sure DHCP is hard at work. This is the very same hard work that would’ve been given to the unfortunate system administrator. Clearly, DHCP is one of the “I’m sure glad someone thought of that!” protocols would be hard to imagine life without.
