---
tags:
- networking
- l1
- flashcard-deck
- stp
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [STP / Spanning Tree](../../../../library/portal/topics.md) | **Domain:** Networking
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
stp/7aa22169dd02	stp	easy	stp, networking, loops	What problem does STP solve?	STP (Spanning Tree Protocol) prevents Layer 2 loops in networks with redundant links. Without STP, broadcast frames circulate endlessly, causing broadcast storms that saturate the network and crash switches.\n\nName origin: invented by Radia Perlman (IEEE 802.1D, 1990), who wrote: 'I think that I shall never see / A graph more lovely than a tree.'\n\nUnder the hood: without STP, a single redundant link creates a loop where broadcasts multiply exponentially, saturating Gbps links in seconds.	training/library/topics/stp/primer.md
stp/21764aabf470	stp	easy	stp, root-bridge, election	How is the STP root bridge elected?	The switch with the lowest Bridge ID becomes the root bridge. Bridge ID = Priority (default 32768) + MAC address. Set a lower priority to force a specific switch as root: spanning-tree vlan 1 priority 4096.\n\nRemember: "STP prevents loops by blocking redundant paths." Without STP, broadcast storms can take down a network in seconds.\n\nExample: A switch with two paths to another switch disables one port to prevent a loop.	training/library/topics/stp/primer.md
stp/bcf6e2160c4a	stp	easy	stp, port-states, convergence	What are the port states in classic STP (802.1D)?	Blocking (no forwarding, no learning), Listening (15s, no forwarding, no learning), Learning (15s, no forwarding, learns MACs), Forwarding (forwards and learns), Disabled. Total convergence time: 30-50 seconds.\n\nRemember: "Root bridge = lowest bridge ID wins." Bridge ID = priority (default 32768) + MAC address. Lower priority = more likely to be root.\n\nGotcha: If you don't set priorities, the root bridge is chosen by lowest MAC — which may be your oldest, slowest switch.	training/library/topics/stp/primer.md
stp/05f331558af9	stp	medium	stp, rstp, convergence	How does RSTP (802.1w) improve on classic STP?	RSTP reduces convergence from 30-50 seconds to 1-3 seconds using: edge ports (skip directly to forwarding for hosts), proposal/agreement mechanism (direct switch negotiation), and pre-computed alternate/backup ports for instant failover.\n\nRemember: "STP port states: Blocking → Listening → Learning → Forwarding." BLF is the path to forwarding. Convergence takes 30-50 seconds in classic STP.\n\nGotcha: RSTP (Rapid STP) converges in seconds instead of 30-50. Always use RSTP if available.	training/library/topics/stp/primer.md
stp/ed7cc971be01	stp	medium	stp, portfast, bpduguard	What are PortFast and BPDU Guard, and when should each be used?	PortFast lets access ports (host-facing) skip STP convergence and go directly to forwarding. BPDU Guard shuts down a PortFast port if it receives a BPDU, indicating a rogue switch. PortFast should only be enabled on host-facing ports, never on switch-to-switch links.	training/library/topics/stp/primer.md
stp/1f3af732184d	stp	medium	stp, port-roles, paths	What are the three STP port roles and how are they assigned?	Root Port: best path to root bridge (one per non-root switch). Designated Port: best path from a network segment to root (forwards traffic). Blocked/Alternate Port: redundant path, disabled to prevent loops. Roles are assigned based on path cost to the root bridge.	training/library/topics/stp/primer.md
stp/036b03386bd2	stp	medium	stp, linux-bridge, configuration	How do you enable and check STP on a Linux bridge?	Enable: ip link set br0 type bridge stp_state 1. Check status: brctl showstp br0 (legacy) or cat /sys/class/net/br0/bridge/stp_state (0=disabled, 1=enabled). View port states: bridge -d link show dev br0.\n\nRemember: "BPDU = Bridge Protocol Data Unit." Switches exchange BPDUs to elect the root bridge and calculate the spanning tree.	training/library/topics/stp/primer.md
stp/1f3946601d1b	stp	hard	stp, broadcast-storm, troubleshooting	How do you diagnose and stop a broadcast storm caused by a loop?	Symptoms: all hosts unreachable, switch CPU at 100%, massive broadcast traffic. Diagnose: check show spanning-tree for topology changes, look for MAC flapping (same MAC on multiple ports). Stop: physically disconnect suspected loop port, then investigate. Enable BPDU Guard and storm control to prevent recurrence.	training/library/topics/stp/primer.md
stp/202a402d019b	stp	hard	stp, root-guard, security	What is Root Guard and why is it important?	Root Guard prevents a port from becoming a root port, protecting the intended root bridge placement. If a superior BPDU is received on a Root Guard port, the port is put into root-inconsistent (blocked) state. This prevents a rogue or misconfigured switch from taking over as root bridge.	training/library/topics/stp/primer.md
stp/2b68225461cb	stp	hard	stp, mstp, vlan	What is MSTP (802.1s) and how does it differ from per-VLAN STP?	MSTP groups VLANs into spanning tree instances. Instead of running a separate tree per VLAN (like PVST+), multiple VLANs share one tree instance. This reduces CPU overhead while still allowing different traffic paths per VLAN group for better bandwidth utilization.	training/library/topics/stp/primer.md

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [Cisco Fundamentals for DevOps](../../../../library/topics/cisco-fundamentals-for-devops/index.md) (Topic Pack, L1) — STP / Spanning Tree
- [STP (Spanning Tree)](../../../../library/topics/stp/index.md) (Topic Pack, L1) — STP / Spanning Tree

<!-- wiki:related:end -->
