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.

Lesson 6 of 17 · 11 min read · practice only with authorization

Diagram

A gateway MAC that changes

Follow the path. One example at a time.

Step 1 of 4

Normal

The gateway’s MAC matches the inventory.

Illustration: Normal
$ 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.

  1. 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.
  2. 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.
  3. 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.

1 / 3

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.

  1. MapNetwork protocols for defenders: what each layer tells you in a captureEthernet, IP, TCP, UDP, DNS, TLS, and HTTP as they appear in a packet capture: the fields worth reading at each layer, a worked tcpdump trace of one web request, and which protocols leak what.

Practice

  1. LabControl benchA failure is described. Choose the control that changes the outcome.

Glossary

  1. CardARP spoofingOn a local network, a host claims to be the gateway and sees traffic that was not meant for it.