breakfixlearn.com

Packet Tracer labDomain 2 Network Security · topics 2.3

Layer 2 Attack Prevention Lab

Attack a small switched network, then defend it phase by phase with DHCP snooping, Dynamic ARP Inspection, BPDU Guard, Root Guard and storm control. Real Packet Tracer output explained line by line, with every real IOS vs. Packet Tracer difference called out.

Download the lab

Verify your download (SHA-256)
FileSHA-256
l2-attack-prevention-baseline.pkt398c1dd3b99267e1bd04f9fd5746d9c03bdb0212c5dabc19750c03dfe7af11a4
l2-attack-prevention.pka2a70049d8c0d2546af2f5056acb59767b9b760d276ff7d9415e7fefaa629b124

Compare with Get-FileHash .\file.pkt -Algorithm SHA256 (PowerShell) or sha256sum file.pkt. Different hash, different file: delete it.

Read the Segmentation & Layer 2 Hardening notes first. Topics: 2.3

show ip route | toc (13 sections)
  1. What you'll build
  2. Real IOS vs. Packet Tracer: read this first
  3. Devices and topology
  4. Phase 0: base build and baseline attacks
  5. Phase 1: DHCP snooping
  6. Phase 2: Dynamic ARP Inspection
  7. Phase 3: STP protection
  8. Phase 4: storm control
  9. Phase 5: validation
  10. Troubleshooting
  11. Answer configs
  12. Go further in Cisco Modeling Labs
  13. Exam mapping

What you'll build

One small office network, attacked and then defended in five phases. Every phase runs the same loop: run the attack, apply the protection, prove the attack now fails. If you never see the attack succeed, a passing show command proves nothing, so Phase 0 starts with an unprotected network and attacks it first.

ItemDetail
ToolCisco Packet Tracer 9.0 or later
Time2 to 3 hours
LevelCCNP Security. You should already be comfortable with VLANs, trunks and the switch CLI
Devices3650 access switch, 3560 distribution switch, 2911 router, two rogue 2960 switches, a rogue DHCP server, an attacker laptop, a printer, two PCs
You'll practiceDHCP snooping, Dynamic ARP Inspection, PortFast + BPDU Guard, Root Guard, storm control, trunk and unused-port hardening, and how to recover an err-disabled port
Exam topic2.3 (core)
Before thisSegmentation & Layer 2 Hardening notes and the Layer 2 Hardening lab
PhaseYou configureAttack you prove firstResult in Packet Tracer
0 BaselineNothing new: read the base configsRogue DHCP hands PC1 a fake gateway; ARP goes uncheckedAttack works
1 DHCP snoopingTrusted uplink, untrusted host ports, rate limit, binding tableRogue DHCP serverProtection works
2 Dynamic ARP InspectionDAI on VLAN 10, trusted uplink, validation checksStatic-IP attacker sends ARP with no bindingConfig and show output only
3 STP protectionPortFast + BPDU Guard, Root GuardRogue switch on a user port; rogue switch claims rootProtection works
4 Storm controlBroadcast thresholdsBroadcast floodConfig and show output only
5 ValidationNothing newEvery attack againChecklist

The files

FileWhat it isHow to use it
Baseline lab (.pkt)The network with Phase 0 done: addressing, VLANs, trunk, DHCP on R1, the rogue server ready. No Layer 2 protectionOpen it and start at the baseline attacks in Phase 0
Activity (.pka)The same lab as a Packet Tracer activity with these instructions built inFollow the steps inside Packet Tracer. It is not graded: the completion bar shows 100% from the start, so prove each phase with the show commands on this page instead

Both files are in the download box on this page. The SHA-256 checksums are listed at the bottom so you can confirm your download wasn't changed.

Think like the defender first

Before you type anything, look at the topology and answer two questions for every port on ASW1: who should be on the other end, and what is it allowed to send?

  • A PC port should never send a DHCP OFFER, never ARP for an address it wasn't given, never send a BPDU and never flood broadcasts.
  • The uplink toward DSW1 and R1 is the only place DHCP server replies and the gateway's ARP may legitimately come from.

Every protection in this lab is one of those answers turned into a command. The access edge is untrusted, the uplink is trusted, and the switch enforces the difference. Keep that model in your head and the commands stop being a list to memorize.

Real IOS vs. Packet Tracer: read this first

Packet Tracer simulates IOS; it doesn't run it. Some commands are rejected outright, and some are accepted but not enforced, which is worse, because the configuration looks right and nothing happens. The exam tests real IOS, so every phase shows the real IOS commands first, then what to type in Packet Tracer when it differs.

Feature or commandReal IOSPacket Tracer 3650-24PSWhat to do in this lab
P0: Rogue DHCP raceWhichever server answers first winsR1 always answers first, so the rogue never winsTurn R1's DHCP off with no service dhcp to run the attack
P1: show ip dhcp snooping operational lineLists VLAN 10 as operationalCan show none even when snooping worksJudge by the trusted port, the rate limits and the leases
P1: Binding lease timeCounts down from the leaseShows 0Ignore it
P2: DAI enforcementARP without a binding is dropped and countedAccepted, VLAN 10 shows Active, but nothing is dropped and Dropped stays 0Config and show output only
P2: ip arp inspection limit rate 15 (interface)Sets the ARP rate limitRejected; only trust exists under the interfaceSkip it. The 15 pps default still shows
P2: arp access-list + ip arp inspection filterLets static hosts through DAIRejectedMove PRINTER to DHCP
P2: ip source binding, EXEC ip dhcp snooping bindingAdds a static bindingRejectedMove PRINTER to DHCP
P2: Printer-PTn/aNo Desktop tab or command promptTest PRINTER by pinging it from PC1
P3: spanning-tree guard loop, spanning-tree loopguard defaultLoop GuardRejected; spanning-tree guard ? offers only rootLearn it, skip it
P3: Root Guard stateBKN* with ROOT_IncBLK, plus a ROOTGUARDBLOCK logSame meaning
P3: err-disable recoveryerrdisable recovery timer, or manualUse manual recoveryshutdown then no shutdown
P4: storm-control multicast / unicastThresholds for those traffic typesOnly broadcast existsBroadcast only
P4: Falling threshold (level 20.00 10.00)Rising and falling thresholdsFalling value rejectedlevel 20.0; lower shows the same as upper
P4: storm-control action trap or shutdownLog/trap or err-disable the portRejectedSkip it. Excess broadcast is dropped and the port stays up
P4: Broadcast flood testPort trips at the thresholdA broadcast ping is about 600 bps, far below 1% of 100 MbpsConfig and show output only

