Network Layer · Computer Networks

SVGVector Architecture Diagram (SVG)
COMPUTER NETWORKS · Module 3★ High PriorityDHCPIT Sem 6 · Code 100602 · Dynamic Host ConfigurationMNEMONICDORA = Discover, Offer, Request, Acknowledge.Lease timers: T1 at 50% renews, T2 at 87.5% rebinds, 100% start over.Core BreakdownOverviewRFC 2131: automates IP, mask, gateway and DNS for hosts.Extends BOOTP; same UDP ports, server 67 and client 68.AllocationDynamic: leased from a pool, returned when the lease expires.Automatic: permanent from pool; Manual: admin binds IP to MAC.DiscoverClient has 0.0.0.0 and broadcasts to 255.255.255.255 on UDP 67.It looks for any DHCP server on the subnet.OfferEach server reserves an IP and sends proposed IP, mask,lease duration and its own server IP.Request, AckClient broadcasts REQUEST to accept one offer and reject the rest.Server sends ACK with IP, mask, gateway, DNS and lease time.RenewalT1 at 50%: unicast request to the original server.T2 at 87.5%: broadcast to any server; at 100% restart DORA.Diagram: DORA and LeaseClientServerD DISCOVER (broadcast)O OFFER 192.168.1.100R REQUEST (broadcast)A ACK lease + paramsLease timeline0%T1 50%T2 87.5%100%unicast renewrebindServer UDP 67 · client UDP 68Relay agent forwards across subnets⚠️ Exam Traps & Viva Favorites① What is DORA?Discover, Offer, Request, Acknowledgment: thefour-message exchange a new client uses to getits configuration.② Why broadcast REQUEST?It tells the chosen server "accepted" and tellsall other servers their offers were rejected, sothey free the reserved IPs.③ T1 and T2?T1 = 50% of lease: unicast renewal to the originalserver. T2 = 87.5%: broadcast rebinding to anyserver. Expiry: restart DORA.Tip: DORA, then T1 50%, T2 87.5%Master Revision Table(learn it row by row!)FeatureARPRARPBOOTPDHCPLayerData link / networkData linkApp over UDP 67/68App over UDP 67/68ResolvesIP to MACMAC to IPMAC to IP + boot infoDynamic IP + full configCrosses routersNoNoYes, relay agentYes, relay agentAllocationLookup onlyStatic tableStatic manual tableDynamic leasesInfo deliveredMAC onlyIP onlyIP, mask, gateway, TFTPIP, mask, gw, DNS, leaseStatusActive in IPv4ObsoleteLegacyUniversal standardQUICK FACTSDISCOVER src 0.0.0.0 dst 255.255.255.255 · relay (RFC 3046) sets giaddrLease example: 86,400 s = 24 h · T1 = 12 h, T2 = 21 hThree modes: dynamic (lease), automatic (permanent), manual (static MAC bind)VERIFIED★ Golden rule: DHCP leases a full configin four steps, DORA.

Dynamic Host Configuration Protocol (DHCP)


1. Overview and Architecture

The Dynamic Host Configuration Protocol (DHCP) (RFC 2131) is an application-layer network management protocol that automates the process of configuring devices on IP networks.

DHCP extends the BOOTP architecture and message format, maintaining backward compatibility while introducing Dynamic IP Address Pools and Temporary Leases:

  • UDP Port 67: DHCP Server listens on Port 67.
  • UDP Port 68: DHCP Client listens on Port 68.
MermaidDiagram
Rendering diagram…

Three Address Allocation Mechanisms in DHCP:

  1. Dynamic Allocation: DHCP leases an IP address to a client from an available pool for a limited duration of time (a Lease). When the lease expires, the IP is automatically returned to the pool for reuse.
  2. Automatic Allocation: DHCP assigns a permanent IP address to a client from a pool on a first-come, first-served basis (no lease expiration).
  3. Manual / Static Reservation: The administrator binds a specific IP address permanently to a specific MAC address (used for web servers, default printers, and routers).

2. The DHCP "DORA" Four-Way Handshake

When a new client joins a network, it obtains its network configuration via the DORA sequence:

MermaidDiagram
Rendering diagram…

