6.3 Rapid Spanning Tree Protocol (RSTP) Explained
Key Concepts
Rapid Spanning Tree Protocol (RSTP) is an enhancement of the Spanning Tree Protocol (STP) designed to provide faster convergence in network topologies. Key concepts include:
- Root Bridge: The central switch in the spanning tree topology.
- Port Roles: Different roles assigned to switch ports (Root, Designated, Alternate, and Backup).
- Port States: The operational states of switch ports (Discarding, Learning, and Forwarding).
- RSTP Messages: Protocols used for communication between switches.
- RSTP Convergence: The process of stabilizing the network after a topology change.
Root Bridge
The Root Bridge is the central switch in the RSTP topology. All other switches in the network forward traffic to and from the Root Bridge. The Root Bridge is selected based on the lowest Bridge ID, which is a combination of the switch's priority and MAC address.
Example: In a network with three switches, the switch with the lowest Bridge ID (e.g., priority 32768 and MAC address 00:1A:2B:3C:4D:5E) would be elected as the Root Bridge.
Port Roles
Port roles define the function of each port in the RSTP topology. There are four primary roles:
- Root Port: The port on a non-root switch that provides the best path to the Root Bridge.
- Designated Port: The port on a segment that forwards traffic to and from the Root Bridge.
- Alternate Port: A backup port that provides an alternative path to the Root Bridge.
- Backup Port: A port that provides a redundant path to a segment.
Example: In a network with two switches connected by two links, one link might be designated as the Root Port, while the other link serves as an Alternate Port to ensure redundancy.
Port States
Port states determine the operational status of a switch port. There are three primary states:
- Discarding: The port does not forward traffic and does not learn MAC addresses.
- Learning: The port learns MAC addresses but does not forward traffic.
- Forwarding: The port forwards traffic and learns MAC addresses.
Example: When a network topology changes, a port might transition from the Discarding state to the Learning state and finally to the Forwarding state, ensuring that traffic is only forwarded once the network has stabilized.
RSTP Messages
RSTP uses specific messages to communicate between switches. These messages include:
- Configuration BPDU: Used to exchange information about the spanning tree topology.
- RST BPDU: A faster version of the Configuration BPDU used by RSTP.
- Topology Change Notification (TCN): Sent by a switch to notify other switches of a topology change.
Example: When a link fails, a switch sends a TCN to the Root Bridge, which then propagates the TCN to all other switches, initiating the RSTP convergence process.
RSTP Convergence
RSTP convergence is the process of stabilizing the network after a topology change. RSTP achieves faster convergence compared to STP by reducing the time required to transition ports from the Discarding state to the Forwarding state. This is achieved through rapid port role transitions and the use of RST BPDU messages.
Example: In a network with RSTP enabled, if a link fails, the affected switch can quickly transition its Alternate Port to the Forwarding state, reducing the convergence time from 30-50 seconds (in STP) to just a few seconds.