CCNA Spanning Tree (STP/RSTP)

Loops kill Ethernet networks, and spanning tree is what stops them. This CCNA spanning tree guide covers STP concepts (root bridge, port roles and states), RSTP and the STP enhancements, plus EtherChannel — the bundle of links spanning tree treats as one. Work through it, then check your recall with a free CCNA mock test.

STP Concepts: Root Bridge, Roles and States

STP (Spanning Tree Protocol, 802.1D) exists for one reason: to stop switching loops from melting your network with broadcast storms. It builds a loop-free logical topology by electing a root bridge and blocking redundant ports. The root is the switch with the lowest bridge ID — that's the configurable priority (default 32768, set in increments of 4096) plus the MAC address as tiebreaker. Set it deliberately with spanning-tree vlan 10 root primary rather than leaving it to the lowest MAC.

Every non-root switch picks one root port — its best path toward the root (lowest cost). Each segment gets one designated port — the port with the best path to the root on that segment. All other ports block. Port costs are bandwidth-based: the lower the cost, the more preferred the path. Remember the order of the election criteria: lowest root bridge ID, then lowest path cost to root, then lowest sender bridge ID, then lowest port ID.

Ports move through states: Blocking → Listening → Learning → Forwarding (plus Disabled). Listening and learning each last one forward delay (15 s), and a port waits out max age (20 s) before reacting to a lost root — so classic STP can take 30–50 seconds to converge, during which the network feels "down". Verify with show spanning-tree vlan 10: look for "This bridge is the root" and the Altn/BLK port roles.

Key exam points

  • STP prevents loops. Root bridge = lowest bridge ID (priority default 32768 + MAC).
  • Port roles: root port (toward root), designated port (per segment), blocking (the rest).
  • States: Blocking → Listening → Learning → Forwarding; ~30–50 s convergence (15 s forward delay × 2 + 20 s max age).
  • Election order: root ID → path cost → sender bridge ID → port ID.

RSTP and STP Enhancements

RSTP (802.1w, Rapid PVST+ on Cisco) is STP with the waiting removed: it converges in seconds via a proposal/agreement handshake between switches instead of timers. Port roles gain two new ones — alternate (backup root port, the old "blocking") and backup (backup designated port) — and states collapse to Discarding, Learning, Forwarding. The key exam distinction: RSTP is backward-compatible but every switch should run it; check with show spanning-tree summary.

PortFast skips listening/learning on access ports so PCs and phones get connectivity instantly instead of waiting 30 seconds for DHCP to time out. It belongs only on end-device ports — a switch plugged into a PortFast port can create a loop before STP notices. Pair it with BPDU Guard, which err-disables the port the moment a BPDU arrives: spanning-tree portfast bpduguard default enables it globally on all PortFast ports.

Two more guards round out the set. Root Guard (spanning-tree guard root) stops an unexpected switch from becoming root on a port — the port goes into root-inconsistent state instead. Loop Guard protects against unidirectional link failures that would otherwise unblock ports and create loops. The exam's favourite scenario: "a user plugged a switch into a wall socket" → the answer involves PortFast + BPDU Guard.

Key exam points

  • RSTP (802.1w) converges in seconds via proposal/agreement; roles: root, designated, alternate, backup.
  • PortFast = instant forwarding for end-device ports only; always pair with BPDU Guard.
  • BPDU Guard err-disables a PortFast port on receiving a BPDU — the fix for rogue switches.
  • Root Guard blocks superior BPDUs; Loop Guard guards against unidirectional failures.

EtherChannel

EtherChannel bundles 2–8 physical links into one logical link, multiplying bandwidth and providing redundancy — if one member fails, traffic keeps flowing over the rest with no STP reconvergence (STP sees the bundle as a single link). The load is shared by hashing source/destination MAC or IP addresses, so a single flow won't exceed one member's speed, but many flows balance nicely.

Two negotiation protocols exist, and both ends must speak compatibly. LACP (802.3ad, the open standard) uses active (initiates) and passive (responds) modes — active/active or active/passive form a channel; passive/passive does not. PAgP (Cisco-proprietary) uses desirable and auto — desirable/desirable or desirable/auto works; auto/auto does not. For the exam, prefer LACP active on both ends unless told otherwise.

Configuration is straightforward:
interface range g0/0 - 1
channel-group 1 mode active
then configure the interface port-channel 1 as a trunk or access port. Critical rule: every member port must match — same speed, duplex, VLAN, trunk and STP settings — or the bundle won't form. Verify with show etherchannel summary (look for the P flag = bundled in port-channel) and show interfaces port-channel 1.

Key exam points

  • EtherChannel: 2–8 links, one logical link; STP treats the bundle as a single link.
  • LACP: active/passive (not passive/passive). PAgP: desirable/auto (not auto/auto). Prefer LACP.
  • All members must match: speed, duplex, VLAN, trunk settings — or the channel fails.
  • Configure with channel-group N mode active; verify with show etherchannel summary.

Related CCNA study guides

Frequently asked questions

What are the key CCNA exam points for STP Concepts?

For the CCNA 200-301 exam, remember: STP prevents loops. Root bridge = lowest bridge ID (priority default 32768 + MAC). Port roles: root port (toward root), designated port (per segment), blocking (the rest). States: Blocking → Listening → Learning → Forwarding; ~30–50 s convergence (15 s forward delay × 2 + 20 s max age). Election order: root ID → path cost → sender bridge ID → port ID.

What are the key CCNA exam points for RSTP and STP Enhancements?

For the CCNA 200-301 exam, remember: RSTP (802.1w) converges in seconds via proposal/agreement; roles: root, designated, alternate, backup. PortFast = instant forwarding for end-device ports only; always pair with BPDU Guard. BPDU Guard err-disables a PortFast port on receiving a BPDU — the fix for rogue switches. Root Guard blocks superior BPDUs; Loop Guard guards against unidirectional failures.

What are the key CCNA exam points for EtherChannel?

For the CCNA 200-301 exam, remember: EtherChannel: 2–8 links, one logical link; STP treats the bundle as a single link. LACP: active/passive (not passive/passive). PAgP: desirable/auto (not auto/auto). Prefer LACP. All members must match: speed, duplex, VLAN, trunk settings — or the channel fails. Configure with channel-group N mode active; verify with show etherchannel summary.

Which key detail about STP Concepts should you memorise for the CCNA 200-301 exam?

Port roles: root port (toward root), designated port (per segment), blocking (the rest).

Which key detail about RSTP and STP Enhancements should you memorise for the CCNA 200-301 exam?

PortFast = instant forwarding for end-device ports only; always pair with BPDU Guard.