Skip to content
LinkState
Go back

Canarying ARP inspection in mixed host environments

Introduction to ARP Inspection Rollout

Overview of ARP Inspection

ARP Inspection (AI) is a security feature that validates ARP packets against a trusted source—typically DHCP snooping bindings or static ARP ACLs—before forwarding them. When enabled on a switch port or VLAN, the device examines each ARP request/reply, compares the sender MAC and IP addresses to the binding table, and drops packets that fail validation. This prevents ARP spoofing attacks such as man‑in‑the‑middle, DHCP starvation, and IP‑address hijacking. In modern data‑center fabrics, AI is often deployed alongside DHCP snooping, IP source guard, and port‑security to form a layered defense against L2 attacks.

Importance of Safe Rollout Patterns

Enabling ARP Inspection changes the forwarding behavior of every ARP frame that traverses the protected domain. A mis‑configured binding table, an overly aggressive validation mode, or a transient topology change can cause legitimate hosts to lose connectivity, leading to service‑impacting outages. Because ARP is a ubiquitous, low‑latency protocol, any disruption propagates quickly across applications that rely on immediate L2 reachability (e.g., clustered databases, real‑time trading, container orchestration). Therefore, a rollout must be treated as a controlled transaction with explicit pre‑checks, a defined commit boundary, verification gates, rollback triggers, bounded blast radius, and clear operator intervention points. The pattern described below enforces these execution boundaries to minimize risk while delivering the security benefit of ARP Inspection.

Designing the Smallest-Safe Rollout Pattern

Identifying Canary Scopes

The canary scope is the smallest set of devices, ports, or VLANs where ARP Inspection is first enabled. Selection criteria include:

CriterionReasonExample Selection
Low‑traffic, isolated VLANLimits impact if validation failsVLAN 100 used only for management traffic
Homogeneous hardwareReduces variability in TCAM/ACL handlingAll Cisco Nexus 9000 series in rack A
Static workloadsEasier to verify expected ARP patternsBare‑metal servers with fixed IPs
Observable telemetryEnables rapid detection of anomaliesPorts already exporting NetFlow/sFlow
Explicit opt‑inAvoids accidental inclusionPorts tagged with ai-canary=true in NetBox

The canary is deliberately small enough that a full‑rollback (disabling AI on the canary) can be performed within a maintenance window without affecting production services. Typical sizes: 1–2 racks, 5–10 VLANs, or ≤5% of total switch ports.

Defining Exception Handling Mechanisms

Exception handling must be explicit, deterministic, and logged. The mechanisms are:

  1. Static ARP ACL Allowlist – Pre‑populated with MAC/IP pairs for known critical services (e.g., VIPs, gateway routers). Packets matching the allowlist bypass AI validation and are always forwarded.
  2. DHCP Snooping Trust Boundaries – Only ports marked as dhcp snooping trust are permitted to insert new bindings; untrusted ports are subject to AI validation.
  3. Rate‑Limited Logging – AI drops are logged to a local buffer and forwarded to a syslog server at a configurable rate (e.g., 100 msgs/sec) to avoid log‑spam during a mis‑configuration.
  4. Fallback to Passive Mode – Some platforms support a monitor-only mode where AI logs violations but does not drop packets. This mode can be used as an intermediate verification step.

All exception handling rules are version‑controlled (e.g., stored in a Git repo) and applied via an automated configuration push that validates syntax before committing.

Establishing Stop Conditions for Legitimate Hosts

A stop condition is a measurable event that triggers an immediate halt to the rollout and initiates rollback or operator review. For ARP Inspection, the following metrics are used:

MetricThreshold (canary)Action
% of ARP requests dropped (valid bindings)> 2 % over a 5‑minute windowPause rollout, raise alert
Number of distinct hosts losing L2 connectivity (detected via ARP‑resolution failure)> 0 for any host tagged critical=trueImmediate rollback
CPU/TCAM utilization on AI‑enabled ASIC> 80 % of allocated AI TCAM entriesPause, investigate
Syslog rate‑limit hits (AI drop logs exceeding configured rate)> 5 % of logs dropped due to rate‑limitPause, adjust logging or bindings

When any stop condition fires, the automation pipeline does not proceed to the next phase; it either holds the current state awaiting operator confirmation or executes a predefined rollback script.

Implementing ARP Inspection Across Environments

Bare Metal Environment Considerations

Bare‑metal servers typically connect to top‑of‑rack (ToR) switches via physical NICs. Key points:

Virtualization Environment Considerations

