Sub topic 3
Rapid STP: Faster Convergence with the Same Tree Logic
Assume you understand Ethernet switching, VLANs, trunks, and MAC learning. Rapid Spanning Tree Protocol (RSTP, IEEE 802.1w) keeps the same root-bridge and path-cost logic as classic STP, but reaches a forwarding decision faster.
RSTP uses these port roles:
- Root port: the best path toward the root bridge.
- Designated port: the forwarding port for a network segment.
- Alternate port: a backup path toward the root.
- Edge port: a port connected to an end host.
Proposal, Agreement, and Link Types
On a point-to-point link, RSTP uses a proposal/agreement handshake. A switch proposes its port as the designated forwarding port. The neighbor synchronizes its other ports and replies with agreement. This avoids waiting through the classic listening and learning timers.
A full-duplex link between switches is usually point-to-point. A shared or half-duplex segment does not support the same fast handshake. RSTP can also detect a failed link and immediately activate an alternate port.
Edge Ports and PortFast
An edge port connects to a host, not another switch. It enters forwarding quickly. Cisco PortFast implements this behavior. Never use it on a switch-to-switch link, because a temporary loop could forward immediately.
interface GigabitEthernet0/5
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enablePer-VLAN Trees and Root Placement
PVST+ creates one classic STP instance per VLAN. Rapid PVST+ creates one RSTP instance per VLAN, allowing VLANs to use different roots and paths. Deliberately place the root near the distribution layer, rather than letting an access switch win by accident.
spanning-tree mode rapid-pvst
spanning-tree vlan 10 root primaryProtection, MSTP, and Troubleshooting
- BPDU Guard disables an edge port if it receives a BPDU, which usually indicates an unauthorized switch.
- Root Guard prevents a port from accepting a superior root announcement.
- Loop Guard prevents a normally nonforwarding port from incorrectly forwarding when expected BPDUs stop arriving.
MSTP maps many VLANs to a smaller number of spanning-tree instances. This reduces control-plane work, but every switch must share the same region name, revision, and VLAN-to-instance mapping.
Check the root, port roles, and guard violations with show spanning-tree vlan 10, show spanning-tree inconsistentports, and topology-change counters. A root that changes unexpectedly often indicates a bad priority, missing guard, or an accidental switch connection.
Exercise
Which protection feature should protect an access port from a newly connected switch?
Show answer
BPDU Guard, because it disables the edge port when a BPDU arrives.