Why Layer 2 Trust Creates Security Gaps
The DHCP process and ARP resolution discussed earlier in this series were both designed decades ago under the assumption that every device on a local network segment could be trusted. Neither protocol includes any built-in authentication, meaning any device connected to a switch port can pretend to be a legitimate DHCP server or claim ownership of any IP address — a switch has no native way of knowing this is happening.
The Rogue DHCP Server Attack
Since DHCP relies entirely on client broadcasts, discussed earlier in this series, any device on the network can respond to a DHCP discovery message with its own offer, and the client accepts whichever offer it receives first.
Rogue DHCP attack scenario:
1. An attacker connects an unauthorized DHCP server
to the network
2. A legitimate client broadcasts a DHCP discover
3. Both the real DHCP server AND the rogue server
respond with offers
4. If the rogue server's offer arrives first, the
client accepts it, receiving an attacker-controlled
default gateway and DNS server
5. All of that client's traffic now flows through
the attacker's device, enabling interception
or manipulation of everything the client sendsThis attack can occur completely by accident — an employee plugging in a personal wireless router with its own DHCP server enabled can unintentionally cause exactly this disruption, without any malicious intent at all.
DHCP Snooping: Establishing Trusted and Untrusted Ports
DHCP Snooping solves this by having the switch inspect DHCP traffic and classify each port as either Trusted (permitted to send DHCP server responses) or Untrusted (permitted only to send client requests, never server responses).
Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10,20
-- Trust only the port connecting to the
-- legitimate, known DHCP server
Switch(config)# interface gigabitethernet 1/0/24
Switch(config-if)# ip dhcp snooping trust
-- All other access ports remain untrusted by
-- default once DHCP snooping is enabled on the VLANWith this configuration, if a DHCP server response (an Offer or Acknowledge message) is received on any untrusted port, the switch drops it immediately — the rogue server's responses never reach legitimate clients, regardless of how quickly they arrive.
The DHCP Snooping Binding Table
As a byproduct of monitoring DHCP traffic, the switch builds a DHCP Snooping Binding Table, recording which IP address was legitimately assigned to which MAC address on which port.
Switch# show ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
00:50:56:aa:11:22 192.168.1.11 86400 dhcp-snooping 10 Gi1/0/5This binding table becomes far more valuable than a simple attack-prevention log — it serves as the trusted reference data source for Dynamic ARP Inspection, described next.
The ARP Spoofing Attack
ARP (Address Resolution Protocol) resolves an IP address to a MAC address, and like DHCP, it operates entirely on trust — any device can send an ARP reply claiming to own any IP address, whether or not that claim is true.
ARP spoofing (also called ARP poisoning) attack:
1. An attacker sends a forged ARP reply, falsely
claiming their own MAC address corresponds to
the network's default gateway IP address
2. Nearby devices update their ARP tables to
point the gateway IP at the attacker's MAC
3. Traffic intended for the real gateway is now
sent directly to the attacker instead
4. The attacker can silently forward this traffic
onward after inspecting or modifying it,
a classic man-in-the-middle positionDynamic ARP Inspection: Validating ARP Against Known-Good Data
Dynamic ARP Inspection (DAI) solves this by intercepting every ARP packet on untrusted ports and validating its claimed IP-to-MAC mapping against the DHCP snooping binding table built above — an ARP message that does not match a known, legitimate binding is dropped.
Switch(config)# ip arp inspection vlan 10,20
-- Trust the same ports trusted for DHCP snooping,
-- since a legitimate DHCP server's associated
-- infrastructure should also be trusted for ARP
Switch(config)# interface gigabitethernet 1/0/24
Switch(config-if)# ip arp inspection trustBecause DAI relies directly on the DHCP snooping binding table, DHCP snooping must be enabled first — attempting to configure DAI without an active, populated binding table would leave it with no legitimate data to validate ARP messages against, causing it to drop legitimate traffic.
Handling Devices with Statically Configured IP Addresses
Devices with static IP addresses, discussed earlier in this series, never generate a DHCP transaction, meaning they never appear in the DHCP snooping binding table, and DAI would incorrectly drop their legitimate ARP traffic by default.
Switch(config)# arp access-list STATIC-DEVICES
Switch(config-arp-nacl)# permit ip host 192.168.1.5 mac host 0050.56cc.5566
Switch(config)# ip arp inspection filter STATIC-DEVICES vlan 10
-- This manually permitted entry supplements the
-- dynamic DHCP snooping bindings for devices that
-- legitimately never go through DHCPVerifying DAI Operation
Switch# show ip arp inspection interfaces
Interface Trust State Rate (pps) Burst Interval
Gi1/0/5 Untrusted 15 1
Gi1/0/24 Trusted none N/A
Switch# show ip arp inspection statistics
Vlan Forwarded Dropped
10 1204 3A non-zero Dropped count is worth investigating — it may reflect legitimate attack prevention working correctly, or it may indicate a legitimate statically configured device that still needs to be added to the ARP access list described above.
Why These Two Features Work Best Together
DHCP Snooping and Dynamic ARP Inspection are deliberately designed to be deployed together: DHCP Snooping's binding table provides the trusted reference data that makes DAI effective, and DAI in turn closes the ARP-based attack vector that DHCP Snooping alone does not address. Implemented together, they close two of the most common and consequential Layer 2 attack vectors in switched networks, protecting against threats that traditional Layer 3 ACLs and firewalls, discussed earlier in this series, cannot see or prevent, since these attacks never leave the local Layer 2 segment.