Course contents

Chapter 12: Security FundamentalsLesson 5 of 19

ARP security

Your PC knows the gateway's IP address, but how does it know which MAC address to use? Let's see how a false ARP claim can redirect traffic and what a switch can check before forwarding that claim.

Intermediate · 8 min read

Why does a PC need the gateway's MAC?

PC A is 192.168.10.20/24 and its default gateway is R1 at 192.168.10.1. To send an IP packet to another subnet, PC A needs an Ethernet frame addressed to its local gateway. ARP (Address Resolution Protocol) asks which MAC address owns an IPv4 address on the local network. The result is stored in the host's ARP cache, an IP-to-MAC lookup table.

Ordinary ARP has no authentication. Depending on its operating-system policy and current state, a host may accept an incorrect reply or update. ARP spoofing sends false claims about address ownership. Cache poisoning is the resulting incorrect cached mapping. A false gateway mapping can redirect a host's traffic towards the wrong device or simply make it fail.

Diagram
Why does a PC need the gateway's MAC?
Why does a PC need the gateway's MAC?
Device and switch ingressIPv4 and MACRole
PC A, SW1 Gi1/0/1DHCP 192.168.10.20/24; 0011.2233.4455Ordinary client, DAI-untrusted
R1 Gi0/1, SW1 Gi1/0/24192.168.10.1/24; 00aa.bbcc.0001Approved gateway and DHCP server; deliberately trusted infrastructure path
Unapproved device, SW1 Gi1/0/5Example 192.168.10.66/24; 00aa.bbcc.0066DAI-untrusted source of the diagram's false claims
Optional static printer, SW1 Gi1/0/6192.168.10.50/24; 0011.2233.0050Approved static host requiring an explicit ARP policy
Read each row across: the left box names the item, the others describe it.

All ports are access ports in VLAN 10; /24 is mask 255.255.255.0. A MAC address identifies a Layer 2 endpoint; it is not a URL or a TCP port. The diagrams use the same client and gateway throughout. The printer is an optional extension introduced after the DHCP-client baseline works.

ARP spoofing: a man in the middle

An unapproved device on the same VLAN claims that the gateway's IP belongs to its MAC. If it can also influence the gateway's return mapping, traffic may be redirected through it in both directions. This is an on-path or man-in-the-middle position. Redirection does not automatically decrypt properly authenticated TLS traffic; a failed forwarding attempt may cause only an outage.

Diagram
ARP spoofing creating a man-in-the-middle
ARP spoofing creating a man-in-the-middle
SwitchPC AIP 192.168.10.20GatewayIP 192.168.10.1maliciousAttackerIP 192.168.10.66

Device key: PC A, Attacker (laptop) · Gateway (router)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

Reading the addresses

IP labels identify interfaces or destinations. Subnet labels identify networks; /n is the prefix length. A router ID (RID) identifies a routing process and need not be a reachable interface.

An IP address alone is not a URL. A web URL includes a scheme such as https://; an address on a router or printer does not imply a website.

  • PC A: IP 192.168.10.20
  • Gateway: IP 192.168.10.1
  • Attacker: IP 192.168.10.66
  1. 1. Poison the victim. The attacker sends PC A forged ARP replies saying the gateway's IP belongs to the attacker's MAC.
  2. 2. Poison the gateway. And tells the gateway that PC A's IP is at the attacker's MAC.
  3. 3. Traffic detours. PC A's internet traffic now goes to the attacker first…
  4. 4. Traffic may be relayed onwards. An on-path device may relay traffic to hide the detour. Encryption and endpoint authentication still matter; redirection does not reveal every application's contents.
The diagram illustrates false ARP ownership claims in VLAN 10. The IP destination can remain unchanged while the local frame is sent to the wrong MAC.

The defence: Dynamic ARP Inspection

Dynamic ARP Inspection (DAI) validates ARP requests and replies entering itsuntrusted interfaces in enabled VLANs. Its policy can use a configured ARP access list and the DHCP snooping binding table, which records observed client leases. A sender claim that is not permitted by the applicable checks is dropped before being forwarded.

