What is DHCP, its configuration and DORA?

Dynamic Host Configuration Protocol (DHCP) provides IP address and other configuration information like subnet mask, default gateway, WINS and DNS server address to network clients. DHCP allocates IP addresses dynamically to the clients, known as a lease for a period called lease period.

DHCP lease-generation is 4 step process called DORA which expands as below:

D – Discover

O – Offer

R – Request

A – Acknowledgement

The working process is as under:

  1. The DHCP client broadcasts a DHCP DISCOVER packet in the subnet.
  2. Once DHCP Server receives DISCOVER packet, it replies with DHCPOFFER packet. This packet is broadcast and contains a potential IP address for the client. The client might receives DHCPOFFER packet from multiple DHCP servers ( if they exist in subnet).
  3. The client then broadcasts a DHCP REQUEST that contains a server identifier. Since this broadcast packet reaches all DHCP servers, they come to know which server’s DHCPOFFER the client has chosen to accept. In case client received multiple DHCPOFFER, it selects the server that made the fastest response to its DHCPDISCOVER which typically is the DHCP server closest to the client.
  4. Once DHCP servers receive the DHCPREQUEST they use server identifier to know if their offer is accepted or not. The chosen server stores the IP address client information in the DHCP database and broadcasts DHCP ACK message. If for some reason, the DHCP server cannot provide the address that was offered in the initial DHCPOFFER, the DHCP server sends a DHCPNAK message.