ARP spoofing: detecting forged neighbor replies on a LAN
ARP has no authentication, so any host on a VLAN can claim to be the gateway. How spoofing appears in neighbor tables, captures, and arpwatch logs, and how DHCP snooping with Dynamic ARP Inspection prevents it.
Diagram
A gateway MAC that changes
Step 1 of 4
Normal
The gateway’s MAC matches the inventory.
$ ip neigh show 10.0.0.1 10.0.0.1 dev eth0 lladdr 3c:52:82:aa:10:01 REACHABLE
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Gratuitous replies
- What fails
- Unsolicited ARP replies are normal after failover but rare otherwise.
- Who is affected
- Hosts on the same VLAN.
- What you would notice
- Repeated replies for the gateway IP from a new MAC.
- What you change
- Alert on gateway MAC changes.
Static entries
- What fails
- Static ARP entries help for a few critical hosts but do not scale.
- Who is affected
- Servers and admin workstations.
- What you would notice
- Critical hosts relying on dynamic ARP alone.
- What you change
- Use DAI broadly; static entries only where justified.
Segmentation
- What fails
- Large flat VLANs give every host a chance to spoof.
- Who is affected
- Everyone on the VLAN.
- What you would notice
- Hundreds of hosts on one broadcast domain.
- What you change
- Use smaller VLANs and private VLANs for clients.
Wireshark’s view
Wireshark flags “duplicate use of IP address detected” when two MACs claim one IP. Filter with arp.duplicate-address-detected or arp.opcode == 2 to see replies.
IPv6 has the same problem
Neighbor Discovery replaces ARP in IPv6 and can be spoofed in the same way, along with rogue router advertisements. Switch features such as RA Guard and IPv6 ND inspection are the equivalents.
Check yourself
Recognition and the fix. Nothing here is a procedure.
arpwatch reports the gateway IP changed MAC. What is the first check?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.