Data Networking/Fall 2014/Priya/DHCP

Dynamic Host Control Protocol (DHCP) edit

DHCP is a network protocol RFC 2131, that automates the process of configuring new and existing devices on TCP/IP networks.It automatically assigns IP addresses to the clients connected within the network.


DHCP COMMUNICATION edit

Any PC communicates to a DHCP in four basic ways. When the computer is first turned on, it requests the sever for a new IP address.When computer is turned on after it has obtained its initial configuration information, it confirms its address and other parameters with the DHCP server.When still connected to the same network segment, the client periodically contacts the server to renew its lease on the IP it is using. When the client has moved to a new network, the IP address assigned to him is no longer valid, the client then contacts the DHCP server for a new IP address that are appropriate to the new network.

DHCP uses the special feature of leases to determine when an address is no longer in use.This protocol combinely uses BOOTP and dynamic allocation of IP addresses.In DHCP an IP is assigned to a PC for particular lease period, the client can renew its lease if required. If the lease period of a particular IP address assigned to a PC is expired, then we can reuse the IP address.

DHCP MESSAGE FORMAT edit

DHCP messages include fixed format section and variable format section. The fixed format section is divided into several fields that carry information of server IP address, network and link-layer address of the client and the control information of the message itself. The variable format section carries various DHCP Options such as Subnet mask, Router, DNS server, Message-type option(DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPACK) etc

DHCP Message Exchanges edit

Initially the client having no IP address will send a DHCPDISCOVER message which is a broadcast message type. The DHCP servers on the network will respond with a DHCPOFFER message to the client along with the additional configuration information. The client can select any server offering an IP address when there are multiple servers offering an IP address, usually it selects the server that responds first. The client then sends DHCPREQUEST message which is again a broadcast type that carries information of the DHCP server from which it is requesting an IP, so that the other servers will be automatically informed after looking at the DHCP server Identifier in the message. The respective DHCP server will now responds by sending a DHCPACK to the client and thus the IP is successfully allocated.

By default the renewal time will be half the lease time. The client wishing to renew his IP can start requesting at this time and the server responds by giving an ACK. If by any chance, the original DHCPserver is not available for some reason, then the client can request any available local DHCP servers to extend the lease of the IP during the binding period. If the client no longer wants to use an IP he can voluntarily release his IP address.

 

Now we will move on to discuss the various available DHCP servers and how to configure a DHCP server....