Pcornel
Networking · IP Services

DHCP (Dynamic Host Configuration Protocol)

Cheat sheet · https://pcornel.dk/topic.php?topic=652

Back to the Topic

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-address is 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

StepMessagePurpose
1DiscoverClient looks for DHCP servers
2OfferServer offers address/options
3RequestClient requests the selected offer
4ACKServer 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

Confirmation

Confirm action

Continue?