A binding ties the client's leased IP and MAC to a VLAN and access interface. A binding is not the switch's ordinary MAC table: the MAC table learns where a source MAC appeared, not whether that MAC may claim a particular IP. DAI is also not a filter for every user IP packet; IP Source Guard is a separate feature.

Diagram
Dynamic ARP Inspection dropping a forged ARP reply
Dynamic ARP Inspection dropping a forged ARP reply
SwitchDAI on VLAN 10PC AuntrustedGatewaytrusted uplinkmaliciousAttackeruntrusted · Gi1/0/5

Device key: PC A, Attacker (laptop) · Gateway (router)

Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

  1. 1. Forged reply arrives. It comes in on untrusted port Gi1/0/5.
  2. 2. Checked and dropped. The sender's MAC is not authorised to claim gateway IP 192.168.10.1. With no permitting ARP ACL or matching binding, DAI rejects the claim.
  3. 3. Legitimate ARP still works. PC A's own ARP matches its DHCP binding, and the gateway's port is trusted, so normal resolution is unaffected.
DAI validates the false claim on the untrusted ingress. R1's infrastructure port is a deliberate inspection bypass, not an authenticated guarantee.
  • DAI-trusted ports bypass ARP inspection. Choose them from the intended security boundary; an uplink is not automatically safe just because it joins switches.
  • Static addresses create no DHCP lease binding by themselves. An untrusted static host needs an approved alternative, such as the ARP ACL below.
  • Rate limits can contain excessive ARP. On the referenced Catalyst design, the untrusted default is 15 ARP packets per second; exceeding the configured rate/burst policy can err-disable the interface. Aggregate legitimate bursts need appropriate planning.

For example, an approved printer with a manually configured address has no dynamic DHCP binding. If its port is untrusted and no ARP ACL permits its sender mapping, fresh ARP exchanges can be dropped. Check those conditions instead of assuming that every unreachable printer has the same cause.

Turning on DAI for VLAN 10

Based on Cisco IOS / IOS XE documentation, not run in a lab here. Enable DHCP snooping first and let bindings build, or legitimate hosts will be blocked.

Use an isolated Catalyst IOS XE 17.x-style switch lab with the stated VLAN and working DHCP service from the DHCP snooping lesson. Start in global configuration mode after configure terminal. First prepare the approved server-facing trust and snooping policy, then request a fresh PC A lease and verify its actual binding before enabling DAI.

interface GigabitEthernet1/0/24 description Uplink to gateway ip dhcp snooping trust ip arp inspection trust exit no ip dhcp snooping information option ip dhcp snooping ip dhcp snooping vlan 10

Prepare the known R1 path and DHCP snooping first. The option 82 choice matches this direct-server lab; other designs may intentionally use relay information. All client-facing interfaces retain their default untrusted states.

show ip dhcp snooping binding

Privileged EXEC precheck: confirm the current PC A IP, MAC, VLAN 10 and Gi1/0/1 entry. Do not assume .20 if the DHCP server actually leased another address.

ip arp inspection vlan 10

Global configuration mode after valid client records and any required static-host exceptions are in place. Enables DAI for VLAN 10; it does not enable it for every VLAN or make hosts trusted.

Permit the approved static printer without trusting its port

Our optional printer uses 192.168.10.50 manually, with MAC 0011.2233.0050. Reserve or exclude .50 from R1's DHCP pool before connecting it, so a client is not leased the same address. A static printer does not automatically appear in the snooping table. We can state its permitted sender mapping in an ARP ACL (access control list).

ip dhcp excluded-address 192.168.10.50

R1, global configuration mode, before attaching the optional printer. Confirm .50 is not already leased; an exclusion prevents new allocation but does not safely move an existing client off a conflicting address by itself.

arp access-list STATIC-VLAN10 permit ip host 192.168.10.50 mac host 0011.2233.0050 exit ip arp inspection filter STATIC-VLAN10 vlan 10

