Rapid Spanning Tree Protocol (RSTP)

Rapid Spanning Tree Protocol (RSTP) is an evolution of the original STP (IEEE 802.1w) that dramatically reduces network convergence time from 30-50 seconds to under 6 seconds. 

This faster recovery is critical for modern networks where downtime must be minimized.

Key Improvements Over STP

Port States: RSTP simplifies five states (Disabled, Blocking, Listening, Learning, Forwarding) into three:

  • Discarding: Blocks traffic (replaces Disabled, Blocking, Listening)
  • Learning: Learns MAC addresses but doesn't forward
  • Forwarding: Fully operational

Port Roles: RSTP introduces new roles:

  • Root Port: Best path to root bridge
  • Designated Port: Forwards traffic on segment
  • Alternate Port: Backup to root port (instant failover)
  • Backup Port: Backup to designated port
  • Edge Port: Connects to end devices (PortFast equivalent)

Proposal/Agreement Handshake: RSTP uses active negotiation between switches instead of passive timer-based convergence, enabling rapid topology changes.

Practical Example

Consider this network topology:

         [Switch A - Root]
         Priority: 4096
            /        \
       Cost:4      Cost:4
          /            \
    [Switch B]=======[Switch C]
     Cost:19 (backup link)

RSTP Port Assignments:

# Switch A (Root Bridge) - All ports Designated
Port Gi0/1 → Switch B: Designated/Forwarding
Port Gi0/2 → Switch C: Designated/Forwarding

# Switch B
Port Gi0/1 → Switch A: Root Port/Forwarding (best path)
Port Gi0/2 → Switch C: Designated/Forwarding

# Switch C  
Port Gi0/1 → Switch A: Root Port/Forwarding (best path)
Port Gi0/2 → Switch B: Alternate Port/Discarding (backup)

Failover Scenario:

If the link between Switch A and Switch C fails:

# Traditional STP: 30-50 seconds
1. Detect failure (20 sec - MaxAge timer)
2. Listening state (15 sec)
3. Learning state (15 sec)
4. Forwarding state
Total: ~50 seconds downtime

# RSTP: Under 6 seconds
1. Detect failure (immediate)
2. Switch C's Alternate Port (Gi0/2) immediately transitions
3. Proposal/Agreement with Switch B (milliseconds)
4. Port enters Forwarding state
Total: 1-6 seconds downtime

Configuration Example

# Enable RSTP
Switch(config)# spanning-tree mode rapid-pvst

# Configure edge ports (end devices)
Switch(config)# interface range fa0/1-24
Switch(config-if-range)# spanning-tree portfast
Switch(config-if-range)# exit

# Verify RSTP operation
Switch# show spanning-tree summary
Switch is in rapid-pvst mode
Root bridge for: VLAN0001
PortFast Default: disabled

Benefits

  • Fast convergence: Sub-second failover for critical links
  • Backward compatible: Works with legacy STP switches
  • Efficient: Active negotiation vs. passive timers
  • Better redundancy: Alternate/Backup ports pre-calculated

RSTP is the modern standard for loop prevention, providing enterprise-grade reliability with minimal disruption during topology changes.

No comments:

Post a Comment