3.1.c Configure and verify RSTP and MST, plus protections such as root guard and BPDU guard

ENCOR 350-401 v1.2 · 3.0 Infrastructure

ENCOR goes beyond reading spanning tree: you choose between Rapid PVST+ (one RSTP instance per VLAN) and MST (802.1s, a few instances, each carrying many VLANs), place the root of each instance on purpose, and protect the topology with root guard, BPDU guard, BPDU filter and loop guard.

What you must know

RSTP in one page

RSTP (802.1w) keeps 802.1D's election (root bridge, root port, designated port) but replaces timers with handshakes. An alternate port is a ready backup root port and takes over at once. On a point-to-point link (full duplex) a designated port sends a proposal, the neighbor syncs its own ports and answers with an agreement, and both forward within a second. Edge ports (PortFast) forward immediately. Rapid PVST+ runs one RSTP instance per VLAN: simple, but 500 VLANs means 500 instances and 500 sets of BPDUs.

MST

MST maps many VLANs to a few instances. Switches belong to the same region only if the region name, the revision number and the whole VLAN-to-instance map are identical (they compare a digest of the map). Instance 0, the IST, always exists, carries all VLANs not mapped elsewhere and is the only instance that sends BPDUs; the other instances ride inside those BPDUs as records.

spanning-tree mode mst
spanning-tree mst configuration
 name CAMPUS
 revision 1
 instance 1 vlan 10,20
 instance 2 vlan 30,40
!
! DSW1
spanning-tree mst 0-1 priority 24576
spanning-tree mst 2 priority 28672
! DSW2
spanning-tree mst 2 priority 24576
spanning-tree mst 0-1 priority 28672

For instance 2 the picture flips: DSW2 is root and ASW1 blocks Gi0/1 instead, so both uplinks carry traffic. Between regions, or toward Rapid PVST+ switches, the CIST joins everything: a whole region looks like one big switch, and only the IST's view counts at the boundary. A typo in the VLAN map splits a region in two and moves blocking ports in surprising ways.

Protections

FeaturePut it onTrips whenRecovery
BPDU guardEdge (PortFast) portsAny BPDU arrivesErr-disabled: shut/no shut or errdisable recovery
Root guardDesignated ports toward switches that must never be rootA superior BPDU arrivesAutomatic: root-inconsistent until the superior BPDUs stop
Loop guardRoot and alternate ports (non-edge)BPDUs stop arriving on a port that should hear themAutomatic: loop-inconsistent until BPDUs return
BPDU filterEdge ports only, rarelyGlobal: a BPDU turns PortFast off. Interface: never; STP is off thereNone needed, but an interface filter can hide a loop
spanning-tree portfast default
spanning-tree portfast bpduguard default
spanning-tree loopguard default
!
interface GigabitEthernet1/0/10
 spanning-tree guard root
!
errdisable recovery cause bpduguard
errdisable recovery interval 300

UDLD complements loop guard on fiber: it detects a link that works in one direction only and err-disables it (aggressive mode) before STP is fooled.

Commands

show spanning-tree mst configurationRegion name, revision and the VLAN-to-instance map, to compare between switches.
show spanning-tree mst 1Root, roles and states for one MST instance.
show spanning-tree vlan 10With Rapid PVST+, the tree of one VLAN.
show spanning-tree inconsistentportsPorts blocked by root guard or loop guard.
show interfaces status err-disabledPorts shut by BPDU guard, with the reason.
show spanning-tree summaryMode and which protections are on by default.

Exam traps

Check yourself

Two switches have the same MST name and map but revisions 1 and 2. Are they in one region?
No. Name, revision and map must all match; they form two regions joined through the CIST.
How do you load-share VLANs 10–20 and 30–40 across two distribution switches with MST?
Map them to instances 1 and 2, make DSW1 root of instance 1 and DSW2 root of instance 2 with spanning-tree mst <n> priority.
A port shows root-inconsistent. What happened and what do you do?
Root guard received a superior BPDU. Find the switch claiming root; the port recovers by itself when those BPDUs stop.
Which protection stops a one-way fiber link from creating a loop?
Loop guard (with UDLD in aggressive mode).

Labs

Try it live: Multiple Spanning Tree (MST)

More topics in 3.0 Infrastructure