zNetLaB › Guided labs › Security
BPDU guard — somebody plugs a switch into a desk port
Security Intermediate 4 devices 4 checked tasks 100 points Plan lab
An access port is supposed to have a PC on it. A switch plugged in there — with a lower bridge priority — would be elected root and pull every VLAN’s traffic across a desk. Put PortFast on the access ports, BPDU guard on them, and watch the port shut itself the moment a BPDU arrives. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 7 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
An access port is supposed to have a PC on it. A switch plugged in there — with a lower bridge priority — would be elected root and pull every VLAN’s traffic across a desk. Put PortFast on the access ports, BPDU guard on them, and watch the port shut itself the moment a BPDU arrives.
Your role: a security engineer. Level: Intermediate Done when: all 4 goals show as passed (100 points).
Network status
Devices: 3 switchs, 1 PC, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. SW-Core starts with and spanning-tree settings already configured. Evil-Switch starts with and spanning-tree settings already configured. Desk-PC is a host with 10.20.0.11/24. SW-Access starts with an empty configuration.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
The desk and the wall-socket ports run PortFast (20 pts) BPDU guard is on the access ports (30 pts) The rogue switch’s port was shut by BPDU guard (err-disabled) (30 pts) SW-Core is still the root bridge (20 pts)
The activity, in order
The desk and the wall-socket ports run PortFast Enable PortFast on FastEthernet0/1 of SW-Access (an access port to a host only). Enable PortFast on FastEthernet0/2 of SW-Access (an access port to a host only).Why: PortFast skips the 30-second listening/learning wait for host ports; never use it toward another switch. Verify with: show spanning-tree interface FastEthernet0/1 BPDU guard is on the access ports The configuration of SW-Access must contain the line: spanning-tree bpduguard enable|spanning-tree portfast bpduguard default. Type it in the right mode (global, interface or line) and check it appears.Why: This is the task that checks your configuration directly: the line must really be there, not just look right. Verify with: show running-config The rogue switch’s port was shut by BPDU guard (err-disabled) On SW-Access, run show interfaces status and read the output: it must show Fa0/2 \S* err-disabled.Why: Reading a show command is the core skill of troubleshooting: the output is the truth, not your configuration. Verify with: show interfaces status SW-Core is still the root bridge Make SW-Core the spanning-tree root bridge (spanning-tree vlan <id> root primary, or the lowest priority).Why: The root decides which links forward and which block. Leave it to chance and the slowest switch can win. Verify with: show spanning-tree
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong. Common mistake: PortFast without BPDU guard — a loop becomes possible in seconds Common mistake: BPDU guard on trunks and uplinks, which takes the network down Common mistake: Leaving the port err-disabled with no recovery plan (errdisable recovery or a manual shut/no shut)
Why this matters
A switch plugged into an access port that sends better BPDUs would be elected root and pull the whole VLAN’s traffic across a desk. PortFast says “a host lives here”; BPDU guard says “and if a BPDU ever arrives, it is not a host” and shuts the port.
What you will be able to do
Enable PortFast on access ports
Enable BPDU guard and recognise an err-disabled port
Confirm the legitimate root bridge is still the root afterwards
The network
Catalyst 3560-24PS, Catalyst 2960-24TT, PC — 4 devices in all, already cabled.
Gi0/1 Gi0/1 Fa0/1 Fa0 Fa0/2 Fa0/1 SW-Core SW-Access Evil-Switch Desk-PC 10.20.0.11/24 Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
SW-Core Catalyst 3560-24PS configure it
SW-Access Catalyst 2960-24TT configure it
Evil-Switch Catalyst 2960-24TT configure it
Desk-PC PC 10.20.0.11 / 255.255.255.0
Cabling
SW-Core Gi0/1 ↔ SW-Access Gi0/1
SW-Access Fa0/1 ↔ Desk-PC Fa0
SW-Access Fa0/2 ↔ Evil-Switch Fa0/1
What is configured at the start
These are already configured when the lab opens — including, where this is a troubleshooting lab, the fault itself:
SW-Core spanning-tree vlan 1 priority 4096
Evil-Switch spanning-tree vlan 1 priority 0
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 The desk and the wall-socket ports run PortFast 20 On SW-Access: show spanning-tree interface Fa0/1 portfast. and On SW-Access: show spanning-tree interface Fa0/2 portfast.
2 BPDU guard is on the access ports 30 On SW-Access: show running-config contains the line(s) matching spanning-tree bpduguard enable|spanning-tree portfast bpduguard default.
3 The rogue switch’s port was shut by BPDU guard (err-disabled) 30 On SW-Access: show interfaces status output matches Fa0/2\s+\S*\s*err-disabled.
4 SW-Core is still the root bridge 20 On SW-Core: show spanning-tree says This bridge is the root .
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Common mistakes
PortFast without BPDU guard — a loop becomes possible in seconds
BPDU guard on trunks and uplinks, which takes the network down
Leaving the port err-disabled with no recovery plan (errdisable recovery or a manual shut/no shut)
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
SW-Access interface range Fa0/1 - 2
spanning-tree portfast
spanning-tree bpduguard enable
exit
Evil-Switch interface Fa0/1
shutdown
no shutdown
exit
Where this is examined
CCNA (STP), CCNP ENCOR (STP enhancements), CCIE EI written/lab (loop guard, root guard, BPDU guard), Network+ (switching features).
This lab practises these topics in the zNetLaB certification courses:
Port security, DHCP snooping, DAI — CCNA · Security Fundamentals
Trunking, EtherChannel, RSTP and MST — CCNP Enterprise · ENCOR · Infrastructure
ACLs, ZBFW, 802.1X, MACsec, wireless security — CCNP Enterprise · ENCOR · Security
CoPP, uRPF, IPv6 FHS, 802.1X, ZBFW — CCIE Enterprise Infrastructure · Infrastructure Security and Services
Attacks and their defences (spoofing, flooding, rogue devices) — CompTIA Network+ · Network Security
Network attacks: spoofing, flooding, rogue devices, VLAN hopping — CompTIA Security+ · Threats, Vulnerabilities and Mitigations
Infrastructure security: Layer 2 and the management plane — CCNP Security Core · Network Security
Layer-2 attacks: MAC flooding, VLAN hopping, STP takeover — Ethical Hacking (network level) · Network Attacks and Defences
Spanning tree: choosing the root — Switching and VLAN Mastery · Loop prevention and bundling
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.