İçeriğe Atla
Mustafa Erbay
Tutorials · 10 min read · görüntülenme Türkçe oku
100%

Reducing Layer-2 Insider Threats on Switches with DHCP Snooping + DAI

A staged playbook for rolling out DHCP Snooping, DAI, and IP Source Guard on access networks to defend against rogue DHCP, ARP spoofing, and IP impersonation.

Reducing Layer-2 Insider Threats on Switches with DHCP Snooping + DAI — cover image

Most organizations treat their access switches as “safe”: we’re inside the perimeter, the user is one of ours… In production, though, a meaningful chunk of the most expensive small problems start at L2: the wrong DHCP handing out leases, ARP spoofing siphoning traffic, static IP impersonation, and devices ending up in the wrong VLAN. In this post I’ll walk through the three guardrails I find most effective in the field, applied together:

  • DHCP Snooping (verify where DHCP comes from + build a binding table)
  • Dynamic ARP Inspection (DAI) (validate ARP packets against the binding table)
  • IP Source Guard (bind source IP/MAC to a port so spoofing gets curtailed)

The threat model (real production scenarios)

Together, this trio significantly reduces the following problem classes:

  1. Rogue DHCP: a user spins up a “DHCP server” on their laptop and the devices around them grab the wrong gateway/DNS.
  2. ARP spoofing / MITM: a device on the same VLAN claims “I’m the gateway” and pulls traffic through itself.
  3. IP impersonation: someone uses another host’s IP via a static configuration (very common for printers, cameras, IoT).

These controls are not a substitute for NAC/802.1X. But in environments where NAC isn’t in place, or is being rolled out in stages, they shrink the blast radius at very low cost.

Design principles: secure default first, exceptions second

Three of the most important calls in practice:

  • Trusted ports should only be the uplinks/relay paths going to the DHCP server (access ports never get marked trusted).
  • Phased rollout: start with one building / one access stack; build an inventory of anomalies and exceptions.
  • Evidence + runbook: keep a log/command set that lets you answer “who broke?” within ten minutes.

1) Turn on DHCP Snooping: build the binding table

DHCP Snooping does two things:

  • It watches DHCP messages and verifies where server-side replies (OFFER/ACK) are coming from.
  • It records the IP/MAC/port/VLAN tuple it learns from DHCP into a binding table.

Where to enable it?

  • Per VLAN: only on the VLANs that actually use DHCP.
  • Access layer: the switches end-user devices are connected to.
  • Uplink: the port(s) toward the DHCP server/relay marked “trusted.”

Operational pre-checks

Before you turn it on, get clear answers to these three:

  1. Where do the DHCP servers live? (in-VLAN or centralized?)
  2. Is there a DHCP relay involved? (IP helper / relay agent)
  3. Do you have a list of devices using static IPs? (printers, cameras, PLCs, firewall management, etc.)

2) DAI: validate ARP packets against the binding

DAI’s superpower is this: ARP is a protocol that just declares “I am this IP,” and that openness makes it intrinsically spoofable. DAI cross-checks ARP packets against the DHCP Snooping binding table and drops anything that doesn’t line up.

Which VLANs?

  • User VLANs and IoT VLANs: yes
  • Server VLANs: it depends (most environments have less L2 there, with higher risk/complexity)
  • Management VLAN: usually more controlled; still apply based on risk vs. operational tradeoff

Turning DAI on “strictly”

The safest activation order in the field:

  1. DHCP Snooping → let the binding table populate
  2. DAI → start in monitoring mode / low-impact thresholds
  3. Static-IP exceptions → ARP ACL or static binding
  4. Then tighten up

3) IP Source Guard: lock the IP/MAC leaving a port

IP Source Guard ties the source IP/MAC of traffic leaving a port to the binding. That severely restricts the “static IP impersonation” class of attack.

The two wins I see most in practice:

  • IP collisions / impersonation in the same VLAN surface much faster
  • ARP poisoning attempts become much less successful (paired with DAI)

Troubleshooting: ‘a device can’t get out to the internet’ — what do you check?

A simple flow for fast triage when something breaks in production:

  1. Did the device get DHCP, or is it static?
  2. Does the binding table show the IP/MAC/port?
  3. Are DAI drop counters going up?
  4. Which port is dropping traffic? (usually an access port)

Rollout plan: waves plus a rollback path

The rollout model I keep coming back to in the field:

  1. Canary: 1 access stack / 1 floor / 1 small building
  2. Exception inventory: static IPs, legacy devices, special DHCP requirements
  3. Waves: 2–3 stacks per wave (small enough that the team can roll back the same day if needed)
  4. Alarms: DAI drop rate, DHCP snooping violations, IP Source Guard violations
  5. Rollback: a quick disable procedure scoped to a VLAN/port

Closing: L2 protection isn’t “small” — it cuts incidents

DHCP Snooping + DAI + IP Source Guard together don’t solve every security problem at the org level. But when they’re rolled out properly, they bring two things at once: predictability and evidence. They make it harder for small mistakes inside the network to balloon into large outages, and they help you answer the “what happened?” question much faster during an incident.

Paylaş:

Bu yazı faydalı oldu mu?

Yükleniyor...

Bu yazı nasıldı?

ME

Mustafa Erbay

Sistem Mimarisi · Network Uzmanı · Altyapı, Güvenlik ve Yazılım

2006'dan bu yana sistem mimarisi, network, sunucu altyapıları, büyük yapıların kurulumu, yazılım ve sistem güvenliği ekseninde çalışıyorum. Bu blogda sahada karşılığı olan teknik deneyimlerimi paylaşıyorum.

Kişisel Notlar

Bu notlar sadece sizde saklanır. Tarayıcınızda yerel olarak tutulur.

Hazır 0 karakter

Comments

Server-side AI Moderation

Comments are AI-moderated server-side and stored permanently.

?
0/2000

Server-side AI moderation

✉️ Free · No spam · Unsubscribe anytime

Curated digest, hand-picked by me — not the AI

Once a week: the most important post of the week, behind-the-scenes notes, and a "what I actually used this week" section. Less noise, more signal.

  • 📌
    Best of the week Single most-worth-reading post
  • 🔧
    Toolbox notes Real tools I used this week
  • 🧠
    Behind-the-scenes Notes that don't make it to blog

We don't spam. Unsubscribe anytime. · Tracked only by Umami (self-hosted, no Google).

Your Reading Stats

0

Posts Read

0m

Reading Time

0

Day Streak

-

Favorite Category

Related Posts