Check before you type. Use ? at the prompt (for example ASW1(config-if)# storm-control ?). Packet Tracer support changes between versions. If a command is rejected, write it down and carry on.

Simulation devices aren't the whole answer either. In Cisco Modeling Labs, IOSvL2 switches run real IOS code and do enforce DHCP snooping and DAI, so that's where to watch spoofed ARP actually get dropped. Features that depend on switch hardware, such as storm control, may still be accepted there without being enforced. Verify with ? and the show commands on any virtual switch.

Devices and topology

Packet Tracer topology: R1 above DSW1, DSW1 trunked to ASW1; PC1, PC2, PRINTER, ROGUE-DHCP and ATTACKER on ASW1; ROGUE-SW1 on ASW1 and ROGUE-SW2 on DSW1
Packet Tracer topology: R1 above DSW1, DSW1 trunked to ASW1; PC1, PC2, PRINTER, ROGUE-DHCP and ATTACKER on ASW1; ROGUE-SW1 on ASW1 and ROGUE-SW2 on DSW1. Select the image to open it full size.

Every host and both rogue devices enter through ASW1's access ports, so that's where most protections go. DSW1 has one job to defend: staying the spanning-tree root. Everything sits in one user VLAN (10) so each attack is easy to see.

Why a 3650 for the access switch

ASW1 is a 3650-24PS. It runs IOS XE, supports every feature in this lab on real hardware, and is the most complete switch Packet Tracer offers. Even so, it accepts more than it enforces in the simulator (see the table above).

3650 gotcha: a new 3650-24PS has no power supply, so the CLI stays dark. Open it, go to the Physical tab, drag AC-POWER-SUPPLY into the empty slot, and it boots. The baseline file already has it.

Devices

HostnamePacket Tracer modelRoleConfigured on it
ASW13650-24PSAccess switchDHCP snooping, DAI, PortFast, BPDU Guard, storm control, port hardening
DSW13560-24PSDistribution switch, STP rootRoot priority, Root Guard, trunk hardening
R12911Gateway and legitimate DHCP serverDHCP pool for VLAN 10
ROGUE-SW12960-24TTAttacker's switch on a user portNothing. A switch sends BPDUs by default
ROGUE-SW22960-24TTAttacker's switch claiming rootspanning-tree vlan 10 priority 0
ROGUE-DHCPServer-PTRogue DHCP serverDHCP service with a fake gateway
ATTACKERLaptop-PTStatic-IP spooferStatic IP, no DHCP binding
PRINTERPrinter-PTLegitimate static hostStatic IP, moved to DHCP in Phase 2
PC1, PC2PC-PTLegitimate usersDHCP

Cabling

Device APortDevice BPortLinkCable
R1Gi0/0DSW1Fa0/1Access VLAN 10Straight-through
DSW1Gi0/1ASW1Gi1/0/24802.1Q trunk, native VLAN 99Cross-over
ASW1Gi1/0/1PC1Fa0Access VLAN 10Straight-through
ASW1Gi1/0/2PC2Fa0Access VLAN 10Straight-through
ASW1Gi1/0/3ROGUE-DHCPFa0Access VLAN 10Straight-through
ASW1Gi1/0/4ATTACKERFa0Access VLAN 10Straight-through
ASW1Gi1/0/5PRINTERFa0Access VLAN 10Straight-through
ASW1Gi1/0/10ROGUE-SW1Fa0/1Access VLAN 10, Phase 3 testCross-over
DSW1Fa0/10ROGUE-SW2Fa0/1Trunk, Phase 3 testCross-over

VLANs and addressing

VLANNameSubnetPurpose
10USERS10.10.10.0/24All hosts
99NATIVEnoneUnused native VLAN on trunks
999BLACKHOLEnoneParking VLAN for unused, shut ports
DeviceInterfaceIP addressGatewayHow assigned
R1Gi0/010.10.10.1/24n/aStatic
ASW1Vlan1010.10.10.2/2410.10.10.1Static (management)
DSW1Vlan1010.10.10.3/2410.10.10.1Static (management)
PRINTERFa010.10.10.15/2410.10.10.1Static in Phases 0 and 1, DHCP from Phase 2
ATTACKERFa010.10.10.50/2410.10.10.1Static, no binding on purpose
ROGUE-DHCPFa010.10.10.66/2410.10.10.66Static. Its pool hands out gateway .66
PC1, PC2Fa0from R1's pool (.21 to .254)10.10.10.1DHCP from R1 (.1 to .20 excluded)

Management sits in VLAN 10 to keep the lab small. In production, put switch management in its own VLAN, as the Layer 2 Hardening lab does.

Phase 0: base build and baseline attacks

The baseline file already contains everything in this section. Read the configs so you know what you're defending, then go straight to the baseline attacks. If you build from scratch, paste these in and set up the end devices as listed.

R1: gateway and legitimate DHCP server

hostname R1
no ip domain-lookup
!
interface GigabitEthernet0/0
 ip address 10.10.10.1 255.255.255.0
 no shutdown
!
ip dhcp excluded-address 10.10.10.1 10.10.10.20
ip dhcp pool VLAN10
 network 10.10.10.0 255.255.255.0
 default-router 10.10.10.1
 dns-server 10.10.10.1

The excluded range keeps .1 to .20 free for infrastructure and static hosts, so the first lease R1 hands out is 10.10.10.21.

DSW1: distribution switch and STP root

hostname DSW1
no ip domain-lookup
!
vlan 10
 name USERS
vlan 99
 name NATIVE
vlan 999
 name BLACKHOLE
!
spanning-tree mode rapid-pvst
spanning-tree vlan 10,99 priority 4096
!
interface FastEthernet0/1
 description R1
 switchport mode access
 switchport access vlan 10
 spanning-tree portfast
!
interface GigabitEthernet0/1
 description TRUNK-ASW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 switchport nonegotiate
!
interface range FastEthernet0/2 - 9 , FastEthernet0/11 - 24 , GigabitEthernet0/2
 switchport mode access
 switchport access vlan 999
 shutdown
!
interface Vlan10
 ip address 10.10.10.3 255.255.255.0
 no shutdown
ip default-gateway 10.10.10.1
  • priority 4096 makes DSW1 the root on purpose. Never leave the root to chance: the lowest bridge ID wins, and on default priorities that's the switch with the lowest MAC, often the oldest one.
  • The 3560 also supports ISL, so it needs switchport trunk encapsulation dot1q before switchport mode trunk.
  • Fa0/10 is left alone. Phase 3 turns it into the Root Guard test port.

ASW1: access switch

hostname ASW1
no ip domain-lookup
!
vlan 10
 name USERS
vlan 99
 name NATIVE
vlan 999
 name BLACKHOLE
!
spanning-tree mode rapid-pvst
!
interface GigabitEthernet1/0/24
 description TRUNK-DSW1 (path to the real DHCP server)
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 switchport nonegotiate
!
interface range GigabitEthernet1/0/1 - 5
 description USER-PORTS
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 no shutdown
!
interface GigabitEthernet1/0/10
 description ROGUE-SW1-TEST-PORT
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
!
interface range GigabitEthernet1/0/6 - 9 , GigabitEthernet1/0/11 - 23 , GigabitEthernet1/1/1 - 4
 switchport mode access
 switchport access vlan 999
 shutdown
!
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 no shutdown
ip default-gateway 10.10.10.1

Trunk hardening (native VLAN 99, only VLANs 10 and 99 allowed, no DTP) and parking unused ports in VLAN 999 are already done here. They stop VLAN hopping and walk-up access, which the Layer 2 Hardening lab covers step by step.

End devices

  1. PC1, PC2: Desktop → IP Configuration → DHCP.
  2. PRINTER: Config → FastEthernet0 → Static, 10.10.10.15 / 255.255.255.0, gateway 10.10.10.1 (Config → Settings).
  3. ATTACKER: Desktop → IP Configuration → Static, 10.10.10.50 / 255.255.255.0, gateway 10.10.10.1.
  4. ROGUE-DHCP: static 10.10.10.66 / 255.255.255.0. Then Services → DHCP: interface FastEthernet0, default gateway 10.10.10.66, DNS server 10.10.10.66, start IP address 10.10.10.100, subnet mask 255.255.255.0. Click Save, then set the service to On.

Keep the rogue switches out of the way. If ROGUE-SW1 and ROGUE-SW2 are already cabled in your file, delete those two cables now and reconnect them in Phase 3. Cabled early, they fill ASW1's console with CDP native VLAN mismatch messages and can trip BPDU Guard before you've configured it on purpose.

Baseline attack 1: the rogue DHCP server wins

In real networks the first DHCP server to answer wins the client. Packet Tracer always lets R1 answer first, so take R1 out of the race:

  1. On R1: enable, configure terminal, no service dhcp.
  2. On PC1: Desktop → Command Prompt, then ipconfig /release and ipconfig /renew.
  3. On R1: service dhcp.
  4. On PC1: ipconfig /release and ipconfig /renew again.
PC1 command prompt: the first renew gets 10.10.10.102 with default gateway and DNS 10.10.10.66 from the rogue server; after R1's DHCP is back, the next renew gets gateway 10.10.10.1
PC1 command prompt: the first renew gets 10.10.10.102 with default gateway and DNS 10.10.10.66 from the rogue server; after R1's DHCP is back, the next renew gets gateway 10.10.10.1. Select the image to open it full size.

Read the output:

  • First renew: default gateway 10.10.10.66 and DNS 10.10.10.66. PC1 now sends everything that leaves the subnet, and every name lookup, to the attacker. That's a man-in-the-middle position without touching a single cable.
  • The address .102 comes from the rogue pool (start .100), not from R1's.
  • Second renew, after service dhcp on R1: gateway 10.10.10.1. The network works again only because the rogue lost the race this time. Nothing stopped it.

Baseline attack 2: ARP is unchecked

From ATTACKER's Command Prompt, ping 10.10.10.1 and ping 10.10.10.15. Both succeed, although nobody approved ATTACKER's static address. A switch with no DAI forwards any ARP from anyone, which is exactly what ARP spoofing relies on.

Baseline check: who is the STP root?

On ASW1:

show spanning-tree vlan 10
ASW1 show spanning-tree vlan 10 at baseline: root priority 4106 at address 000D.BD7A.A1B9, cost 4, root port Gi1/0/24; ASW1's own priority is 32778 and all user ports are designated forwarding
ASW1 show spanning-tree vlan 10 at baseline: root priority 4106 at address 000D.BD7A.A1B9, cost 4, root port Gi1/0/24; ASW1's own priority is 32778 and all user ports are designated forwarding. Select the image to open it full size.

Read the output:

  • Root ID priority 4106 is DSW1: 4096 configured + 10, the VLAN number. Rapid PVST+ adds the VLAN ID (the sys-id-ext) to the priority, which is why 4096 shows as 4106.
  • Root port 24 (Gi1/0/24), cost 4: ASW1 reaches the root over the uplink. That's the topology you want.
  • Bridge ID priority 32778 (32768 + 10) is ASW1 itself, on the default priority.
  • Every user port is Desg FWD. Remember this picture: Phase 3 defends it.

Save with copy running-config startup-config on every switch and the router, then save the file (Ctrl+S).

Think about it: why is the rogue DHCP attack so dangerous when it "only" changes a gateway?

The gateway is where every off-subnet packet goes. Whoever owns it can read, change or drop traffic, and with a fake DNS server can send users to fake sites. The attacker needs no password and no exploit, only a device on a user port that answers DHCP quickly. That's why the fix belongs on the switch port: the switch is the only device that knows which port a DHCP reply came in on.

Phase 1: DHCP snooping

DHCP snooping makes ASW1 drop DHCP server messages (OFFER, ACK, NAK) that arrive on untrusted ports. ROGUE-DHCP sits on an untrusted port, so it goes silent. Snooping also builds the binding table (MAC, IP, VLAN, port for every lease it watched), which DAI uses in Phase 2. Deeper theory: DHCP snooping in the notes.

Configure ASW1

configure terminal
ip dhcp snooping
ip dhcp snooping vlan 10
no ip dhcp snooping information option
!
interface GigabitEthernet1/0/24
 ip dhcp snooping trust
!
interface range GigabitEthernet1/0/1 - 5 , GigabitEthernet1/0/10
 ip dhcp snooping limit rate 10
end
CommandWhy it's there
ip dhcp snooping + ip dhcp snooping vlan 10Both are required. The global command alone does nothing until a VLAN is listed
ip dhcp snooping trust on Gi1/0/24Only the uplink toward R1 may send OFFER and ACK. Every port is untrusted by default, and that's the point
ip dhcp snooping limit rate 10More than 10 DHCP packets per second err-disables the port. That stops DHCP starvation tools, which request thousands of leases to empty the pool
no ip dhcp snooping information optionBy default the switch inserts option 82 with a relay address (giaddr) of 0.0.0.0. An IOS DHCP server such as R1 drops those requests, so nobody gets a lease. The other fix is ip dhcp relay information trust-all on R1

Common mistake: trusting a user port "to make DHCP work". If a PC can't get a lease, the uplink isn't trusted or option 82 is in the way. A host port is never the fix.

Prove it: the configuration

show ip dhcp snooping
ASW1 show ip dhcp snooping: snooping enabled and configured on VLAN 10, option 82 insertion disabled, Gi1/0/1 to 1/0/5 and 1/0/10 untrusted with rate limit 10, Gi1/0/24 trusted and unlimited
ASW1 show ip dhcp snooping: snooping enabled and configured on VLAN 10, option 82 insertion disabled, Gi1/0/1 to 1/0/5 and 1/0/10 untrusted with rate limit 10, Gi1/0/24 trusted and unlimited. Select the image to open it full size.

Read the output:

  • Switch DHCP snooping is enabled, configured on VLAN 10.
  • Insertion of option 82 is disabled: the no ip dhcp snooping information option line took effect.
  • Gi1/0/24: Trusted yes, unlimited. Every host port: Trusted no, rate limit 10.
  • "Operational on following VLANs: none" is a Packet Tracer display quirk. The leases below prove snooping is running.

Prove it: the attack fails

On PC1 and PC2, ipconfig /release then ipconfig /renew, several times each.

PC1 after renewing with DHCP snooping on: 10.10.10.21 from R1's pool, default gateway and DNS 10.10.10.1
PC1 after renewing with DHCP snooping on: 10.10.10.21 from R1's pool, default gateway and DNS 10.10.10.1. Select the image to open it full size.

Every lease comes from R1's pool (10.10.10.21 here, the first address after the excluded range) with gateway 10.10.10.1. However many times you renew, ROGUE-DHCP never wins.

Watch the drop happen in Simulation mode. Switch to Simulation (bottom right, or Shift+S). Under Event List Filters, click Edit Filters, clear everything and tick DHCP only. On PC2 run ipconfig /renew, then press Play and watch the envelopes.

Simulation mode with only DHCP events shown: the rogue server's frame reaches ASW1 and is marked with a red X; the PDU details show Gi1/0/3 received the frame from ROGUE-DHCP
Simulation mode with only DHCP events shown: the rogue server's frame reaches ASW1 and is marked with a red X; the PDU details show Gi1/0/3 received the frame from ROGUE-DHCP. Select the image to open it full size.

Read the output: the event list shows PC2's DISCOVER flooding out to every port, including ROGUE-DHCP. ROGUE-DHCP replies (last event, from ROGUE-DHCP at ASW1), and the envelope at ASW1 gets a red X. Click it: GigabitEthernet1/0/3 receives the frame and goes no further. The legitimate OFFER from R1 arrives on the trusted uplink and is forwarded.

The strongest proof: repeat the baseline attack. On R1, no service dhcp, then renew PC1. With snooping on, PC1 now gets no lease at all ("DHCP request failed" or a 169.254.x.x address). The only DHCP server left is the rogue, and its OFFER dies at Gi1/0/3. Failing safe is the correct result: no address beats an address with a malicious gateway. Then run service dhcp on R1 and renew PC1 again.

Exam points: trust every uplink on the path to the legitimate server, never a host port. Snooping only works on the VLANs you list. The binding table it builds is the foundation for DAI and IP Source Guard.

Think about it: why does snooping need both trust and a rate limit?

Trust solves the rogue server problem: replies are only believed from the direction of the real server. The rate limit solves starvation: an attacker floods DISCOVERs with random MACs until R1's pool is empty, then their own rogue server is the only one with addresses left. One feature, two attacks, two settings.

Phase 2: Dynamic ARP Inspection

ARP has no authentication: any host can claim to own any IP address. DAI makes the switch check every ARP packet on an untrusted port against the DHCP snooping binding table, and drop it if the sender's IP and MAC don't match a binding learned on that port. Phase 1 must be working first. Deeper theory: DAI and IP Source Guard.

Packet Tracer result: the 3650 accepts the DAI commands and shows VLAN 10 as Active, but ATTACKER can still ping and nothing is dropped. Do this phase for the configuration and the show output, and learn the real IOS behavior below for the exam.

Step A: turn on DAI

Real IOS:

configure terminal
ip arp inspection vlan 10
ip arp inspection validate src-mac dst-mac ip
!
interface GigabitEthernet1/0/24
 ip arp inspection trust
!
interface range GigabitEthernet1/0/1 - 5 , GigabitEthernet1/0/10
 ip arp inspection limit rate 15
end

Packet Tracer 3650: the same, without the limit rate line (rejected).

CommandWhy it's there
ip arp inspection vlan 10Turns DAI on for the VLAN. All ports are untrusted by default
ip arp inspection trust on Gi1/0/24R1 has a static IP, so it has no binding. Left untrusted, its ARP replies would be dropped and the whole VLAN would lose its gateway
validate src-mac dst-mac ipExtra checks: the Ethernet source MAC must equal the ARP sender MAC; on replies, the Ethernet destination MAC must equal the ARP target MAC; no 0.0.0.0, broadcast or multicast IPs
limit rate 1515 ARP packets per second is already the default on untrusted ports. Going over err-disables the port. Full syntax: ip arp inspection limit rate <pps> [burst interval <seconds>]

Clear old ARP caches before testing, or cached entries hide the result: arp -d on each PC and on ATTACKER, clear arp-cache on R1.

TestReal IOSPacket Tracer
PC1 → ping 10.10.10.1Succeeds: PC1 has a bindingSucceeds
ATTACKER → ping 10.10.10.1Fails. ASW1 logs a DAI deny for 10.10.10.50 on Gi1/0/4Still succeeds
PC1 → ping 10.10.10.15Fails. PRINTER is static, has no binding, so its ARP reply is droppedStill succeeds

That last row is the real-world side effect of DAI: every static host breaks unless you plan for it. Step B fixes it.

Step B: let the legitimate static host through

Real IOS: permit the printer with an ARP ACL. Get its MAC from PRINTER → Config → FastEthernet0, or from show mac address-table interface gi1/0/5, and use it in place of AAAA.BBBB.CCCC:

arp access-list STATIC-HOSTS
 permit ip host 10.10.10.15 mac host AAAA.BBBB.CCCC
!
ip arp inspection filter STATIC-HOSTS vlan 10

The switch checks the ARP ACL first, then the binding table. Adding the static keyword to the filter command makes the ACL the only check, with an implicit deny at the end. Leave it off here.

Packet Tracer 3650: none of the ways to add a static exception exist. arp access-list, ip source binding and the EXEC command ip dhcp snooping binding are all rejected. Instead, move the printer to DHCP so snooping creates its binding:

  1. PRINTER → Config → FastEthernet0 → DHCP.
  2. Wait for it to get an address from R1's pool. Printer-PT has no command prompt, so check its new address on the same FastEthernet0 screen.
  3. On ASW1, show ip dhcp snooping binding.
ASW1 show ip dhcp snooping binding: three bindings, 10.10.10.21 on Gi1/0/1, 10.10.10.22 on Gi1/0/2 and 10.10.10.23 on Gi1/0/5 for the printer, all VLAN 10
ASW1 show ip dhcp snooping binding: three bindings, 10.10.10.21 on Gi1/0/1, 10.10.10.22 on Gi1/0/2 and 10.10.10.23 on Gi1/0/5 for the printer, all VLAN 10. Select the image to open it full size.

Read the output: three bindings, one per DHCP client. PC1 on Gi1/0/1, PC2 on Gi1/0/2, and now PRINTER (10.10.10.23) on Gi1/0/5. ATTACKER (static) and ROGUE-DHCP have no row, so on real IOS DAI would drop their ARP. Lease(sec) shows 0 in Packet Tracer; on real IOS it counts down. From PC1, ping the printer's new address to confirm it's reachable.

Prove it: the show commands

show ip arp inspection vlan 10
show ip arp inspection interfaces
show ip arp inspection statistics vlan 10
ASW1 show ip arp inspection vlan 10: source MAC, destination MAC and IP validation enabled; VLAN 10 configuration enabled, operation active; ACL logging deny, DHCP logging deny
ASW1 show ip arp inspection vlan 10: source MAC, destination MAC and IP validation enabled; VLAN 10 configuration enabled, operation active; ACL logging deny, DHCP logging deny. Select the image to open it full size.

Read the output: all three validation checks Enabled; VLAN 10 Configuration Enabled, Operation Active. ACL Match is empty because Packet Tracer has no ARP ACL; on real IOS it would show STATIC-HOSTS. DHCP Logging Deny means ARP packets denied by the binding check are logged.

ASW1 show ip arp inspection interfaces: Gig1/0/24 trusted, every other port untrusted at 15 pps with a burst interval of 1
ASW1 show ip arp inspection interfaces: Gig1/0/24 trusted, every other port untrusted at 15 pps with a burst interval of 1. Select the image to open it full size.

Read the output: Gig1/0/24 Trusted, every other port Untrusted, 15 pps, burst interval 1. The 15 pps is the default, which is why it shows even though Packet Tracer rejected the limit rate command.

ASW1 show ip arp inspection statistics vlan 10 in Packet Tracer: 7 forwarded, 7 DHCP permits, 0 dropped, 0 DHCP drops, 0 ACL drops and no validation failures
ASW1 show ip arp inspection statistics vlan 10 in Packet Tracer: 7 forwarded, 7 DHCP permits, 0 dropped, 0 DHCP drops, 0 ACL drops and no validation failures. Select the image to open it full size.

Read the output: Forwarded 7, DHCP Permits 7: ARP from clients with bindings was checked and allowed. Dropped 0 even after ATTACKER pinged. On real IOS, Dropped and DHCP Drops climb with every ATTACKER ping. That's the simulator, not your configuration.

To watch DAI actually drop spoofed ARP, rebuild this phase in Cisco Modeling Labs with IOSvL2 switches.

Think about it: why does DAI trust the uplink instead of checking R1 against a binding?

DAI can only validate what DHCP snooping saw being leased. R1, servers and printers with static addresses never lease anything, so they have no binding. You either trust the port they arrive on (the uplink, where the gateway lives) or describe them in an ARP ACL. Trusting a host port would let anyone on that port spoof any address, so you only trust ports that face infrastructure.

Phase 3: STP protection

STP believes the best BPDU it hears. An attacker who plugs in a switch can either join the topology from a user port or announce a better priority and become root, pulling traffic through their own switch. Three guards stop this; Packet Tracer supports the first two. Deeper theory: Spanning tree protection.

FeatureWhereTriggerResultRecovery
PortFast + BPDU GuardASW1 host portsAny BPDU receivedPort err-disabledManual: shutdown then no shutdown
Root GuardDSW1 downlinksA superior BPDU (better priority) receivedPort root-inconsistent (blocking)Automatic once superior BPDUs stop
Loop GuardASW1 uplink (root port)BPDUs stop arrivingPort loop-inconsistent (blocking)Automatic once BPDUs return

ASW1: PortFast and BPDU Guard on the user ports

configure terminal
interface range GigabitEthernet1/0/1 - 5 , GigabitEthernet1/0/10
 spanning-tree portfast
 spanning-tree bpduguard enable
end
  • PortFast lets a host port forward straight away instead of waiting through STP states. It's only safe where a host, never a switch, is connected.
  • BPDU Guard enforces that promise: the moment a BPDU arrives, the port is err-disabled.
  • If the switch prompts for spanning-tree portfast edge (newer IOS XE syntax), use that form. The global alternative is spanning-tree portfast default plus spanning-tree portfast bpduguard default, which applies BPDU Guard to every PortFast port.

Real IOS only, Loop Guard on the uplink:

interface GigabitEthernet1/0/24
 spanning-tree guard loop

In Packet Tracer, spanning-tree guard ? under Gi1/0/24 offers only root. Skip Loop Guard here, but know it for the exam: if the uplink stops receiving BPDUs (a one-way fiber, for example), Loop Guard blocks it instead of letting it move to forwarding and create a loop.

configure terminal
interface GigabitEthernet0/1
 spanning-tree guard root
!
interface FastEthernet0/10
 description ROGUE-SW2-TEST-DOWNLINK
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 spanning-tree guard root
 no shutdown
end

Where Root Guard goes: on the root's ports that face away from the root, where a better BPDU should never appear. Never on ASW1 Gi1/0/24: that port faces the root, so it receives the root's superior BPDUs all the time, and Root Guard would block your own uplink. Root Guard and Loop Guard can't run on the same port, which is why Root Guard sits on DSW1's side of the trunk and Loop Guard on ASW1's side.

Attack 1: a rogue switch on a user port (BPDU Guard)

  1. Add or reuse ROGUE-SW1 (2960-24TT), with no configuration.
  2. Cable its Fa0/1 to ASW1 Gi1/0/10 with a cross-over cable.
  3. Watch ASW1's console. On real IOS you'll see %SPANTREE-2-BLOCK_BPDUGUARD followed by %PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/10. The link lights turn red.
  4. Check the port:
show interfaces gigabitEthernet1/0/10 status
ASW1 show interface g1/0/10 status: port ROGUE-SW1-TEST-POR in VLAN 10 is err-disabled
ASW1 show interface g1/0/10 status: port ROGUE-SW1-TEST-POR in VLAN 10 is err-disabled. Select the image to open it full size.

Read the output: Gi1/0/10 is err-disabled. A default switch sent a BPDU, and BPDU Guard shut the port before the rogue switch could join the topology. On real IOS, show interfaces status err-disabled lists every err-disabled port with the reason, here bpduguard.

Recover the port manually. Delete the cable to ROGUE-SW1 first: if you bring the port up with the rogue switch still attached, it err-disables again straight away. Then, on ASW1:

configure terminal
interface GigabitEthernet1/0/10
 shutdown
 no shutdown
end
  • show interfaces gigabitEthernet1/0/10 status now shows notconnect: the port is healthy and waiting.
  • Nothing legitimate lives on Gi1/0/10, so shut it again. A port with nothing to serve stays off. That's why Gi1/0/10 shows disabled in Phase 5.

Exam note: real IOS can recover err-disabled ports on a timer (errdisable recovery cause bpduguard with errdisable recovery interval). Manual recovery is the safer habit for BPDU Guard: someone should find out why a switch appeared on a user port before the port comes back.

Attack 2: a rogue switch claims root (Root Guard)

First, configure the attack on ROGUE-SW2 (2960-24TT):

enable
configure terminal
hostname ROGUE-SW2
vlan 10
vlan 99
exit
spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 0
interface FastEthernet0/1
 switchport mode trunk
 switchport trunk native vlan 99
end

Then launch it:

  1. Cable ROGUE-SW2 Fa0/1 to DSW1 Fa0/10 with a cross-over cable.
  2. ROGUE-SW2 now sends BPDUs with priority 0 + 10 = 10, better than DSW1's 4106. Without Root Guard, it would become root and every switch would recalculate toward it.
  3. On DSW1, watch the console, then run show spanning-tree vlan 10.
DSW1 console: SPANTREE-2-ROOTGUARDBLOCK on port 0/10, moved to root-inconsistent state; show spanning-tree vlan 10 still says this bridge is the root at priority 4106, with Fa0/10 designated but blocking
DSW1 console: SPANTREE-2-ROOTGUARDBLOCK on port 0/10, moved to root-inconsistent state; show spanning-tree vlan 10 still says this bridge is the root at priority 4106, with Fa0/10 designated but blocking. Select the image to open it full size.

Read the output:

  • %SPANTREE-2-ROOTGUARDBLOCK ... Moved to root-inconsistent state: Root Guard saw the superior BPDU on Fa0/10 and refused it.
  • This bridge is the root, priority 4106: DSW1 kept the role. The attack failed.
  • Fa0/10: Desg BLK. The port is blocking, so no traffic passes to or from ROGUE-SW2. On real IOS this shows as BKN* with ROOT_Inc, and show spanning-tree inconsistentports lists it.
  • Gi0/1 (to ASW1) and Fa0/1 (to R1) stay FWD: the rest of the network never noticed.

Remove the attack. On ROGUE-SW2: configure terminal, spanning-tree vlan 10 priority 32768, end. Wait a few seconds, then show spanning-tree vlan 10 on DSW1 again.

DSW1 show spanning-tree vlan 10 after ROGUE-SW2 returns to the default priority: DSW1 is still the root and Fa0/10 is designated forwarding again
DSW1 show spanning-tree vlan 10 after ROGUE-SW2 returns to the default priority: DSW1 is still the root and Fa0/10 is designated forwarding again. Select the image to open it full size.

Read the output: Fa0/10 is back to Desg FWD on its own. No shutdown / no shutdown was needed. That's the key difference from BPDU Guard: Root Guard blocks only while superior BPDUs keep arriving, because the neighbor might be a legitimate switch that was simply misconfigured.

Exam note on BPDU Filter: spanning-tree bpdufilter enable on an interface stops it sending and receiving BPDUs, which disables STP there and can cause loops. The global spanning-tree portfast bpdufilter default is safer: a PortFast port that receives a BPDU loses PortFast and runs normal STP. Never combine BPDU Filter with BPDU Guard on a port: the filter wins and the guard never fires.

Think about it: BPDU Guard and Root Guard both react to BPDUs. Why do they behave so differently?

They answer different questions. BPDU Guard asks "should any switch be here?" On a user port the answer is no, so any BPDU is proof of a policy violation and the port is shut until a human looks. Root Guard asks "should a better root appear here?" A downstream switch on that port is fine; only a superior BPDU is wrong, so it blocks while the problem exists and recovers by itself. Pick the guard by asking what's legitimately allowed on the port.

Phase 4: storm control

A broadcast storm, from a loop or a flood tool, makes every switch forward the same frames to every port until links and CPUs saturate. Storm control measures broadcast, multicast or unicast traffic on a port over 1-second intervals and acts once it passes a rising threshold (percent of link bandwidth). Forwarding of that traffic type resumes when it drops below the falling threshold. Deeper theory: Storm control.

Real IOS:

interface range GigabitEthernet1/0/1 - 3 , GigabitEthernet1/0/5
 storm-control broadcast level 20.00 10.00
 storm-control multicast level 30.00 20.00
 storm-control action trap
!
interface GigabitEthernet1/0/4
 description ATTACKER - strict policy
 storm-control broadcast level 1.00 0.50
 storm-control action shutdown

Packet Tracer 3650: only the broadcast level exists, without a falling level or an action. Run storm-control ? under an interface to see this for yourself, then configure:

configure terminal
interface range GigabitEthernet1/0/1 - 3 , GigabitEthernet1/0/5
 storm-control broadcast level 20.0
!
interface GigabitEthernet1/0/4
 description ATTACKER - strict policy
 storm-control broadcast level 1.0
end
ActionOver the threshold
none (default)Excess traffic of that type is dropped; the port stays up
trapExcess is dropped, plus a log message and an SNMP trap
shutdownThe port goes err-disabled until recovered with shutdown / no shutdown

Full syntax: storm-control {broadcast | multicast | unicast} level {rising [falling] | bps ... | pps ...}. With no falling level, the falling level equals the rising level.

Prove it

show storm-control broadcast
ASW1 show storm-control broadcast: Gi1/0/1, 1/0/2, 1/0/3 and 1/0/5 link up with upper and lower 20 percent; Gi1/0/4 link up with upper and lower 1 percent; current 0 percent on all
ASW1 show storm-control broadcast: Gi1/0/1, 1/0/2, 1/0/3 and 1/0/5 link up with upper and lower 20 percent; Gi1/0/4 link up with upper and lower 1 percent; current 0 percent on all. Select the image to open it full size.

Read the output:

  • User ports: Upper 20.00%. Lower is also 20.00% because Packet Tracer has no falling level. On real IOS it would show 10.00%.
  • Gi1/0/4 (ATTACKER): 1.00%, the strict policy for the port you trust least.
  • Filter State Link Up: no port is over its threshold. When broadcast exceeds the upper level, the state changes to Blocking (or the port err-disables with action shutdown).
  • Current 0.00%: the measured broadcast load right now.

Why a flood test won't trip it: from ATTACKER, ping -t 10.10.10.255 sends one broadcast per second, roughly 600 bps. 1% of a 100 Mbps link is 1 Mbps, well over a thousand minimum-size frames per second. Even on real IOS a ping won't cross that. The configuration and show output are what the exam tests.

Think about it: why give the attacker's port 1% when user ports get 20%?

Thresholds are a policy statement about each port. A normal PC sends a few broadcasts per second (ARP, DHCP), nowhere near 1% of a gigabit port, so a tight limit costs nothing and catches a flood early. User ports get headroom so a busy workstation or an imaging job isn't cut off by mistake. In production you'd baseline real traffic first and set thresholds just above normal.

Phase 5: validation

The lab passes when every attack from Phase 0 fails and every legitimate host still works. On real IOS that's every row below. In Packet Tracer, judge each row by its Packet Tracer column. Run through it end to end after reopening your saved file.

Attack results

AttackProtectionReal IOSPacket Tracer
Rogue DHCP serverDHCP snoopingEvery PC gets gateway .1Works: gateway .1; with R1's DHCP off, no lease at all
DHCP starvationSnooping rate limitPort err-disables over 10 ppsNot testable: no starvation tool
ARP from a static attackerDAIPings fail, drops loggedConfig only: pings succeed, Dropped stays 0
Legitimate static printerDAI + ARP ACLAllowed by the ACLACL not supported; PRINTER on DHCP, PC1 can ping it
Rogue switch on a user portBPDU GuardGi1/0/10 err-disabledWorks
Rogue switch claims rootRoot GuardFa0/10 root-inconsistent, DSW1 stays rootWorks
Unidirectional uplinkLoop GuardPort loop-inconsistentNot supported
Broadcast floodStorm controlExcess dropped or port shutConfig only
VLAN hopping, walk-up accessTrunk and unused-port hardeningNo DTP, native 99 unused, unused ports shutWorks

Show-command checklist

DeviceCommandPass looks like
ASW1show ip dhcp snoopingVLAN 10 configured; Gi1/0/24 trusted; host ports rate 10
ASW1show ip dhcp snooping bindingOne row per DHCP client, on the right port, including PRINTER on Gi1/0/5
ASW1show ip arp inspection vlan 10Enabled, Active, three validation checks enabled
ASW1show ip arp inspection interfacesGi1/0/24 trusted; host ports untrusted at 15 pps
ASW1show interfaces gi1/0/10 statuserr-disabled during Attack 1; disabled (shut) afterwards
ASW1show storm-control broadcast20% on user ports, 1% on Gi1/0/4
ASW1show interfaces trunkGi1/0/24 trunking, native 99, allowed 10,99
ASW1show interfaces statusUser ports connected in VLAN 10, unused ports disabled in 999
DSW1show spanning-tree vlan 10This bridge is the root; Fa0/10 blocking during Attack 2, forwarding after
DSW1show running-config interface gi0/1spanning-tree guard root
Hostsipconfig on PC1 and PC2Gateway 10.10.10.1
ASW1 show interfaces trunk: Gig1/0/24 mode on, 802.1q, trunking, native VLAN 99; VLANs 10 and 99 allowed, active and forwarding
ASW1 show interfaces trunk: Gig1/0/24 mode on, 802.1q, trunking, native VLAN 99; VLANs 10 and 99 allowed, active and forwarding. Select the image to open it full size.

Read the output: Mode on (hard-coded trunk, no DTP negotiation), 802.1q, native VLAN 99, and only VLANs 10,99 allowed, active and forwarding. An attacker can't negotiate a trunk, can't double-tag into VLAN 10 through the native VLAN, and can't reach any VLAN you didn't list.

ASW1 show interfaces status: Gi1/0/1 to 1/0/5 USER-PORTS connected in VLAN 10, Gi1/0/10 ROGUE-SW1-TEST-PORT disabled in VLAN 10, Gi1/0/24 trunk connected, every other port disabled in VLAN 999
ASW1 show interfaces status: Gi1/0/1 to 1/0/5 USER-PORTS connected in VLAN 10, Gi1/0/10 ROGUE-SW1-TEST-PORT disabled in VLAN 10, Gi1/0/24 trunk connected, every other port disabled in VLAN 999. Select the image to open it full size.

Read the output:

  • Gi1/0/1 to 1/0/5 connected, VLAN 10: the five legitimate access ports.
  • Gi1/0/10 disabled: shut after the BPDU Guard test because nothing should be connected there.
  • Gi1/0/24 connected, trunk.
  • Every other port disabled in VLAN 999: someone who plugs into a spare port gets no link, and even if a port were turned on by mistake, it would land in a VLAN that goes nowhere.

Troubleshooting

SymptomLikely causeFix
ASW1 is dark and has no CLIThe 3650 has no power supplyPhysical tab: add AC-POWER-SUPPLY
PCs get no IP after snooping is onR1 drops option 82 requests with giaddr 0.0.0.0no ip dhcp snooping information option on ASW1, or ip dhcp relay information trust-all on R1
PCs get no IP, binding table emptyUplink Gi1/0/24 not trustedip dhcp snooping trust on Gi1/0/24
PCs get no IP, R1 is fineno service dhcp still set on R1 from an attack stepservice dhcp on R1, then renew
The whole VLAN loses its gateway after DAIUplink not DAI-trusted, so R1's ARP is droppedip arp inspection trust on Gi1/0/24
ATTACKER can still ping after DAIThe Packet Tracer limitation, or old ARP cache entriesarp -d on hosts, clear arp-cache on R1, test again. If Dropped stays 0, it's the simulator
PRINTER has no bindingStill static, or hasn't renewedConfig → FastEthernet0 → DHCP, then check the binding table
A port err-disables again after no shutdownThe cause is still connectedRemove the rogue device first, then shutdown / no shutdown
Gi1/0/10 err-disabled before Phase 3ROGUE-SW1 was cabled earlyDelete the cable, recover the port, reconnect in Phase 3
Fa0/10 never blocks on DSW1ROGUE-SW2 priority not lower than 4096, Root Guard missing, or the trunk isn't upCheck show spanning-tree vlan 10 on ROGUE-SW2 and show run int fa0/10 on DSW1
Trunk won't formnonegotiate on one side only, or native VLAN mismatchConfigure both ends identically
A command is rejectedFeature missing in this Packet Tracer version or modelCheck with ?, note it, carry on
Storm control never drops anythingTest traffic is far below the thresholdExpected. Verify the config and show output instead

Answer configs

Try every phase before opening these. The Packet Tracer versions are what the activity file accepts; the real IOS version is what the exam expects.

Show the final ASW1 config (Packet Tracer 3650)
hostname ASW1
no ip domain-lookup
!
vlan 10
 name USERS
vlan 99
 name NATIVE
vlan 999
 name BLACKHOLE
!
spanning-tree mode rapid-pvst
!
ip dhcp snooping
ip dhcp snooping vlan 10
no ip dhcp snooping information option
!
ip arp inspection vlan 10
ip arp inspection validate src-mac dst-mac ip
!
interface GigabitEthernet1/0/24
 description TRUNK-DSW1 (path to the real DHCP server)
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 switchport nonegotiate
 ip dhcp snooping trust
 ip arp inspection trust
!
interface range GigabitEthernet1/0/1 - 3 , GigabitEthernet1/0/5
 description USER-PORTS
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 storm-control broadcast level 20.0
!
interface GigabitEthernet1/0/4
 description ATTACKER - strict policy
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 storm-control broadcast level 1.0
!
interface GigabitEthernet1/0/10
 description ROGUE-SW1-TEST-PORT
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 shutdown
!
interface range GigabitEthernet1/0/6 - 9 , GigabitEthernet1/0/11 - 23 , GigabitEthernet1/1/1 - 4
 switchport mode access
 switchport access vlan 999
 shutdown
!
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 no shutdown
ip default-gateway 10.10.10.1
Show the final ASW1 config (real IOS)
hostname ASW1
no ip domain-lookup
!
vlan 10
 name USERS
vlan 99
 name NATIVE
vlan 999
 name BLACKHOLE
!
spanning-tree mode rapid-pvst
!
ip dhcp snooping
ip dhcp snooping vlan 10
no ip dhcp snooping information option
!
ip arp inspection vlan 10
ip arp inspection validate src-mac dst-mac ip
arp access-list STATIC-HOSTS
 permit ip host 10.10.10.15 mac host AAAA.BBBB.CCCC
ip arp inspection filter STATIC-HOSTS vlan 10
!
interface GigabitEthernet1/0/24
 description TRUNK-DSW1
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 switchport nonegotiate
 ip dhcp snooping trust
 ip arp inspection trust
 spanning-tree guard loop
!
interface range GigabitEthernet1/0/1 - 3 , GigabitEthernet1/0/5
 description USER-PORTS
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 ip arp inspection limit rate 15
 storm-control broadcast level 20.00 10.00
 storm-control multicast level 30.00 20.00
 storm-control action trap
!
interface GigabitEthernet1/0/4
 description ATTACKER - strict policy
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 ip arp inspection limit rate 15
 storm-control broadcast level 1.00 0.50
 storm-control action shutdown
!
interface GigabitEthernet1/0/10
 description ROGUE-SW1-TEST-PORT
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 10
 ip arp inspection limit rate 15
 shutdown
!
interface range GigabitEthernet1/0/6 - 9 , GigabitEthernet1/0/11 - 23 , GigabitEthernet1/1/1 - 4
 switchport mode access
 switchport access vlan 999
 shutdown
!
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 no shutdown
ip default-gateway 10.10.10.1

On real IOS the printer could stay static (10.10.10.15) because the ARP ACL permits it. Any port err-disabled by BPDU Guard, the DHCP or ARP rate limit, or storm-control action shutdown is recovered with shutdown / no shutdown after the cause is removed.

Show the final DSW1 config
hostname DSW1
no ip domain-lookup
!
vlan 10
 name USERS
vlan 99
 name NATIVE
vlan 999
 name BLACKHOLE
!
spanning-tree mode rapid-pvst
spanning-tree vlan 10,99 priority 4096
!
interface FastEthernet0/1
 description R1
 switchport mode access
 switchport access vlan 10
 spanning-tree portfast
!
interface GigabitEthernet0/1
 description TRUNK-ASW1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 switchport nonegotiate
 spanning-tree guard root
!
interface FastEthernet0/10
 description ROGUE-SW2-TEST-DOWNLINK
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,99
 spanning-tree guard root
 no shutdown
!
interface range FastEthernet0/2 - 9 , FastEthernet0/11 - 24 , GigabitEthernet0/2
 switchport mode access
 switchport access vlan 999
 shutdown
!
interface Vlan10
 ip address 10.10.10.3 255.255.255.0
 no shutdown
ip default-gateway 10.10.10.1

Go further in Cisco Modeling Labs

To see the attacks against real IOS, rebuild the same topology in Cisco Modeling Labs with IOSvL2 switches and a Kali Linux node. Tools such as Yersinia and ettercap generate genuine DHCP starvation and ARP poisoning traffic, so you can watch the snooping rate limit err-disable a port and DAI drop and log spoofed ARP. Check storm control there with ? and the show commands too, since a virtual switch may accept it without enforcing it. Only run attack tools inside your own lab.

Exam mapping

You configuredAttack it stopsSCOR v2.0
DHCP snooping, trust, rate limitRogue DHCP server, DHCP starvation2.3
DAI, validation checks, ARP ACLARP spoofing and poisoning2.3
PortFast + BPDU GuardRogue switch on a user port2.3
Root GuardRogue root bridge2.3
Loop GuardLoops from unidirectional links2.3
Storm controlBroadcast and multicast storms2.3
Trunk hardening, unused ports in VLAN 999VLAN hopping, walk-up access2.3

Drill it with the flashcards and the mock exam.