DHCP

What is DHCP ?
  • Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway. 
  • Every device on a TCP/IP-based network must have a unique unicast IP address to access the network and its resources. 
  • Without DHCP, IP addresses must be configured manually for new computers or computers that are moved from one subnet to another, and manually reclaimed for computers that are removed from the network.
  • DHCP enables this entire process to be automated and managed centrally. 
  • The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when it starts up on the network.
  • Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.


How DHCP client-server works ?
  • A user turns on a computer with a DHCP client.
  • The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a DHCP server to answer.
  • The router directs the DISCOVER packet to the correct DHCP server.
  • The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the server determines an appropriate address (if any) to give to the client. The server then temporarily reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with that address information. The server also configures the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well.
  • The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the address.
  • The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the address for a server-specified period of time.

Benefits of DHCP :
  • Reliable IP address configuration. 
  • It minimizes configuration errors caused by manual IP address configuration, such as typographical errors, or address conflicts caused by the assignment of an IP address to more than one computer at the same time.
  • Reduced network administration. 
  • Centralized and automated TCP/IP configuration.
  • The ability to define TCP/IP configurations from a central location.
  • The ability to assign a full range of additional TCP/IP configuration values by means of DHCP options.
  • The efficient handling of IP address changes for clients that must be updated frequently, such as those for portable computers that move to different locations on a wireless network.
  • The forwarding of initial DHCP messages by using a DHCP relay agent, thus eliminating the need to have a DHCP server on every subnet.