DHCP snooping is a Layer 2 switch feature that filters DHCP messages on untrusted ports, blocks replies from unauthorized DHCP servers and builds a binding table of legitimate IP address, MAC address, VLAN and port assignments. In networking, and specifically in network security at the access layer, it is one of the foundational first-hop security controls that stops an attacker on a local segment from handing out false gateway or DNS settings.
The feature matters beyond its own protection because its binding table becomes the source of truth for other controls. Dynamic ARP inspection and IP source guard both depend on it, so a correctly built DHCP snooping deployment is usually the first step toward a hardened campus or branch switching design.
How DHCP snooping inspects and filters traffic
DHCP snooping works by classifying every switch port as trusted or untrusted and then intercepting DHCP packets in the switch control plane. Trusted ports face legitimate DHCP servers or upstream switches and may forward any DHCP message. Untrusted ports face end hosts and may send only client messages such as DISCOVER, REQUEST, DECLINE and RELEASE.
When a server message such as DHCPOFFER or DHCPACK arrives on an untrusted port, the switch drops it, because a host port should never answer DHCP requests. The switch also watches successful DHCPACK exchanges passing through trusted ports and records the resulting lease as a binding entry, which includes the lease time so that stale entries age out automatically.
The following table shows how the switch treats the main DHCP message types depending on where they arrive.
| Message type | Sent by | On untrusted port | On trusted port |
|---|---|---|---|
| DISCOVER | Client | Forwarded after checks | Forwarded |
| REQUEST | Client | Forwarded after checks | Forwarded |
| OFFER | Server | Dropped | Forwarded |
| ACK | Server | Dropped | Forwarded and binding created |
| NAK | Server | Dropped | Forwarded |
| RELEASE or DECLINE | Client | Forwarded if binding matches | Forwarded |
Many implementations add further checks on untrusted ports. The switch can verify that the source MAC address matches the client hardware address field inside the DHCP payload, and it can reject RELEASE messages that do not match an existing binding, which prevents an attacker from releasing another host’s lease.
Attacks that DHCP snooping prevents
DHCP snooping primarily defeats rogue DHCP servers, whether malicious or accidental. A consumer router plugged into an office wall jack can answer client requests faster than the real server and hand out a wrong gateway, which causes outages or creates a man-in-the-middle position.
The table below summarizes the threats the feature addresses and the mechanism that stops each one.
| Threat | How it works | Snooping countermeasure |
|---|---|---|
| Rogue DHCP server | Attacker answers with a false gateway or DNS | Server messages dropped on untrusted ports |
| DHCP starvation | Flood of requests with random MAC addresses | Rate limiting and MAC verification |
| Lease release spoofing | Forged RELEASE frees a victim’s address | RELEASE checked against binding table |
| Option 82 injection | Host inserts forged relay information | Packets with option 82 rejected on untrusted ports |
DHCP starvation deserves particular attention. A tool that generates thousands of DISCOVER messages with fake MAC addresses can exhaust a scope within seconds. Snooping alone does not stop it when each frame carries a matching source MAC, so it is normally combined with per-port rate limiting and port security to cap the number of learned addresses.
Key configuration parameters
A working DHCP snooping deployment depends on a small set of parameters that must be enabled globally and per VLAN. Enabling the feature without marking uplinks as trusted is the most common way to break address assignment for an entire segment.
| Parameter | Typical value | What it affects |
|---|---|---|
| Global enable | On | Activates the feature on the switch |
| VLAN scope | All user and voice VLANs | Which VLANs are inspected |
| Trusted interfaces | Uplinks and server ports | Where server replies are accepted |
| Rate limit | 10 to 100 packets per second | Starvation and flood resistance |
| Option 82 insertion | On or off per design | Relay agent information sent to the server |
| Binding database storage | Flash or remote file | Survival of bindings across reboots |
Rate limits must reflect real traffic. Access ports with a single workstation rarely exceed a few packets per second, while a trunk to a downstream switch carrying hundreds of clients may need a much higher value or no limit. Exceeding the limit usually places the port in an error-disabled state, which is a deliberate but disruptive response.
Persisting the binding database is often overlooked. Without it, a switch reload empties the table, and dependent features such as IP source guard will block every host until clients renew their leases, which may take hours with long lease times.
Relationship with related access-layer controls
DHCP snooping is best understood as the foundation of a layered first-hop security model rather than a standalone control. Several neighboring features read its binding table to validate traffic that has nothing to do with DHCP itself.
| Control | Protects against | Depends on snooping |
|---|---|---|
| DHCP snooping | Rogue servers, starvation, lease spoofing | Not applicable |
| Dynamic ARP inspection | ARP spoofing and poisoning | Yes, validates ARP against bindings |
| IP source guard | IP address spoofing by hosts | Yes, filters by bound IP and MAC |
| Port security | MAC flooding and unknown devices | No, but complements it |
| 802.1X | Unauthenticated devices on the port | No, operates before addressing |
In IPv6 networks the equivalent functions are split differently. DHCPv6 Guard and RA Guard block rogue DHCPv6 servers and router advertisements, because IPv6 hosts frequently obtain gateway information from router advertisements rather than from DHCP. Securing only DHCPv4 therefore leaves a dual-stack network partly exposed.
Limitations and common deployment mistakes
DHCP snooping protects only the local Layer 2 domain of the switch that enforces it. It cannot help on unmanaged switches, it does not encrypt anything, and it offers no protection for hosts with statically configured addresses unless static bindings are added manually.
- Forgetting to trust uplinks blocks all legitimate DHCP replies and causes an immediate outage.
- Option 82 mismatches occur when an access switch inserts relay information and the upstream relay or server rejects it.
- Static hosts such as printers lose connectivity once IP source guard is enabled without static bindings.
- Overly strict rate limits on trunk ports error-disable entire downstream switches during boot storms.
- Wireless segments require the controller or access point to provide equivalent protection, because the switch sees only the uplink.
The safest rollout path is to enable snooping in monitoring stages, verify that the binding table populates correctly for each VLAN, and only then activate dependent features such as dynamic ARP inspection.
The simple explanation
When a computer joins a network, it asks for an address and directions, much like a new guest asking the front desk for a room key and a map. Normally only the real front desk answers. A rogue device can shout back first and hand out a fake map that sends traffic through the attacker.
DHCP snooping makes the network switch act like a doorman who knows which desk is the real one. Answers from anywhere else are thrown away, and the doorman writes down which guest received which key. That list later helps other protections spot impostors. The key takeaway is simple: only trusted sources may hand out network addresses.
How it is used in practice
A university IT team manages a dormitory network with about 1,200 wired ports across 30 access switches. Students regularly connect home routers to wall jacks, and each time this happens, dozens of neighbors receive addresses from the 192.168.0.0 range and lose internet access.
The team enables DHCP snooping on all student VLANs, marks the uplinks to the distribution layer as trusted and sets a rate limit of 15 packets per second on access ports. They store the binding database on a central server and, two weeks later, enable dynamic ARP inspection based on the populated table.
Within the first month, the switches drop server replies from 40 different rogue devices, and help desk tickets about lost connectivity fall sharply. The logs also give the team the exact port of each offending router, so staff can contact the student instead of searching floor by floor.