123MAC tableMAC 1/1MAC 1/1dropped 0MACIPPortVLAN00:00:5e:00:53:66192.168.1.1662100:00:5e:00:53:01192.168.1.10111gateway(none yet)gateway192.168.1.166gateway192.168.1.1192.168.1.1 is at00:00:5e:00:53:fe192.168.1.1 is at00:00:5e:00:53:66
Envelopes: one frame each; the seal shows who sent it (pink = attacker)Pucks: green shield = trusted port, eye = untrusted, checked portCheck: the switch lets it through · Cross: the switch drops itBoard: DHCP snooping bindings (MAC, IP, port, VLAN)Cells: the switch's MAC table and the router's free addresses (pink = taken by fakes)First the switch is plain: it learns every source MAC into its MAC table and believes every message, so made-up MACs fill the table and its frames get flooded, fake DHCP clients empty the router's pool, a rogue DHCPOFFER makes the attacker the laptop's gateway, and an unasked-for ARP reply rewrites the laptop's entry for 192.168.1.1. Then the same switch gets three defences. Port security lets each access port use only 1 MAC address, so a flood of made-up MACs is dropped instead of filling the MAC table. DHCP snooping trusts only port 3, the uplink to the real router, so a DHCPOFFER from the attacker on port 2 is dropped, and every DHCPACK it lets through becomes a binding (MAC, IP, port, VLAN, lease). Dynamic ARP Inspection checks ARP on untrusted ports against those bindings, so the attacker's claim that 192.168.1.1 is at its MAC is dropped. MAC addresses 00:00:5e:00:53:xx are RFC 7042 documentation values; ff:ff:ff:ff:ff:ff is the real broadcast address. IPs are from the private range 192.168.1.0/24 (RFC 1918). Frames cross a switch in microseconds; the figure slows everything down so you can watch.

Attacks on a plain switch

  1. Start with a plain switch and no defences. It learns the source MAC (hardware address) of every frame and forwards whatever arrives. Port 3 leads to the real router; the laptop and the attacker sit on ports 1 and 2.

The defended switch

Port security

DHCP snooping

ARP inspection

All together

Inside the switch

;; step 1/15 · plain-switch · plain
one access switch · VLAN 1 · 192.168.1.0/24 · no defences on
port 1  laptop    00:00:5e:00:53:01  192.168.1.101
port 2  attacker  00:00:5e:00:53:66  192.168.1.166
port 3  router    00:00:5e:00:53:fe  192.168.1.1  (DHCP server, gateway)
MAC table (6 slots drawn): 00:00:5e:00:53:01 → 1, 00:00:5e:00:53:66 → 2, 00:00:5e:00:53:fe → 3
every frame is believed: nothing checks who really sent it

Port security and Dynamic ARP Inspection are switch-vendor features, not IEEE or IETF standards; names and defaults differ between vendors. DHCP snooping's trusted ports and bindings are standardised for source address validation as SAVI-DHCP (RFC 7513). Devices with fixed (static) addresses never send a DHCPACK through the switch, so they have no binding; put them on trusted ports or add their bindings by hand.