1. Discover (DHCPDISCOVER)

  • The client boots with no IP address (0.0.0.00.0.0.0) and broadcasts a DHCPDISCOVER packet to destination 255.255.255.255 on UDP Port 67 to locate any available DHCP servers on the subnet.

2. Offer (DHCPOFFER)

  • Each DHCP server that receives the broadcast checks its pool, reserves an available IP, and transmits a DHCPOFFER containing the proposed IP address, subnet mask, lease duration, and the server's own IP address.

3. Request (DHCPREQUEST)

  • The client may receive multiple offers from different servers. It selects one offer (typically the first received) and broadcasts a DHCPREQUEST.
  • Why Broadcast? It informs the selected server of its acceptance while simultaneously alerting all other competing servers that their offers were rejected, allowing them to release their reserved IPs back into the pool!

4. Acknowledgment (DHCPACK)

  • The chosen server sends a DHCPACK finalizing the transaction and delivering complete network parameters:
    • Assigned Client IP Address.
    • Subnet Mask (e.g., 255.255.255.0).
    • Default Gateway Router IP (e.g., 192.168.1.1).
    • DNS Server IP Addresses (e.g., 8.8.8.8).
    • Lease Time duration (e.g., 86,400 seconds=24 hours86{,}400\text{ seconds} = 24\text{ hours}).

3. DHCP Lease Renewal Lifecycle

To prevent long-disconnected devices from permanently occupying IP addresses, DHCP uses timed leases:

MermaidDiagram
Rendering diagram…
  1. At 50% of Lease (T1T_1 Renewal Timer):
    • Client sends a unicast DHCPREQUEST directly to the original leasing server. If the server is online, it replies with DHCPACK, resetting the lease timer back to 100%100\%.
  2. At 87.5% of Lease (T2T_2 Rebinding Timer):
    • If the original server failed to respond at T1T_1, the client broadcasts a DHCPREQUEST to any active DHCP server on the network to extend its lease.
  3. At 100% (Lease Expiration):
    • If no server responds, the client must immediately stop using the IP address, release it, and restart the full DORA process from DHCPDISCOVER.

4. DHCP Relay Agent across Subnets

Like BOOTP, DHCP relies on the DHCP Relay Agent (RFC 3046 / Cisco ip helper-address) running on default routers. When the router intercepts a local broadcast DHCPDISCOVER on UDP 67, it converts it into a unicast IP datagram, inserts its incoming interface IP into the Gateway IP (giaddr) field, and forwards it to the central enterprise DHCP server across the WAN.


5. Comprehensive Comparison: ARP vs. RARP vs. BOOTP vs. DHCP

Feature ARP RARP BOOTP DHCP
Layer Data Link / Network Data Link Transport / App (UDP 67/68) Transport / App (UDP 67/68)
Resolves IP →\rightarrow MAC MAC →\rightarrow IP MAC →\rightarrow IP + Boot info Dynamic IP + Full Configuration
Crosses Routers? No (L2 broadcast) No (L2 broadcast) Yes (via Relay Agent) Yes (via Relay Agent)
Allocation N/A (Address lookup) Static table Static manual table Dynamic Leases, Auto, Manual
Delivered Info Hardware MAC only Single IP only IP, Mask, Gateway, TFTP IP, Mask, Gateway, DNS, Lease, NTP
Status Active (IPv4) Obsolete Legacy Universal Standard

Frequently Asked Questions

QWhat does the acronym DORA represent in DHCP?

Discover, Offer, Request, Acknowledgment.

QWhy is DHCPREQUEST broadcast rather than unicast?

The client broadcasts the request to notify the selected DHCP server of its acceptance while simultaneously notifying all other offering servers to release their reserved IP addresses back to the pool.

QWhat happens during the T1 and T2 timers in DHCP?

T1T_1 fires at 50%50\% of lease duration, prompting a unicast renewal request to the original server. If unacknowledged, T2T_2 fires at 87.5%87.5\% of lease duration, broadcasting a rebinding request to any available DHCP server.

QWhat are the three DHCP address allocation mechanisms?

Dynamic (leased from a pool for a limited time), automatic (permanent address from the pool, first come first served) and manual (administrator binds a fixed IP to a MAC address).

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.

← All Computer Networks modules