Pcornel
Networking · Network & Protocols › IP Services & Monitoring

DHCPv4 Packet Evidence

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

Back to the Topic

Answer

A DHCP message has fixed fields — transaction ID, the offered address (yiaddr), the relay's address (giaddr), the client's MAC address — and options: message type (53), mask, gateway, DNS, lease time, server identifier (54).

Remember

Follow one transaction ID through Discover, Offer, Request and ACK. giaddr shows the relay and decides the pool; option 54 identifies the server; a NAK means the request was refused. The client's first messages are broadcasts from 0.0.0.0.

First checks

  • Capture filter dhcp (or bootp), then one transaction ID.
  • show ip dhcp binding / show ip dhcp pool — the server's leases and free addresses.
  • show ip dhcp server statistics — messages per type.
  • debug ip dhcp server packet — the exchange per client; use briefly.

Commands

ip helper-address
show ip interface <interface>

Verify in this order

Discover broadcast → relay sets giaddr and forwards → server picks the pool for giaddr → Offer with yiaddr and options → Request naming the server (option 54) → ACK → client uses the address

Where it usually breaks

local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=318

Confirmation

Confirm action

Continue?