skip to content

How does Dynamic ARP Inspection on an Ethernet switch decide to drop a forged ARP packet, and what does it depend on?

level: seniorimportance: should knowfreq 36%

answer

  1. switch checks, hosts do not
  2. a trusted record of who owns which IP
  3. host-facing versus uplink ports
  4. hosts with no record

basics

~20 s

Dynamic ARP Inspection is a switch feature that checks ARP packets on untrusted ports against a binding table of valid IP-MAC pairs, usually learned from DHCP, and drops mismatches. It needs a complete table and correct trusted ports.

solid answer

~40 s

Dynamic ARP Inspection (DAI) is an implementation feature of managed switches, not an IETF protocol. Per VLAN, it intercepts ARP packets on untrusted, host-facing ports and checks the sender IP and MAC against a binding table, normally built by DHCP snooping, and drops packets that do not match. Uplinks to other inspecting switches are marked trusted. Hosts with static addresses have no DHCP binding and need static entries or exemptions, or their ARP is dropped. The IETF analogue is SAVI: RFC 7513 §8.2 requires discarding ARP whose sender protocol address is neither all zeros nor bound to that attachment. DAI is only as good as the table behind it.

go deeper

for a junior

Recall that Dynamic ARP Inspection is a switch feature that drops ARP packets not matching a known IP-to-MAC record.

for a middle

Explain trusted versus untrusted ports and how the binding table, usually from DHCP snooping, is the reference that each ARP packet is compared against.

for a senior

Own rollout and failure modes: static hosts, trusted-port mistakes, inspection on every access switch, and the dependence on the integrity of the DHCP-learned table.

for a principal

Weigh enforcement cost and outage risk against the exposure of a flat segment, and decide who signs for ports and hosts that must stay outside inspection.

## What it is, and what it is not Dynamic ARP Inspection is a name used for a switch capability: the switch examines ARP packets that cross it and drops the ones that contradict known address bindings. It is a vendor-implemented feature, not a protocol defined in an RFC, so details such as the exact optional checks vary. The standards-track analogue is **SAVI**: RFC 7039 (Informational) is the framework, and RFC 7513 (Standards Track) specifies it for addresses learned through DHCP. ## The decision, step by step For an ARP packet arriving on a switch port in a given VLAN: 1. **Is the port trusted?** Trusted ports, typically uplinks toward other inspecting switches or toward infrastructure, are not inspected. Untrusted ports, typically host-facing access ports, are. 2. **Look up the sender IP in the binding table.** The table maps IP, MAC, VLAN and port, and is normally filled by DHCP snooping, whose mechanics belong to a neighbouring topic. 3. **Compare the pair.** If the sender MAC matches the binding, forward. If there is no binding or the MAC differs, **drop** and optionally log. 4. **Optional extra validation**, an implementation choice: the ARP sender MAC against the Ethernet source MAC, and the ARP target MAC against the Ethernet destination MAC on replies, plus rejecting clearly invalid addresses. ``` on ARP packet P arriving on port X in VLAN V: if X is trusted: forward P else: b = binding_table.lookup(V, P.sender_ip) if b is none or b.mac != P.sender_mac: drop P (and log) else: forward P ``` RFC 7513 §8.2 states the same intent in IETF terms, for attachments being validated: ARP messages whose sender protocol address is neither all zeros nor bound to that attachment MUST be discarded, and ARP Replies whose target protocol address is not bound MUST be discarded too. The all-zeros allowance is there so an RFC 5227 ARP Probe, which uses sender IP 0.0.0.0, is not blocked. ## What it depends on - **A complete binding table.** Anything missing is treated as invalid. Hosts with static addresses, printers or servers, need static bindings or an ARP-specific exemption, otherwise they lose connectivity. - **Correct trust boundaries.** A trusted port is a hole: if an attacker can reach a trusted port, inspection is bypassed. Marking a host-facing port trusted is a classic mistake. - **Inspection everywhere the VLAN reaches.** Between inspecting switches the links are trusted, so every access switch must inspect its own host ports. - **Rate limiting.** An untrusted port may have its ARP rate limited as well, an implementation setting. ## What it does and does not stop | It stops | It does not stop | |---|---| | Forged claims of another host's IP from an untrusted port | A compromised trusted port or an unmanaged switch hiding hosts behind one port | | Gateway impersonation from an access port | Attacks at other layers, such as a rogue DHCP lease | | Poisoning of victims and the gateway alike, since the forged packets traverse the switch | A table wrong because of a rogue DHCP server it trusted | Note the last row: if the binding table was filled by a rogue DHCP server, DAI faithfully enforces the attacker's bindings. The table's integrity is therefore a DHCP-side question, owned by the neighbouring topic. ## Operating it - Roll out in log-only mode where the implementation offers it, find static hosts, then enforce. - Keep the trusted-port list short and reviewed. - Pair it with limits on ARP rate so an attacker cannot flood the switch's CPU with packets to inspect. ## Interview summary Say: *the switch validates each ARP packet from untrusted ports against a binding table, normally learned by DHCP snooping, and drops the mismatches; it fails open or closed depending on the table and the trust boundaries.* Name the static-host gap, and cite RFC 7513's SAVI rule as the IETF version.

  • What happens to a printer with a static IPv4 address behind an inspecting switch?
    It has no DHCP binding, so its ARP packets are dropped and others cannot resolve it. The usual fixes are a static binding or an ARP-specific exemption for that address, or moving the device to DHCP with a reservation.
  • Why does DAI not remove the need to secure DHCP?
    The binding table is only as honest as its source. If a rogue DHCP server hands out leases that the switch learns, DAI enforces those bindings. Protecting the source of bindings is a separate control, owned by DHCP security.
  • How does RFC 7513 relate to this feature?
    It is the IETF's Standards Track specification for validating addresses learned via DHCP. Its section 8.2 discards ARP packets with an unbound sender protocol address on validating attachments, the same intent, though not the same product behaviour.

saying these in an interview costs you the question

  • Says DAI is an IETF-standardised protocol like ARP
  • Believes DAI needs no binding data to work
  • Marks host-facing ports as trusted
  • Thinks DAI also fixes a rogue DHCP server's bindings
  • Forgets statically addressed hosts lose connectivity