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
- Explain how RSTP converges fast: port roles, edge ports, link types and the proposal and agreement handshake.
- Configure an MST region (name, revision, VLAN-to-instance map) and say what makes two switches the same region.
- Place a different root per MST instance to load-share between two distribution switches.
- Explain the IST, the CIST and what happens at a region boundary.
- Choose the right protection for a port and recover it when it trips.
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 28672For 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
| Feature | Put it on | Trips when | Recovery |
|---|---|---|---|
| BPDU guard | Edge (PortFast) ports | Any BPDU arrives | Err-disabled: shut/no shut or errdisable recovery |
| Root guard | Designated ports toward switches that must never be root | A superior BPDU arrives | Automatic: root-inconsistent until the superior BPDUs stop |
| Loop guard | Root and alternate ports (non-edge) | BPDUs stop arriving on a port that should hear them | Automatic: loop-inconsistent until BPDUs return |
| BPDU filter | Edge ports only, rarely | Global: a BPDU turns PortFast off. Interface: never; STP is off there | None 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 300UDLD 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 configuration | Region name, revision and the VLAN-to-instance map, to compare between switches. |
show spanning-tree mst 1 | Root, roles and states for one MST instance. |
show spanning-tree vlan 10 | With Rapid PVST+, the tree of one VLAN. |
show spanning-tree inconsistentports | Ports blocked by root guard or loop guard. |
show interfaces status err-disabled | Ports shut by BPDU guard, with the reason. |
show spanning-tree summary | Mode and which protections are on by default. |
Exam traps
- Name, revision and VLAN map must match exactly for two switches to share an MST region.
- Only instance 0 (the IST) sends BPDUs; changing the map changes the digest and can split the region.
- VLANs not mapped to an instance belong to instance 0.
- Root guard and loop guard recover by themselves; BPDU guard err-disables and needs recovery.
- Interface-level BPDU filter turns STP off on that port. Prefer the global form, which only touches PortFast ports.
- MST priority is set per instance:
spanning-tree mst 1 priority …, not per VLAN.
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
- 3.1.a Troubleshoot 802.1Q trunks, whether configured statically or negotiated
- 3.2.b Configure simple OSPFv2/v3: multiple areas, summarization, filtering, network types, passive interfaces
- 3.2.c Configure and verify eBGP between directly connected neighbors
- 3.2.d Describe policy-based routing
- 3.3.a Interpret NTP and PTP configurations
- 3.3.b Configure NAT and PAT
- 3.3.c Configure first-hop redundancy with HSRP and VRRP
- 3.3.d Describe multicast: RPF check, PIM-SM, IGMPv2/v3, SSM, bidir, MSDP