Virtual switches (e.g., Linux Bridge, Open vSwitch, Cisco Nexus 1000V) present additional layers:

Fast-Churn Workload Environment Considerations

Containers and serverless functions generate short‑lived endpoints with rapidly changing IPs/MACs. Strategies:

Configuration and Deployment

CLI Examples for ARP Inspection Configuration

Below are representative CLI snippets for common platforms. Adjust VLAN IDs, interface ranges, and ACL names to match your design.

Cisco IOS/XE (switch)

! 1. Ensure DHCP snooping is enabled globally
ip dhcp snooping
ip dhcp snooping vlan 100,101,102
ip dhcp snooping information option

! 2. Trust the uplink to the distribution layer
interface TenGigabitEthernet1/0/1
 ip dhcp snooping trust
 spanning-tree portfast trunk
!
! 3. Define static ARP ACL for critical services
arp access-list CRITICAL-SERVICES
 permit ip host 10.0.0.10 mac host 001a.2b3c.4d5e
 permit ip host 10.0.0.20 mac host 001a.2b3c.4d5f
exit
!
! 4. Apply ARP inspection on the canary VLANs
ip arp inspection vlan 100
ip arp inspection vlan 100 validate src-mac dst-mac ip
ip arp inspection vlan 100 logging
ip arp inspection filter CRITICAL-SERVICES vlan 100
!
! 5. Set aggressive logging rate-limit (optional)
ip arp inspection log-buffer logs 100 interval 1

Juniper EX Series (Junos)

[edit]
set protocols dhcp-snooping vlan 100
set protocols dhcp-snooping vlan 100 interface ge-0/0/1.0
set protocols dhcp-snooping vlan 100 interface ge-0/0/2.0 disable
set protocols arp-inspection vlan 100
set protocols arp-inspection vlan 100 validate source-mac destination-mac ip
set protocols arp-inspection vlan 100 logging
set firewall family ethernet-switching filter ARP-ALLOWLIST term allow-critical from source-address 10.0.0.10/32
set firewall family ethernet-switching filter ARP-ALLOWLIST term allow-critical from source-mac 00:1a:2b:3c:4d:5e
set firewall family ethernet-switching filter ARP-ALLOWLIST term allow-critical then accept
set protocols arp-inspection vlan 100 filter ARP-ALLOWLIST

Linux Bridge (using ebtables/arp_tables)

# Enable ARP tables module
modprobe arp_tables

# Create an ARP table for the bridge
arp -t arp_filter -N

# Add static allowlist entries
arp -t arp_filter -i br0 -s 10.0.0.10 -f 00:1a:2b:3c:4d:5e -j ACCEPT
arp -t arp_filter -i br0 -s 10.0.0.20 -f 00:1a:2b:3c:4d:5f -j ACCEPT

# Drop everything else (default policy)
arp -t arp_filter -i br0 -P DROP

# Log drops (rate‑limited via iptables)
iptables -I FORWARD -p arp --arp-op 1 -j LOG --log-prefix "ARP-DROP: " --log-level 4 --limit 10/min

Code Snippets for Automated Deployment

Ansible Playbook (Cisco NX‑OS)

- name: Deploy ARP Inspection on canary VLANs
  hosts: nxos_switches
  vars:
    canary_vlans: [100,101,102]
    critical_arp_acl: CRITICAL-SERVICES
  tasks:
    - name: Ensure DHCP snooping enabled
      nxos_config:
        lines:
          - ip dhcp snooping
          - ip dhcp snooping vlan {{ canary_vlans | join(',') }}
        before: no ip dhcp snooping
      register: dhcp_snoop

    - name: Configure static ARP ACL
      nxos_config:
        lines:
          - arp access-list {{ critical_arp_acl }}
          - permit ip host 10.0.0.10 mac host 001a.2b3c.4d5e
          - permit ip host 10.0.0.20 mac host 001a.2b3c.4d5f
        before: no arp access-list {{ critical_arp_acl }}

    - name: Enable ARP inspection on canary VLANs
      nxos_config:
        lines:
          - ip arp inspection vlan {{ item }}
          - ip arp inspection vlan {{ item }} validate src-mac dst-mac ip
          - ip arp inspection vlan {{ item }} logging
          - ip arp inspection filter {{ critical_arp_acl }} vlan {{ item }}
        loop: "{{ canary_vlans }}"

    - name: Verify ARP inspection status
      nxos_command:
        commands:
          - show ip arp inspection

Share this post on:

Previous Post
Softirq stalls as a burst-budget destroyer
Next Post
Proving receiver CPU starvation from packet evidence