DHCP Snooping
Cheat sheet · https://pcornel.dk/topic.php?topic=618
Answer
DHCP snooping lets DHCP server messages in only on trusted ports, so a rogue DHCP server on an access port cannot hand out addresses. It also records each client's IP, MAC, VLAN and port in a binding table.
Remember
Enable globally (ip dhcp snooping) and per VLAN (ip dhcp snooping vlan <list>), then ip dhcp snooping trust on uplinks towards the server. By default the switch inserts option 82; some servers or relays reject it — then use no ip dhcp snooping information option or configure the relay to trust it.
First checks
show ip dhcp snooping— enabled VLANs, trusted ports, option 82 setting.show ip dhcp snooping binding— learned bindings.show ip dhcp snooping statistics— packets forwarded and dropped.debug ip dhcp snooping packet— per-packet decisions (in a lab or briefly).
Commands
show ip dhcp snooping statistics- Shows how many DHCP packets snooping forwarded and dropped, and why they were dropped.
show ip dhcp snooping- Display DHCP Snooping VLANs, trust/rate behavior and operational settings.
show ip dhcp snooping binding- Display DHCP Snooping IP/MAC/VLAN/interface bindings.
ip dhcp snooping trust- Mark the interface as trusted for DHCP Snooping server-side traffic.
ip dhcp snooping- Enable DHCP snooping globally.
ip dhcp snooping vlan <vlan-list>- Enable DHCP snooping on the listed VLANs.
ip dhcp snooping limit rate <pps>- Limit DHCP packets per second on an untrusted port to stop DHCP floods.
ip dhcp snooping information option allow-untrusted
Verify in this order
snooping enabled per VLAN → uplink to the server trusted → client DISCOVER forwarded → server OFFER/ACK accepted only on trusted port → binding created with IP, MAC, VLAN, port
Where it usually breaks
no client request → VLAN/trust/rate drop → relay/option-82/server response → wrong or missing binding → dependent enforcement
DHCP Snooping trust model
| Port role | Normal trust | Why |
|---|---|---|
| Client access port | Untrusted | blocks server-originated DHCP messages from endpoint edge |
| Uplink toward authorized server/relay path | Trusted | permits legitimate DHCP server responses through intended boundary |
| Unknown/unmanaged edge | Untrusted | least-trust default for DHCP server messages |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=618