Imagine walking into a corporate office with your laptop, opening your network settings, and having to manually calculate an unused IP address, enter the correct subnet mask, type the default gateway IP, and key in two DNS server addresses before you can even open your email. If someone else accidentally chose the same IP address earlier that morning, both of you would experience an IP collision outage.
To eliminate this manual burden, modern networks rely on Dynamic Host Configuration Protocol (DHCP). Operating at Layer 7 over UDP ports 67 and 68, DHCP automatically configures client devices the instant they connect to the network. In this chapter, you will master the four-step DORA exchange, configure IP address pools, and bind static MAC reservations for shared network appliances.
The Classic Four-Step DORA Handshake
When a client computer joins a network with DHCP enabled, it executes a four-step handshake known by the memorable acronym DORA:
- Discover (DHCPDISCOVER): The client has no IP address and does not know who the DHCP server is. It broadcasts a Layer 2 frame (Destination MAC:
FF:FF:FF:FF:FF:FF) containing an IPv4 packet with Source IP0.0.0.0and Destination IP255.255.255.255on UDP port 67. - Offer (DHCPOFFER): The DHCP server receives the broadcast, reserves an available IP address from its pool, and broadcasts or unicasts a DHCPOFFER containing the proposed IP address, subnet mask, lease duration, default gateway, and DNS servers.
- Request (DHCPREQUEST): The client formally accepts the offer by broadcasting a DHCPREQUEST announcing: "I accept the offer of IP 192.168.1.100 from server 192.168.1.1!" Broadcasting this informs any other DHCP servers on the subnet that their offers were declined.
- Acknowledge (DHCPACK): The server responds with a final DHCPACK confirmation. The client binds the IP parameters to its network interface and begins normal network operation.
| DORA Step | Message Type | Sender Device | Source IP Address | Destination IP Address |
|---|---|---|---|---|
| Step 1 | DHCPDISCOVER | Client Device | 0.0.0.0 | 255.255.255.255 |
| Step 2 | DHCPOFFER | DHCP Server | 192.168.1.1 | 255.255.255.255 (or Unicast) |
| Step 3 | DHCPREQUEST | Client Device | 0.0.0.0 | 255.255.255.255 |
| Step 4 | DHCPACK | DHCP Server | 192.168.1.1 | 255.255.255.255 (or Unicast) |
Address Pools and Lease Expiration
A DHCP server does not permanently give away IP addresses; it leases them for a specified duration (such as 24 hours in an office, or 2 hours in a busy coffee shop). When 50% of the lease duration expires (known as T1 timer), the client automatically sends a unicast DHCPREQUEST to the server to renew its lease.
If an employee leaves the company or unplugs their laptop, the lease eventually expires. The DHCP server automatically reclaims that IP address and returns it to the free pool, ready to be reassigned to another incoming device. This recycling mechanism prevents address starvation on networks with high device turnover.
Static Reservations: The Best of Both Worlds
While dynamic leasing is perfect for laptops and phones, certain shared devices must never change their IP address. If a shared office network printer or Network Attached Storage (NAS) server receives a different IP address every morning, employees will be unable to print documents or access shared folders.
You could configure a manual static IP directly on the printer control panel, but managing static IPs across dozens of appliances becomes administrative chaos. The superior solution is a Static DHCP Reservation (also called MAC-IP Binding).
In the DHCP server management interface, you map the permanent 48-bit MAC address of the printer (for example, 00:11:22:33:44:55) to a specific reserved IP address (192.168.1.200). Whenever that printer boots and broadcasts a DHCPDISCOVER, the DHCP server recognizes its MAC address and always delivers the exact same reserved IP address, complete with current DNS and gateway settings!
Hands-On Lab Practice
In this lab exercise, you will observe automated DHCP lease distribution on a SOHO gateway router. You will verify that client computers receive valid network parameters dynamically, examine a static reservation configured for an office network printer, and test end-to-end communication across the leased subnet.
Review the assigned IP addresses on each node. Notice how the printer maintains its predictable reserved address while workstations dynamically consume pool addresses.
