Spanning Tree Protocol – PVST and RSTP Explained

PVST+ (Per VLAN Spanning Tree Protocol)

The original IEEE 802.1D standard defines only one spanning-tree instance for the entire switched network, regardless of the number of VLANs. A network running 802.1D has these characteristics:

  • No load sharing is possible. One uplink must block for all VLANs.
  • The CPU is spared. Only one instance of spanning tree must be computed.


Cisco developed PVST+ so that a network can run an independent instance of the Cisco implementation of IEEE 802.1D for each VLAN in the network.

This implementation dictates that the Priority field now contains two parts:

  • Priority: which can be configured to affect the RBID of the BPDUs being sent influencing the BPDU to be superior or inferior manually
  • System ID Extension field is also included which allows the VLAN ID to be placed into what was formerly the last 12 bits of the priority field.


A BPDU is sent for each VLAN (can be seen in System ID Extension) and they are processed separately by the switch as it runs STP instance per VLAN.

In the following example packet capture we can see the System ID Extension equal to 10, which mean this is BPDU sent for VLAN 10:


VLAN Load Balancing with PVST+:

With PVST+, it is possible for one trunk port on a switch to block for a VLAN while forwarding for other VLANs. PVST+ can be used to manually implement Layer 2 load balancing.

As a result, it’s possible to have different Root bridge for different VLAN instances. For example, in the previous diagram, S1 is the Root bridge for VLAN 10 and S3 is the Root bridge for VLAN 20.

The switches in a PVST+ environment require greater CPU process and BPDU bandwidth consumption than a traditional STP because each VLAN runs a separate instance of STP.


Note: PVST vs PVST+

* PVST uses ISL trunk only.
* PVST+ support 802.1q Encapsulation.

PVST and PVST+ are Cisco proprietary implementations of STP, the main difference is related to compatibility with standard STP:
* PVST will only send it own proprietary BPDU.
* PVST+ will send 802.1D (standard STP) BPDUs (with its own proprietary BPDU), which make it backward compatible with the standard STP.

In simple words, 2 BPDU are send with PVST+:
– PVST proprietary BPDU (includes, Bridge ID extension)
– Standard STP BPDU


RSTP (Rapid Spanning Tree Protocol)

RSTP provides significantly faster spanning tree convergence after a topology change, introducing new convergence behaviors and bridge port roles to accomplish this. While STP can take 30 to 50 seconds to respond to a topology change, RSTP is typically able to respond to changes within 3 × hello times (default: 3  ×  2 seconds) or within a few milliseconds of a physical link failure.


RSTP Port states

RSTP reduces the port states types to three (no listening state), in order to speed convergence following a link failure:

  • Discarding: No user data is sent over the port.
  • Learning: The port is not forwarding frames yet, but is populating its MAC-address-table.
  • Forwarding: The port is fully operational.


RSTP Port Roles

Also RSTP modifies the port roles Roles:

  • Root: A forwarding port that is the best port from non-root bridge to root bridge
  • Designated: A forwarding port for every LAN segment
  • Alternate: An alternate path to the root bridge. This path is different from using the root port
  • Backup: A backup/redundant path to a segment where another bridge port already connects
  • Disabled: Not strictly part of STP, a network administrator can manually disable a port


So, The New Port Roles are:

  • Alternate:

An alternate port receives BPDUs from another switch but remains in a blocked state. The alternate port act as the backup port for a root port.
For example, let’s say a switch has two paths to the root bridge. It will elect one of the two ports as a root port and the other will become an alternate port. If at any time the root port fails, this redundant path —> the alternate port will become the new root port.

  • Backup:

A backup port receives BPDUs from its own switch but remains in a blocked state. The backup port considered as the backup port of a designated port. When the designated port is invalid, the backup port becomes the new designated port.

For example, If a switch has two ports connecting to different switch via a hub (same collision domain), then one port will be elected as a designated port and the other will become the backup port.


Rapid PVST+ Frame Example:


RSTP Port type and convergence:

Edge Ports

Edge port basically corresponds to the PortFast feature. All ports directly connected to end host cannot create bridge loops in the network. Therefore, the edge port directly transitions to the forwarding state, and skips the listening and learning stages. Neither edge ports or PortFast enabled ports generate topology changes when the link toggles. 

An edge port that receives a BPDU immediately loses edge port status and becomes a normal spanning tree port. At a result, there is a user-configured value and an operational value for the edge port state.

P2P and shared port

The link type is automatically derived from the duplex mode of a port by default.:

  • A port that operates in full-duplex is assumed to be point-to-point.
  • A half-duplex port is considered as a shared port.

This automatic link type value can be overridden by explicit configuration. In switched networks today, most links operate in full-duplex mode and are treated as point-to-point links by RSTP. 


RSTP can only achieve rapid transition to the forwarding state on edge ports and on point-to-point links via the synchronization mechanism:

RSTP Initial synchronization Process:

The same process will happen if SW-2 have non EDGE ports, as a result of the Sync Operation (step-3), the non-EDGE ports on SW-2 are in Designated discarding state, and they will start sending Proposal (which include SW-1 ID as Root).


Let’s look at a similar example:

RSTP improves convergence on point-to-point links by reducing the Max-Age time to 3 times Hello interval, removing the STP listening state, and exchanging a handshake between two switches to quickly transition the port to forwarding state. RSTP does not do anything differently from STP on shared links.


RSTP Topology Change synchronization Process:




Reference:

Cisco.com

bethepacketsite.wordpress.com/2016/02/24/spanning-tree-protocol-ieee-802-1d-bridge-id/

Bilel

Bilel

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x