Study guide
7.2 Spanning Tree Protocol Mechanics
CCNP Enterprise ENCOR 350-401
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Enterprise Architecture & Hierarchical Design
1.1 Enterprise Network Design Models & Hierarchical Campus Architecture 1.2 On-Premises, Cloud & Hybrid Infrastructure Deployment Models 1.3 Hardware Switching Architecture & Packet Forwarding
2 Chapter 2: Enterprise Quality of Service (QoS)
2.1 QoS Components: Classification, Marking & Trust Boundaries 2.2 QoS Policy: Queuing, Shaping, Policing & Interpreting MQC Output
3 Chapter 3: Software-Defined WAN (Catalyst SD-WAN)
3.1 Cisco Catalyst SD-WAN Architecture & Orchestration 3.2 SD-WAN Policies, Traffic Engineering & Application-Aware Routing
4 Chapter 4: Software-Defined Access (Catalyst SD-Access)
4.1 Catalyst SD-Access Fabric Architecture & Plane Separation 4.2 Cisco TrustSec, Security Group Tags (SGT), SXP & MACsec
5 Chapter 5: Device & Data Path Virtualization
5.1 Server & Network Device Virtualization 5.2 VRF-Lite & Virtual Routing Multi-Tenancy 5.3 GRE & IPsec Tunnel Virtualization Mechanics
6 Chapter 6: Network Virtualization & Overlay Technologies
6.1 LISP Architecture & EID-to-RLOC Mapping Mechanics 6.2 VXLAN & EVPN Overlay Architecture
7 Chapter 7: Layer 2 Infrastructure & Switching
7.1 VLANs, 802.1Q Trunking & VTPv3 7.2 Spanning Tree Protocol Mechanics 7.3 Advanced STP Protection Mechanisms 7.4 EtherChannel Link Aggregation
8 Chapter 8: Layer 3 Routing Foundations & EIGRP
8.1 IP Routing Foundations & Administrative Distance 8.2 Enhanced Interior Gateway Routing Protocol (EIGRP)
9 Chapter 9: OSPFv2 & OSPFv3 Operations
9.1 OSPFv2 Architecture & Neighbor State Machine 9.2 OSPF LSA Types & Multi-Area Design 9.3 OSPFv3 for IPv4 and IPv6 Address Families
10 Chapter 10: Border Gateway Protocol (BGP)
10.1 BGP Architecture, Neighbor States & Peering 10.2 BGP Path Attributes & Best Path Selection Algorithm
11 Chapter 11: Policy-Based Routing & Route Redistribution
11.1 Policy-Based Routing (PBR) & Route Maps 11.2 Route Redistribution & Loop Prevention
12 Chapter 12: IP Services & High Availability
12.1 First Hop Redundancy Protocols (HSRP, VRRP & GLBP) 12.2 Network Time Protocol (NTPv4) & Precision Time Protocol (PTP) 12.3 Network Address Translation (NAT/PAT) & VRF-Aware NAT
13 Chapter 13: IP Multicast Operations
13.1 IP Multicast Addressing, Group Management (IGMPv1/v2/v3) & IGMP Snooping 13.2 Protocol Independent Multicast (PIM-SM, PIM-SSM & Bidir-PIM) 13.3 Rendezvous Point (RP) Distribution Mechanisms
14 Chapter 14: Network Assurance & Monitoring
14.1 Diagnostic Utilities, Conditional Debugging & Path MTU Discovery 14.2 Syslog Architecture, Logging Facilities & Severity Levels 14.3 SNMPv1/v2c/v3 Security & Flexible NetFlow (FNF) Architecture 14.4 Switched Port Analyzer (SPAN, RSPAN, ERSPAN) & IP SLA Object Tracking
15 Chapter 15: Catalyst Center Assurance & Controller Operations
15.1 Cisco Catalyst Center (DNA Center) Assurance & AI Network Analytics 15.2 Cisco Catalyst Center Device Onboarding & Software Image Management (SWIM)
16 Chapter 16: Enterprise Security & Access Control
16.1 Device Hardening, AAA Architecture & RADIUS/TACACS+ 16.2 Access Control Lists (ACLs) for Infrastructure Security 16.3 Control Plane Policing (CoPP) & Control Plane Protection (CPPr) 16.4 Layer 2 Infrastructure Security Features 16.5 IEEE 802.1X Port-Based Authentication & MAB
17 Chapter 17: Threat Defense & API Security
17.1 Enterprise VPN Technologies (DMVPN Phase 1/2/3 & FlexVPN) 17.2 Next-Generation Threat Defense & Secure Access Service Edge (SASE)
18 Chapter 18: Network Automation, Programmability & Data Modeling
18.1 Python Fundamentals for Network Engineers & Cisco Libraries 18.2 YANG Data Modeling Language (RFC 6020/7950) & Model Types 18.3 REST API Architecture, HTTP Verbs, Security & Cisco Controller APIs 18.4 Model-Driven Telemetry (MDT) & NETCONF/RESTCONF Operations
19 Chapter 19: Orchestration, EEM & AI Operations
19.1 Configuration Management & Infrastructure as Code (Ansible & Terraform) 19.2 Cisco Embedded Event Manager (EEM) & Intent-Based Networking
7.2 Spanning Tree Protocol Mechanics
Key Takeaways Explain This Topic AI
Spanning Tree Protocol prevents Layer 2 bridging loops, broadcast storms, MAC table thrashing, and multiple frame duplication by logically blocking redundant paths.
Rapid Spanning Tree Protocol (IEEE 802.1w / RSTP) replaces 802.1D timers with an explicit Proposal/Agreement sync handshake on point-to-point links, achieving sub-second convergence.
RSTP defines three port states (Discarding, Learning, Forwarding) and four port roles (Root, Designated, Alternate, and Backup).
Edge ports (PortFast) bypass listening/learning states and immediately transition to Forwarding, suppressing Topology Change (TC) notifications during link transitions.
Multiple Spanning Tree Protocol (IEEE 802.1s / MSTP) maps multiple VLANs to a small number of Multiple Spanning Tree Instances (MSTIs), bounding CPU/BPDU scaling across regions defined by matching Name, Revision, and VLAN Mapping digests.
Last updated: August 2026
7.2 Spanning Tree Protocol Mechanics
Core Blueprint Focus: Cisco 350-401 ENCOR v1.2 topic 3.1.c (configure and verify RSTP and MST) covers Spanning Tree Protocol operations across enterprise campus networks. Candidates must analyze 802.1D STP vs. 802.1w Rapid Spanning Tree (RSTP / Rapid PVST+) convergence mechanisms, master port roles and states, evaluate the Proposal/Agreement sync handshake, and design scalable Multiple Spanning Tree (MST / 802.1s) multi-region hierarchies.
Ethernet networks lack a Time-to-Live (TTL) or hop-count mechanism in the Layer 2 header. If redundant physical paths exist between switches without an active loop-prevention algorithm, broadcast, multicast, and unknown unicast frames circulate indefinitely, triggering broadcast storms , MAC address table thrashing/instability , and multiple frame duplication that completely saturate switch CPU and link bandwidth within seconds.
1. STP Foundations & 802.1D Operations
The original IEEE 802.1D Spanning Tree Protocol (STP) builds a loop-free logical tree topology by electing a single Root Bridge and transitioning redundant switch ports into a blocking state. +-----------------------------------------------------------------------------------+
- | BRIDGE IDENTIFIER (BID) FORMAT |
- +-----------------------------------------------------------------------------------+
- | Legacy 802.1D Bridge ID (8 Bytes): |
- | +-----------------------------------+-------------------------------------------+ |
- | | Bridge Priority (2 Bytes) | MAC Address (6 Bytes) | |
- | | (0 - 65535) | (Switch Hardware Base) | |
- | +-----------------------------------+-------------------------------------------+ |
- | |
- | 802.1t / PVST+ Extended System ID Format (8 Bytes): |
- | +---------------------+-----------------------+---------------------------------+ |
- | | Priority (4 Bits) | Sys-ID-Ext (12 Bits) | MAC Address (6 Bytes) | |
- | | (Multiples of 4096)| (VLAN ID) | (Switch Hardware Base) | |
- | +---------------------+-----------------------+---------------------------------+ |
- +-----------------------------------------------------------------------------------+
- Bridge ID & Root Bridge Election
Bridge Priority (4 bits): Configurable in increments of 4096 (e.g., 0, 4096, 8192, 16384, 20480, 24576, 28672, 32768, ... 61440 ). Default is 32768 .
System ID Extension (12 bits): Carries the VLAN ID (1 to 4094), allowing Per-VLAN Spanning Tree (PVST+ / RPVST+) to maintain unique Bridge IDs per VLAN.
MAC Address (48 bits): The unique hardware base MAC address of the switch supervisor.
Election Criterion: The switch with the lowest Bridge ID (Priority + System ID Extension + MAC Address) becomes the Root Bridge for that spanning tree instance.
Spanning Tree Path Cost & Port Roles
Once the Root Bridge is elected, all non-root switches determine the shortest loop-free path to the Root Bridge based on cumulative Root Path Cost :
- Link Speed Legacy 802.1D Cost (16-bit) IEEE 802.1t / 802.1w Long Cost (32-bit)
- 10 Mbps 100 2,000,000
- 100 Mbps 19 200,000
- 1 Gbps 4 20,000
- 10 Gbps 2 2,000
- 40 Gbps 1 500
- 100 Gbps 1 200
- 802.1D Port Roles & Four-Step Decision Tiebreaker
Root Port (RP): Exactly one port on each non-root switch with the lowest cumulative path cost to the Root Bridge. Forwards traffic.
Designated Port (DP): Exactly one port per physical segment that forwards traffic away from the Root Bridge toward that segment.
Non-Designated / Blocking Port (NDP / ALT): All other ports that receive BPDUs but do not forward traffic, breaking the Layer 2 loop. +-----------------------------------------------------------------------------------+
- | STP FOUR-STEP PATH SELECTION TIEBREAKER |
- +-----------------------------------------------------------------------------------+
- | 1. Lowest Cumulative Root Path Cost |
- | 2. Lowest Neighbor Bridge ID (Sender BID) |
- | 3. Lowest Neighbor Port Priority / Port ID (Sender Port Number: Priority.Number) |
- | 4. Lowest Local Port ID (Local Priority.Number - e.g., Gi1/0/1 over Gi1/0/2) |
- +-----------------------------------------------------------------------------------+
- 802.1D Port States & Timers (30-50 Second Convergence)
- Port State Receives BPDUs? Transmits BPDUs? Learns MACs? Forwards Data? Timer Duration
- Disabled No No No No N/A (Administrative shutdown)
- Blocking Yes No No No Max Age (20 seconds default)
- Listening Yes Yes No No Forward Delay (15 seconds)
- Learning Yes Yes Yes No Forward Delay (15 seconds)
- Forwarding Yes Yes Yes Yes Continuous
In legacy 802.1D, bringing an interface into service requires waiting 15 s (Listening) + 15 s (Learning) = 30 seconds 15\text{s (Listening)} + 15\text{s (Learning)} = 30\text{ seconds} 15 s (Listening) + 15 s (Learning) = 30 seconds . Recovering from an indirect link failure requires 20 s (Max Age) + 15 s + 15 s = 50 seconds 20\text{s (Max Age)} + 15\text{s} + 15\text{s} = 50\text{ seconds} 20 s (Max Age) + 15 s + 15 s = 50 seconds .
2. Rapid Spanning Tree Protocol (IEEE 802.1w / RSTP)
IEEE 802.1w (RSTP) fundamentally re-architects spanning tree convergence. Instead of passively waiting for fixed timers (Max Age and Forward Delay) to expire, RSTP uses an active Proposal/Agreement handshake on point-to-point links to transition ports to Forwarding in milliseconds.
RSTP Port Roles Comparison +-----------------------------------------------------------------------------------+
- | RSTP PORT ROLES TOPOLOGY |
- +-----------------------------------------------------------------------------------+
- | |
- | +-------------------+ |
- | | ROOT BRIDGE | |
- | +-------------------+ |
- | / \ |
- | Designated / \ Designated |
- | Port [DP]/ \[DP] Port |
- | / \ |
- | v v |
- | +-------------+ +-------------+ |
- | | Switch B | | Switch C | |
- | +-------------+ +-------------+ |
- | | Root Port | | Root Port | |
- | | [RP] | | [RP] | |
- | +-------------+ +-------------+ |
- | [DP] \ / [DP] |
- | Designated Port \ / Alternate Port |
- | v v [ALT - Discarding] |
- | +-------------------+ |
- | | Switch D | |
- | +-------------------+ |
- +-----------------------------------------------------------------------------------+
Root Port (RP): The single port on a non-root bridge providing the lowest cost path to the Root Bridge. State: Forwarding .
Designated Port (DP): The port on a segment responsible for forwarding traffic away from the Root Bridge onto that segment. State: Forwarding .
Alternate Port (ALT): A port offering an alternative path toward the Root Bridge. It receives BPDUs from other switches and acts as an immediate hot-standby replacement for the switch's local Root Port if the primary RP fails. State: Discarding .
Backup Port (BKUP): A port providing a redundant path to the same segment on a shared collision domain (e.g., connected through a legacy hub). It receives BPDUs generated by its own switch. State: Discarding .
RSTP Port States
RSTP consolidates 802.1D's Disabled, Blocking, and Listening states into a single operational state: Discarding .
802.1D Operational State 802.1w RSTP State Included in Active Topology? Learns MAC Addresses? Forwards Data Frames?
- Disabled Discarding No No No
- Blocking Discarding No No No
- Listening Discarding Yes No No
- Learning Learning Yes Yes No
- Forwarding Forwarding Yes Yes Yes
- RSTP Link Types & Edge Ports
RSTP determines its fast-convergence capability based on the Link Type :
Edge Port (PortFast): Connected directly to an end host (PC, server, printer). It transitions immediately to Forwarding upon link-up, bypassing listening/learning. Edge ports never generate Topology Change (TC) notifications when links flap. If an edge port receives a BPDU, it immediately loses edge status and behaves as a regular RSTP port.
Point-to-Point Link (P2P): Operates in Full-Duplex mode connecting directly to another switch. Uses the rapid Proposal/Agreement handshake.
Shared Link: Operates in Half-Duplex mode. RSTP falls back to legacy 802.1D timer-based convergence.
Loading diagram... RSTP Proposal / Agreement Sync Handshake Mechanism
- 3. Proposal/Agreement Handshake & RSTP Topology Changes
- Step-by-Step Proposal/Agreement Handshake Mechanics
Link Initialization: When a full-duplex point-to-point link comes up between Switch A (Upstream) and Switch B (Downstream), both ports initially enter the Discarding state.
Proposal Transmission: Switch A believes it is designated for this link and transmits a configuration BPDU with the Proposal bit set to 1 .
The Synchronization (Sync) Process:
Switch B receives the Proposal. Because Switch A offers a superior Bridge ID/Cost, Switch B acknowledges that this link will become its new Root Port .
To prevent temporary forwarding loops during the transition, Switch B initiates a Sync operation : it immediately transitions all of its non-edge Designated Ports into the Discarding state.
Edge ports (PortFast) and Alternate/Backup ports are unaffected.
Agreement Return: Once all non-edge downstream ports are safely synchronized in the Discarding state, Switch B sends a BPDU back to Switch A with the Agreement bit set to 1 .
Immediate Forwarding: Upon receiving the Agreement BPDU, Switch A immediately transitions its port to Forwarding (zero timer delay). Switch B transitions its Root Port to Forwarding and repeats the Proposal handshake downstream to subsequent switches.
RSTP Topology Change (TC) Mechanics
In legacy 802.1D, any port transitioning up or down generated a Topology Change Notification (TCN) BPDU that had to travel all the way to the Root Bridge before the Root flooded a TC flag across the domain.
In 802.1w RSTP , topology changes operate with direct localized flooding:
TC Trigger: A Topology Change is generated ONLY when a non-edge port transitions to the Forwarding state . A port going down does NOT trigger a TC.
TC Flooding: The switch that detected the transition starts a tcWhile timer equal to 2 × Hello Time 2 \times \text{Hello Time} 2 × Hello Time (4 seconds) . It transmits BPDUs with the TC bit set out all active non-edge Designated and Root ports.
Fast MAC Address Flushing: When a switch receives a BPDU with the TC bit set, it immediately purges all MAC addresses learned on all non-edge ports (except the port on which the TC BPDU arrived). It does not wait for a 15-second or 300-second aging timer.
4. Multiple Spanning Tree Protocol (IEEE 802.1s / MSTP)
In Cisco Rapid Per-VLAN Spanning Tree Plus ( RPVST+ ), the switch creates an independent Spanning Tree instance for every single configured VLAN. In enterprise networks with 500 VLANs, a switch must generate and process 500 BPDUs every 2 seconds, consuming excessive CPU cycles, memory, and ASIC bandwidth.
Multiple Spanning Tree Protocol (MSTP / IEEE 802.1s) solves this scaling crisis by decoupling VLANs from spanning tree instances. It maps hundreds of VLANs into a small number of Multiple Spanning Tree Instances (MSTIs) (e.g., Instance 1 for odd VLANs, Instance 2 for even VLANs). +-----------------------------------------------------------------------------------+
- | MST REGION & INSTANCE HIERARCHY |
- +-----------------------------------------------------------------------------------+
- | |
- | +-----------------------------------------------------------------------------+ |
- | | MST REGION: "CAMPUS-REGION-1" | |
- | | Configuration Name: CAMPUS-REGION-1 | Revision: 1 | Mapping Digest: MD5 | |
- | | | |
- | | +---------------------------------------------------------------------+ | |
- | | | IST (Instance 0) - Internal Spanning Tree | | |
- | | | - Connects all switches inside the region | | |
- | | | - Communicates with external CST / PVST+ legacy domains | | |
- | | +---------------------------------------------------------------------+ | |
- | | | |
- | | +---------------------------------+ +-------------------------------+ | |
- | | | MSTI 1 (Instance 1) | | MSTI 2 (Instance 2) | | |
- | | | - Maps VLANs: 10, 20, 30 | | - Maps VLANs: 40, 50, 60 | | |
- | | | - Root: Switch-A (Distribution) | | - Root: Switch-B (Distributn) | | |
- | | +---------------------------------+ +-------------------------------+ | |
- | +-----------------------------------------------------------------------------+ |
- | | |
- | CIST / CST | Boundary Links |
- | v |
- | +-----------------------------------------------------------------------------+ |
- | | EXTERNAL CST / PVST+ / OTHER MST REGIONS | |
- +-----------------------------------------------------------------------------------+
- MST Region Attributes
An MST Region is a collection of interconnected switches that execute the same MSTI topology. For switches to belong to the same MST Region, they must match on three exact attributes :
Configuration Name: Case-sensitive string (up to 32 characters, e.g., CAMPUS-CORE ).
Revision Number: 16-bit integer ( 0 to 65535 ). Must be incremented manually by the administrator when mappings change; does not auto-increment.
VLAN-to-Instance Mapping Table: An exact mapping of VLANs (1 to 4094) to MST instances. The switch computes an MD5 digest hash over the 4096-entry table and advertises this 16-byte signature in BPDUs. If the hash differs by a single VLAN mapping, the switches are placed into different regions!
MST Tree Concepts: IST, CST, CIST, and MSTI
IST (Internal Spanning Tree / Instance 0): The default spanning tree instance running inside every MST region. It collects BPDU information for the entire region and represents the entire region as a single virtual bridge to external networks.
CST (Common Spanning Tree): The single spanning tree that interconnects all distinct MST regions and any legacy 802.1D/802.1w bridges in the network.
CIST (Common and Internal Spanning Tree): The unified overarching spanning tree topology comprising the CST outside regions and the IST inside each region.
MSTI (Multiple Spanning Tree Instance): User-configured instances ( 1 to 4094 ) that exist strictly inside an MST region. MSTI BPDUs are never transmitted outside the region ; they are encapsulated inside the single IST BPDU (M-Record TLVs).
CIST Regional Root: The switch within an MST region that has the lowest path cost toward the global CIST Root Bridge. Boundary ports on the Regional Root forward or block for the entire region.
- 5. Cisco IOS-XE Spanning Tree Configuration & Verification
- 1. Rapid PVST+ Configuration ! Configure Rapid PVST+ globally
- Switch(config)# spanning-tree mode rapid-pvst
- ! Set Bridge Priority for specific VLANs (Root Primary / Secondary)
- Switch-A(config)# spanning-tree vlan 10,20 root primary
- Switch-A(config)# spanning-tree vlan 30,40 root secondary
- ! (Alternatively, specify explicit priority in increments of 4096:)
- Switch-A(config)# spanning-tree vlan 10 priority 4096
- ! Configure access ports as Edge Ports with BPDU Guard
- Switch-A(config)# interface range GigabitEthernet 1/0/1 - 24
- Switch-A(config-if-range)# spanning-tree portfast
- Switch-A(config-if-range)# spanning-tree bpduguard enable
- 2. Multiple Spanning Tree (MST) Configuration ! Step 1: Enable MST globally
- Switch(config)# spanning-tree mode mst
- ! Step 2: Configure MST Region parameters
- Switch(config)# spanning-tree mst configuration
- Switch(config-mst)# name CAMPUS-REGION-1
- Switch(config-mst)# revision 1
- Switch(config-mst)# instance 1 vlan 10,20,30
- Switch(config-mst)# instance 2 vlan 40,50,60
- Switch(config-mst)# exit
- ! Step 3: Configure Instance Priorities
- Switch(config)# spanning-tree mst 1 priority 4096
- Switch(config)# spanning-tree mst 2 priority 8192
- 3. Verification & Troubleshooting Commands ! Verify MST Region configuration and MD5 digest
- Switch# show spanning-tree mst configuration
- Name [CAMPUS-REGION-1]
- Revision 1 Instances configured 3
Digest : 0x9A4E7F20B6D105C8A33E2B8940C155E2
- Instance Vlans mapped
- ------- ---------------------------------------------------------------------
- 0 1-9,11-19,21-29,31-39,61-4094
- 1 10,20,30
- 2 40,50,60
- ------------------------------------------------------------------------------
- ! Inspect specific MST Instance topology
- Switch# show spanning-tree mst 1
- ##### MST1 vlans mapped: 10,20,30
- Bridge address 5006.0420.0001 priority 4097 (4096 sysid 1)
- Root this switch is the root
- Interface Role Sts Cost Prio.Nbr Type
- --------------- ---- --- --------- -------- --------------------------------
- Gi1/0/48 Desg FWD 20000 128.48 P2p
- Gi1/0/49 Desg FWD 20000 128.49 P2p