RSTP & Rapid-PVST+

RSTP Overview

Rapid Spanning Tree Protocol (RSTP) is an enhancement of the original STP 802.1D protocol. The RSTP 802.1w protocol is an IEEE open implementation. Cisco has its own proprietary implementation of RSTP, that includes the benefits of its Per-VLAN spanning tree protocols, called Rapid-PVST+. Rapid-PVST+ and RSTP are important enhancements to the original STP protocol because they can switch ports from blocking to forwarding without relying on timers, execute spanning tree calculations and converge the network faster than STP. In STP, network convergence can take up to 50 seconds, with RSTP and Rapid-PVST+ network convergence can happen in just over 6 seconds. In RSTP and Rapid-PVST+, switchports transition from discarding (blocking) to forwarding based solely on a switch-to-switch proposal and agreement process, using BID priority, instead of having to also wait for timers.

RSTP includes many of Cisco’s earlier proprietary 802.1D enhancements. It is also backwards compatible with STP and can work with legacy switches running STP. RSTP and its variants are widely implemented so it is beneficial to understand a little about how RSTP works.

RSTP Characteristics

– RSTP messages or advertisements are called version 2, BPDUs, and has all the same fields, making it backwards compatible with 802.1D STP BPDUs.
– As with STP, RSTP version 2 BPDUs  are sent every 2 seconds.
– With RSTP BPDUs, the version field is set to 2, and Flag field is used for RSTP control information, including the Proposal and Agreement bits.
– The proposal and agreement bits in the flag field are responsible for faster convergence and transitions to port forwarding states.

Edge Ports and Non-Edge Ports
– In RSTP, ports are defined as either edge ports and non-edge ports. Edge ports are ports that are not intended to be connected to other switches. Edge ports can go immediately into forwarding mode since they do not need to negotiate BPDU messages with other switches.
– Non-edge ports can have either a point-to-point or shared link type. Non-edge ports are temporarily blocked during the proposal and agreement process. {loadposition adposition6}

Link Types – Point-to-Point and Shared

– With RSTP, non-edge ports can be configured as either a point-to-point link type or a shared link type. The shared link type is for a port that is connected to other switches by way of a shared device like a hub.
– Point-to-point link types can switch to forwarding state quickly depending on its port role

Port Roles and Port States

Root Port – port that is closest to the root bridge. It goes directly to the forwarding state.
Designated Port – only one designated port allowed per network segment (switch-to-switch link), this can either be an alternate port and a designated port, or a root port and a designated port. When there are two designated ports in the same segment the proposal and agreement process will result in one of them becoming an alternate (discarding) port. In this way designated ports make the most use of the proposal and agreement process. A designated port will eventually be a forwarding port though it can temporarily transition to the listening (discarding) state during the proposal and agreement process.
Alternate Port – available to transition to designated and forwarding if needed, otherwise discarding (blocking)
Backup Port – used with a redundant switch-to-switch port link. Is in the discarding state.

Port States
STP                            RSTP

Blocking      ————     Discarding
Listening      ————     Discarding
Learning       ———-        Learning
Forwarding      ———-       Forwarding

IOS CLI Commands

Activate the Rapid-PVST+ protocol:
switch(config)#spanning-tree mode rapid-pvst

Configure the switch non-edge ports to either the point-to-point or shared link types:

switch(config)#int gi0/1
switch(config-if)#spanning-tree link-type point-to-point
switch(config-if)#spanning-tree link-type shared

Clear previous STP protocols:
switch(config)#clear spanning-tree detected-protocols

Change the root bridge election and force the switch to be the root bridge or backup root bridge by manually setting the bridge priority number to a number lower than default number of 32768:
switch(config)#spanning-tree vlan <num> priority <num>

Rig the root bridge election and force the switch to be the root bridge or backup root bridge by automatically using the root primary or root secondary designation. This command simply changes the bridge priority number to predefined numbers lower than the default:
switch(config)#spanning-tree vlan <num> root primary
switch(config)#spanning-tree vlan <num> root secondary

Video Tutorials

If you would like to follow along with the video download the PT start file here:

In this tutorial, I configure the switches for Rapid-PVST+

In this video, I finish with the Rapid-PVST+ configurations, and then test the network for connectivity.

Author: Dan

Dan teaches computer networking and security classes at Central Oregon Community College.

Leave a Reply

Your email address will not be published. Required fields are marked *