Configuring Rapid PVST+
Configuring Rapid PVST+
Rapid PVST+ is IEEE 802.1w the default STP protocols enabled on all newly created VLAN on nexus 7K switches.
RSTP increase the traditional STP convergence time from almost 50 sec to less than 1 Sec. As soon as Rapid PVST+ is configured, it is enabled on per-VLAN basis and it can also be disabled on per-VLAN basis.
RSTP running on each VLAN has one Root Bridge and the selection criteria of Root Bridge, Root Port and designated port is same as traditional STP. Here we are not going to recalculate these ports as we assume that readers are well aware of these concepts in traditional Ethernet switch segments.
In RSTP, each designated ports sends out BPDU every 2 sec and if these BDDU are missed consecutive three times or if MAX age expires, the port immediately flushes all protocol information stored on it. Due to this short time BPDU loss allows quick failure detection and RSTP starts re-convergence. The BPDU version of RSTP is version 2 which means it can easily detects the connected legacy 802.1D Bridges.
Following are the ports used in RSTP:
Edge Ports: these ports transition immediately to forwarding states and is configured to those ports where end host are connected. These ports does not generate the TCN when topology changes.
Root Ports: It has shortest distance or cost to root bridge and when a new Root port is selected it blocks the old root ports and immediately transition new root port to forwarding state.
Point-to-Point Links: If a new port connected and becomes the DP port then it uses the proposal and agreement handshake to ensure loop free topology.
RSTP gets the rapid transition to forwarding states only on edge ports and Point to point link and only designated ports and root port generates TCN BPDU when they don’t receives the three consecutive BPDU from directly connected neighbor or after expiration of MAX age timer. And these ports send the configuration BPDU with TC bit set and these TCN BPDU is sent out all DP or Root port to reach to Root Bridge. The Port will send the BPDU with TC bit set as long as TC while timer runs on that port which is Hello time + 1 Sec.
When RSTP detects a topology change the RSTP takes the following action:
- It starts the TC while Timer whose value is equal to 2*Hello time for non-edge ports and DP ports.
- Flushes the MAC address associated with all these ports.
- Switch after receiving the TC BPDU, floods to all switch causes dynamic MAC address entries flush immediately on per port basis.
Rapid PVST+ and 802.1w uses all six bits of the flag byte for following:
- Role and state of port that has originated BPDU
- For Proposal and agreement handshake
Proposal and Agreement Handshake
In order to understand the Proposal and agreement handshake, refer the below topology:
- In above figure SW-A is connected to SW-B via point to point link and at current stage all ports are in blocking state.
- Now let’s suppose that SW-A has priority smaller than SW-B due to which SW-A sends the Proposal message (configuration BPDU with Proposal Bit Set) to SW-B and proposing it as Designated Switch.
- SW-B receives the proposal and select the root port on which proposal was received and block all non-edge ports and sends the agreement message from Root Port.
- SW-A receive the Agreement message and make that designated port to forwarding state.
- Now Let’s Suppose at same time SW-C gets connected to SW-B and same process begins, SW-C select the port connected to SW-B as Root port and both ports between SW-B and SW-C moves to Forwarding state
- By this procedure any switch that connect to active topology will part of RSTP by providing loop free topology.
RSTP Protocol Timers:
Following are the RSTP protocol timers discussed below:
- Hello Timer: Timer on which BPDU are sent between switches, by default it is 2 Sec.
- Forward Delay: It determine how long each of listening and learning port states last and moves to forwarding states, by default listening port takes 15 sec to learning state and learning states further takes 15 sec to forwarding state.
- MAX Age timer: It is the timer till that any port will keep the STP state stored and after this timer expires the port will flush all STP information from that port. By default MAX age timer is 20 Sec.
Port – Roles:
Following are the Port roles a port transit while working in RSTP mode.
- Root Port: Port that has lowest cost path to root Bridge. A switch has only one Root Port.
- Designated Port: Lowest cost path towards root port in a segment. A Root switch can have more than one DP.
- Alternate Port: This is another port replacement of root port, if a root port goes down and that switch has Alternate port, this alternate port transition to Forwarding state to achieve fast RSTP convergence.
- Backup Port: It is just another port has same behavior like designated Port, If a DP goes down , This Backup port take role of designated Port and provide fast RSTP convergence.
- Disabled Port: This Port does not participate on RSTP operation.
Following are the Port states when RSTP starts working on it.
- Blocked Port
- Learning Port
- Forwarding Port
- Disabled Port
Synchronization of Port Roles:
When any devices receives the proposal message on a port and that is selected as new root port, RSTP will forcefully synchronize all other ports with new root port information.
An individual port on switch can be said as synchronized if either of following applies:
- If that port is in blocking state
- If that port is edge port.
If suppose the switch has DP and is not configured as edge port than RSTP will transition it to blocking state while RSTP is forcing device to synchronize with new Root information.
Once all ports are synchronized, switch will sent the agreement to the designated device that corresponds to root port and follow the set of events mentioned in diagram below to make RSTP in working state.
RSTP Interoperation with Legacy 802.1D STP:
RSTP can easily interoperate with legacy 802.1D protocol when it receives the BPDU with Version 0.
If the switch running RSTP receives the BPDU V2 with Proposal flag set than device sends an agreement message once all ports are synchronized, but it receives the BPDU with version 0, it will not set proposal flag rather starts forward delay timer for that port and it takes 30 sec to transition to forwarding state and 802.1w sends the 802.1D configuration BPDU and TCN BPDU on per port basis.