SW1, global configuration mode. This VLAN-scoped ARP ACL permits the exact approved static IP/MAC mapping. Keep Gi1/0/6 untrusted and assigned to access VLAN 10; the ACL is not a per-port identity mechanism.

The filter intentionally omits the static keyword and contains no explicit deny entry. On the referenced IOS XE behaviour, ARP not matched by the permitted static-host entry can still be checked against DHCP snooping bindings. Adding static makes unmatched traffic fail the ACL without that fallback, which could block the DHCP clients in this mixed VLAN. A configured ARP ACL takes precedence; review its entries before blaming the binding table.

This exception allows a claimed mapping, not cryptographic proof that the printer sent it. A device able to copy an approved IP/MAC pair can still meet a mapping check. Physical access controls and other endpoint policies remain relevant.

Bindings and drop counters

show ip dhcp snooping binding

Inspect currently learned client lease records and their MAC, IP, VLAN and interface. This is not an inventory of every host, especially static hosts and devices behind snooping-trusted interfaces.

show ip arp inspection vlan 10 show ip arp inspection interfaces show arp access-list STATIC-VLAN10

Privileged EXEC verification on a supporting IOS XE platform. Inspect enabled VLANs, the separate DAI interface trust/rate policy and the applied static-host entries. Command details vary by image; use the platform reference.

Illustrative Cisco IOS XE output written for this lesson, not a switch capture
SW1#show ip arp inspection statistics vlan 10
 Vlan      Forwarded        Dropped     DHCP Drops      ACL Drops
 ----      ---------        -------     ----------      ---------
   10           1532             41             41              0
This excerpt records 41 drops through the DHCP-binding validation path and no ACL drops. It does not prove that 41 attacks occurred: missing legitimate bindings can cause drops too. Compare the counter increase during a known test and inspect supported logging for the sender IP/MAC and ingress interface.

From PC A, ping 192.168.10.1 after confirming its DHCP binding. If the optional printer is connected with the reserved address and ACL, test it from PC A too. Read the host ARP cache, switch inspection counters and actual reachability together. A stale cache can allow an old mapping to work temporarily even when a fresh ARP exchange would be rejected.

Short failure-and-recovery lab

  1. Save the healthy isolated baseline. Confirm the DHCP client works with a matching binding and the approved static printer works with its explicit ACL entry.
  2. For a deliberate fault on this isolated VLAN only, remove the applied static-host filter with no ip arp inspection filter STATIC-VLAN10 vlan 10. Cause a fresh ARP exchange for the printer using the lab host's cache controls or by waiting for expiry. Its sender claims lack a DHCP binding, so inspect the resulting drops rather than assuming a physical cable failure.
  3. Restore ip arp inspection filter STATIC-VLAN10 vlan 10, repeat the fresh exchange and verify both the printer and DHCP client work. Keep the user ports untrusted. Do not clear all bindings on a live VLAN merely to reproduce the fault.

The trade-off is operational preparation: inspection reduces some spoofed ARP traffic only when the trust boundary and permitted mappings are correct. It does not inspect IPv6 neighbour discovery, secure a compromised trusted uplink or authenticate application traffic. DAI also does not retroactively prove that an existing host ARP cache is correct. Save the healthy configuration after verifying both control policy and data traffic.

Technical reference: Cisco Dynamic ARP Inspection, trust, ARP ACLs and DHCP fallback. Configurations and output are documentation-based; no running-switch validation or universal protection guarantee is claimed.

Test yourself on ARP spoofing and DAI

Predict · scenario 1

For our DHCP client on a DAI-untrusted port with no applied ARP ACL, which records are used to validate its ARP sender mapping?

Predict · scenario 2

After enabling DAI, a printer on an untrusted port has neither a DHCP binding nor a permitting ARP ACL, and its fresh ARP packets are dropped. What explains this?

Predict · scenario 3

A mixed VLAN has DHCP clients plus one approved static printer. Its applied ARP ACL permits only that printer, has no explicit deny and omits the static keyword. What happens to an unmatched DHCP client's ARP on the referenced platform?