STP protection features
PortFast, BPDU guard and BPDU filter, root guard and loop guard: what each protects and where to apply it.
STP protection features
| Feature | Purpose | Apply to | Violation behavior |
|---|---|---|---|
| PortFast | Skip learning states — forward immediately | Edge ports (hosts, phones, servers) | n/a — speeds edge bring-up |
| BPDU guard | Shut the port down if any BPDU arrives | Edge ports with PortFast | err-disables the port |
| BPDU filter | Don't send BPDUs; ignore received ones | Edge ports (dangerous uplink misuse) | Port effectively leaves STP — loop risk |
| Root guard | Keep this port from becoming root port | Ports toward untrusted/downstream switches | Puts port in root-inconsistent (blocked) state until BPDUs stop |
| Loop guard | Block if BPDUs stop on a non-designated port | Redundant uplinks | Prevents a unidirectional link from opening a loop |
The classic pairing is PortFast + BPDU guard on every edge port: the host comes up instantly, and any switch accidentally patched in produces a BPDU that err-disables the port before it can create a loop. Root guard belongs on ports where you must never accept a better root (toward other organizations' or untrusted switches); loop guard protects against unidirectional link failures where a port stops hearing BPDUs and could start forwarding.
Fast edge port with loop safety — Privileged EXEC → Interface configuration
Cisco IOS / IOS XE
configure terminal interface gigabitethernet1/0/5 switchport mode access spanning-tree portfast spanning-tree bpduguard enable end
show spanning-tree interface gi1/0/5 portfast show running-config interface gi1/0/5 show interfaces status err-disabled
- PortFast enabled on the port.
- A BPDU-guard trip shows the port err-disabled — find the cause before re-enabling.
- Global defaults exist:
spanning-tree portfast defaultandspanning-tree portfast bpduguard default. - Never PortFast a link toward another switch.
Changes device configuration.
Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- IEEE 802.1 Working Group — reviewed 2026-11-02
- Cisco — LAN Switching Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.