DHCP (Dynamic Host Configuration Protocol)
Cheat sheet · https://pcornel.dk/topic.php?topic=652
Answer
DHCP automatically supplies IPv4 clients with addressing parameters such as an IP address, subnet mask, default gateway and DNS servers. It uses UDP and normally starts with broadcast traffic because a new client does not yet know its network configuration or DHCP server.
Remember
- Server UDP port: 67
- Client UDP port: 68
- Initial exchange: Discover → Offer → Request → ACK (DORA)
- Broadcasts do not cross routers unless a relay function such as
ip helper-addressis configured.
First checks
show ip dhcp binding— leases handed out by the IOS server.show ip dhcp pool— pool range, leased and free addresses.show ip dhcp conflict— addresses found in use by ping or gratuitous ARP.show ip dhcp server statistics— DISCOVER/OFFER/REQUEST/ACK counters.show ip interface <if> | include Helper— relay address on the client VLAN.debug ip dhcp server packet— DORA step by step (briefly).
Commands
ip helper-address- Routed-network support
show ip dhcp conflict
Verify in this order
client broadcasts DISCOVER → local server or relay (ip helper-address) receives it → server picks the pool matching the subnet → OFFER → REQUEST → ACK → client configures address, gateway and DNS
Where it usually breaks
local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result
DHCP DORA
| Step | Message | Purpose |
|---|---|---|
| 1 | Discover | Client looks for DHCP servers |
| 2 | Offer | Server offers address/options |
| 3 | Request | Client requests the selected offer |
| 4 | ACK | Server confirms lease/options |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=652