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.
| Device and switch ingress | IPv4 and MAC | Role |
|---|---|---|
| PC A, SW1 Gi1/0/1 | DHCP 192.168.10.20/24; 0011.2233.4455 | Ordinary client, DAI-untrusted |
| R1 Gi0/1, SW1 Gi1/0/24 | 192.168.10.1/24; 00aa.bbcc.0001 | Approved gateway and DHCP server; deliberately trusted infrastructure path |
| Unapproved device, SW1 Gi1/0/5 | Example 192.168.10.66/24; 00aa.bbcc.0066 | DAI-untrusted source of the diagram's false claims |
| Optional static printer, SW1 Gi1/0/6 | 192.168.10.50/24; 0011.2233.0050 | Approved static host requiring an explicit ARP policy |
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.
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. Poison the victim. The attacker sends PC A forged ARP replies saying the gateway's IP belongs to the attacker's MAC.
- 2. Poison the gateway. And tells the gateway that PC A's IP is at the attacker's MAC.
- 3. Traffic detours. PC A's internet traffic now goes to the attacker first…
- 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 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.
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. Forged reply arrives. It comes in on untrusted port Gi1/0/5.
- 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. 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-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 10Prepare 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 bindingPrivileged 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 10Global 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.50R1, 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 10SW1, 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 bindingInspect 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-VLAN10Privileged 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.
SW1#show ip arp inspection statistics vlan 10 Vlan Forwarded Dropped DHCP Drops ACL Drops ---- --------- ------- ---------- --------- 10 1532 41 41 0
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
- 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.
- 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. - 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
For our DHCP client on a DAI-untrusted port with no applied ARP ACL, which records are used to validate its ARP sender mapping?
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?
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?