This post gives a high level overview of the Dynamic Host Configuration Protocol (DHCP) and its benefits.
Prior Protocols and their drawbacks
Before DHCP, two protocols, namely RARP and BOOTP were used for assigning IP addresses to end nodes. Both were client server protocols primarily used by end clients to get an IP address.
RARP is a layer 2 broadcast protocol and since routers do not forward broadcast packets, the RARP server is required to be present in the same network as the clients. This necessitated every network to have a dedicated RARP server.
To overcome this problem with RARP, BOOTP was developed, using UDP as the transport layer protocol. BOOTP packets where sent as Layer3 broadcasts. In cases where a BOOTP server was not present on the local network, a router acted as a relay, to forward BOOTP request messages onto a remote BOOTP server present in another network. Using BOOTP, it was possible to assign additional parameters like boot image location, boot image file name etc., apart from the client’s IP address. However, BOOTP required manual administration at the server end for entering the IP address and other information pertaining to each client. Hence, BOOTP does not scale well for large networks with more number of clients.
To overcome the problem of BOOTP, DHCP was developed as an enhancement of BOOTP. DHCP was devised in a way such that both client and server administration could be done automatically, with minimal manual intervention.
Basic Theory of Operation of DHCP
- Simplifies the IP address assignment process of network administrators, as the whole process of IP address assignment can be automated. Using DHCP, devices can get their IP addresses and network related parameters automatically on boot up, without manual intervention, thereby facilitating a plug-n-play approach.
- DHCP optimally uses IP address space, as DHCP mandates periodic renewal of assigned IP addresses. Those assigned IP addresses that are not renewed can be used for new end nodes.
- DHCP supports both static and dynamic modes of IP addresses assignment and both these modes can coexist together. On a need basis, some nodes could always be assigned the same static IP addresses, based on their device identity like MAC addresses, while rest of the nodes could be assigned dynamic addresses from a pool of IP addresses configured on the DHCP server.
- DHCP can be used to assign not only IP addresses, but also a wide range of additional network parameters like default gateway, DNS server address etc.
- DHCP framework permits vendor specific options to be included inside DHCP messages, so that end nodes can be assigned even vendor specific parameters.
- With routers acting as DHCP relay agents, even end nodes that do not have a DHCP server in their network, can communicate with remote DHCP servers, to get their IP address and other network related parameters.
- DHCP supports both IPV4 and IPV6 address assignments.