Dynamic Host Configuration Protocol (DHCP) is a network management protocol that automatically assigns IP addresses and configuration parameters to devices on TCP/IP networks through a client-server model. Operating at the application layer and using UDP ports 67 (server) and 68 (client), DHCP eliminates manual IP configuration, prevents address conflicts, and centralizes network administration. The protocol employs a sophisticated lease management system where addresses are temporarily assigned and automatically renewed, enabling efficient address space utilization across dynamic networks. Understanding DHCP's multi-phase communication handshake, option-based extensibility, and relay mechanisms is essential because even minor misconfigurations—like incorrect scope boundaries or missing relay agents—can prevent entire subnets from obtaining network connectivity, while mastery of advanced features like failover, snooping, and DHCPv6 enables you to build resilient, secure, and scalable IP infrastructure.
What This Cheat Sheet Covers
This topic spans 11 focused tables and 105 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: DORA Process and Message Types
DORA — Discover, Offer, Request, Acknowledge — is the four-step handshake every device runs to get an address, and it's the first thing to know cold. Beyond those four, this rounds out the full message set: NAK rejects a bad request, DECLINE and RELEASE let the client back out, and INFORM fetches config for a device that already has a static IP. Read each row as one move in a conversation between client and server.
| Phase | Example | Description |
|---|---|---|
Client broadcasts DISCOVER to 255.255.255.255:67 | • Client sends broadcast to locate available DHCP servers on the network • source IP is 0.0.0.0, destination is broadcast, includes client MAC in chaddr field and transaction ID (xid) for matching responses | |
Server unicasts or broadcasts OFFER with yiaddr = 192.168.1.100 | • Server responds with an available IP address in the yiaddr field• includes lease time (option 51), subnet mask (option 1), gateway (option 3), DNS servers (option 6), and its own identifier (option 54) • may be broadcast if client's broadcast flag is set | |
Client broadcasts REQUEST with option 50 = 192.168.1.100, option 54 = server IP | • Client formally requests the offered address by broadcasting to inform all servers • includes requested IP (option 50) and server identifier (option 54) • other servers withdraw their offers and return addresses to their pools | |
Server sends ACK with full configuration and lease time | • Server confirms the lease and delivers complete configuration options • client binds the address and can now communicate on the network • xid matches the client's original request to prevent spoofing |