Sunday, August 23, 2009

RFC - 2131 DHCP

The Dynamic Host Configuration Protocol, DHCP, is the mechanism by witch configuration parameters are provided to Internet hosts. DHCP is comprised of two components, one protocol for handing out configuration settings from a DHCP server and a second part which allocates network addresses to hosts. DHCP follow a client-server model, which means a network contains a server which acts as the DHCP which allocates the addresses and configuration parameters sent to hosts.

DHCP has three mechanisms of allocating addresses, automatic allocation, dynamic allocation and manual allocation. With automatic allocation, the DHCP server leases an IP address to a client for a set amount of time, by which the client must request a renewal. With dynamic allocation, a DHCP server assigns an IP to a client and when the client is done with it, the IP goes back into the address pool and is available to be assigned to another client. Dynamic allocation is useful in a network environment where clients are temporarily connected to the network or there are a limited number of IPs assigned to the network for allocation. With manual allocation, an IP is permanently assigned to a client by a network administrator and the DHCP server's role is simply to convey this assignment. This kind of IP assignment is also known as a "static IP."

The Dynamic Host Configuration Protocol uses the format of BOOTP and according to Droms, R. (1997), "The format of DHCP messages is based on the format of BOOTP messages, to capture the BOOTP relay agent behavior described as part of the BOOTP specification [7, 21] and to allow interoperability of existing BOOTP clients with DHCP servers. Using BOOTP relay agents eliminates the necessity of having a DHCP server on each physical network segment. "



Below, is an image representing the DHCP Message Format, created by Tanenbaum, A. (2003):


The above illustrates the Dynamic Host Configuration Protocol Messgage, which consists of a 1 bit Op field that tells the type of op code, a bootrequest or a bootreply. It consists of an Htype field that gives the hardware address type. It has a Hlen field th gives the hardware address length. It contains a Hops field which a client sets to zero and is used by relay agents when booting by way of a relay agent. It has a Xid field which represents the transaction ID and is used to aid the client and server to associate messages and responses. The DHCP message also has a Secs field that represents the elapsed seconds since the client began an address aquisition or address renewal operation. A flags field also exists which enables the broadcast flag. Also contained in the message is the Ciaddr field which contains the Client IP address, the Yiaddr Your IP address, the siaddr field which contains the IP address of the next serv to use in bootstrap, the Giaddr which contains the relay agent's IP address, and the Chaddr which contains the clients's hardware address. The DHCP message, also contains the Sname which is an optional server host name and a File field which contains the boot file name, and an Options field which allow for servers and clients to select DHCP related options.



REFERENCES


Tanenbaum, A. (2003) Computer Networks (fourth edition). Prentice Hall. Upper Saddle River, NJ, 2003.

Droms, R. (1997, March). Dynamic Host Configuration Protocol. RFC 2131. Bucknell University.