BCMSN: Rapid Spanning Tree Protocol (802.1w)
Posted by Aragoen Celtdra on June 18th, 2009
Rapid Spanning Tree Protocol (802.1w)
- Rapid Spanning Tree Protocol or RSTP or IEEE 802.1w was introduced by the Institue of Electrical and Electornics Engineers in 1998 .
- The original STP 802.1D was introduced in 1985.
- 802.1D – 2004 incorporates RSTP and obsoletes the original STP.
- RSTP selects one switch as the root port of an active spanning tree-connected topology and assigns port roles to individual ports on the switch, depending on whether the ports are part of the active topology.
- Adds port roles: Alternate and Backup roles.
- New port state: Discarding in addition to Learning and Forwarding
* UplinkFast, BackboneFast, and Portfast are Cisco proprietary enhancements to 802.1D
- Terminologies and parameters found in 802.1D remains primarily the same for RSTP.
- 802.1w is capable of reverting to 802.1D for interoperation with legacy bridges on a per-port basis.
- Downgrading to 802.1D cancels the benefits of 802.1w for that paritcular segment.
- Per VLAN version of RSTP is called RPVST+ equivalent to 802.1D version PVST+
- With RSTP, if a swtich, switch port, or LAN experiences some kind of failure, rapid connectivity is possible.
- A new root port and designated port of the connecting bridge transitions to forwarding through an explicit handshake protocol between them.
- RSTP allows switch port configuration so that the ports transition to forwarding directly when the switch re-initializes.
RSTP Port States
- There are only 3 RSTP port states:
- Discarding - This is a combination of 801.2D blocking, listening, and disabled states
- Learning
- Forwarding
- Port states are defined according to what the port does with incoming frames - if incoming frames are dropped or ignored, outgoing frames are as well.
- RSTP decouples the role of a port from the state of a port.
- 802.1D STP mixes the state of a port, whether blocking or forwarding traffic, with the role it plays in the active topology.
- RSTP considers there to be no difference between a port in blocking and listening states (ie both discard frames and no MAC addresses are learned).
RSTP Port Roles
- Root Port
- The closest port (measured in “path cost”) to the root bridge.
- The STA elects a single root bridge for the whole bridged network, per-VLAN, or STP instance.
- The root bridge sends BPDUs that are better than the ones that any other bridge sends.
- The root bridge is the only bridge that does not have a root port.
- Designated Port
- For bridges in the same segment, the designated port is the port on the bridge, in that LAN segment, that is sending the best BPDU.
- Alternate Port
- Becomes the root port if the active root port fails.
- Blocked from receiving root BPDUs from another switch. An alternate port has to receive BPDUs from a different bridge than itself. See figure below.
- Backup Port
- Becomes the designated port if the active designated port fails.
- Blocked from receiving root BPDUs from the designated port for a shared LAN segment from the same bridge on which the port is located. See figure below.
- Disabled Port
- Has no role within the operation of spanning tree.
Figure 1: Alternate Port vs Backup Port
BDPU Format: 802.1D vs. 802.1w
- Recall that 802.1D BPDU (1byte) only used 2 bits in the Type field (either the most significant bit is set or the least significant bit)
- RSTP uses all 8 bits.
Figure 2: 802.1D vs 802.1w Frame Comparison
- With 802.1D, a non-root bridge generates a BPDU only when it receives one on its root port.
- Here, there is more frequent relaying of BPDUs compared to the self-generated ones.
- With 802.1w, even if a bridge does not recieve a BPDU from a root it still send a BPDU every 2 seconds – this is self-generated.
- This constant transmission of BPDUs act as keep-alive mechanism.
- If three BDPUs in a row (three consecutive hello times) are not received, the bridge will assume that connectivity is lost.
- This allows the aging of protocol information (max age) to occur much faster thereby detecting failure much faster.
- A mechanism similar to backbone fast allows RSTP to accept inferior BPDUs.
Rapid Transition to Forwarding State
- The major selling point of the 802.1w is its rapid transition.
- With 802.1D, even after the designated port has been established, it still waits the forwarding timers before the port transitions to forwarding. That’s 15 sec listening and 15 sec learning.
- RSTP actively confirms that a port can safely tranisition to the forwarding state without having to rely on any timer configuration.
- The type of port is used by RSTP to base its forwarding decision when a switch detects a failure:
- Edge Ports
- These are ports directly connected to end stations and are typically unable to form bridging loops.
- Directly transitions to forwarding state bypassing the listening and learning stages.
- They are equivalent to PortFast feature.
- However, unlike PortFast, an edge port that receives a BPDU immediately loses edge port status and becomes a normal spanning tree port.
- Link Type (point-to-point)
- RSTP can only achieve rapid transition to the forwarding state on edge ports and point-to-point links.
- Derived from the duplex mode of a port:
- A port in full-duplex is point-to-point.
- A port in half-duplex is assumed to be on shared medium, such as a hub.
- Switched networks today operate mostly in full-duplex and thus are treated as point-to-point links by RSTP. This makes then candidates for rapid transition to the forwarding state.
- Edge Ports
References:
This entry is not an authoritative guide. These are merely notes and rehash of the primary text materials and resources that I use. For a thorough guide of the BCMSN course, consider purchasing Building Cisco Multilayer Switched Networks (BCMSN) (Authorized Self-Study Guide) (4th Edition)by Richard Froom, Balaji Sivasubramanian, and Erum Frahim and CCNP BCMSN Official Exam Certification Guide (4th Edition) by Dave Hucaby ; as well as following the links on the reference section of this entry.
