Skip to main content
Quick Notes: Rapid Spanning Tree Protocol (CCIE Official Cert Guide - Chapter 3)
- IEEE 802.1w Rapid Spanning Tree Protocol (RSTP) enhances the 802.1D standard with one goal in mind: improving STP convergence.
- The number of port states has been reduced from five to three: While 802.1D STP defines Disabled, Blocking, Listening, Learning, and Forwarding states, 802.1w RSTP defines only Discarding, Learning, and Forwarding states.
- In RSTP, a Discarding state means that the port does not forward data frames, receive data frames, or learn source MAC addresses. But it continues to process received BPDUs; send BPDUs (depending on its role); and send and receive frames of inter-switch signaling protocols such as DTP, VTP, CDP, LLDP, PAgP, LACP, or LOOP.
- RSTP decouples the state of the port from its purpose, or a role, and
- defines four separate port roles:
- Root Port (maintains its usual meaning)
- Designated Port (maintains its usual meaning)
- Alternate Port (a prospective replacement for the switch’s own Root Port)
- Backup Port (a prospective replacement for the switch’s own Designated Port on a shared segment)
- In RSTP, ports have types: a port can be either an Edge or a Non-Edge port.
- An Edge Port immediately becomes Designated Forwarding after coming up. It still sends BPDUs but it expects not to receive any. Should a BPDU be received by an Edge port, this port will revert to the Non-Edge type and start operating as a common RSTP port.
- There is no reliable way of automatically detecting whether a port is an Edge or a Non-Edge port. The default port type on Cisco Catalyst switches is Non-Edge.
- Regarding links, RSTP recognizes two link types :
- Point-to-point link: A link that connects an RSTP switch to at most one neighboring RSTP switch.
- Shared link: A link that connects an RSTP switch to two or more neighboring switches. (uncommon)
- Most of RSTP’s improvements in its reaction speed are usable only on point-to- point links. On shared links, RSTP reverts to slow operation driven by timers similar to STP.
- There is no reliable way to determine the link type. If a port negotiates half-duplex operation with its connected neighbor, the switch assumes that the neighbor is a hub (as hubs are incapable of supporting full-duplex), and it will consider the link type to be shared. If a port negotiates full-duplex operation, the switch will assume that the neighbor is a switch running RSTP, and will treat the link as point-to-point.
- The link type can be configured on a per-port basis using the spanning-tree link-type { point-to-point | shared } command.
- Note: The default port role and port state are Designated Discarding—this is the combination of roles and states applied to a port at the moment it becomes live. The default port type is Non-Edge. The default link type depends on the duplex mode of the port—for full-duplex, it is point-to-point; for half-duplex, it is shared.
Changes to BPDU Format and Handling
- In RSTP, there is only a single type of BPDU used both for building a loop-free topology and for topology change notification purposes. TCN BPDUs are not used by RSTP.
- The Flags field has been updated. In 802.1D STP BPDUs, only 2 bits out of 8 are used: TC (Topology Change) and TCA (Topology Change Acknowledgment). RSTP uses the 6 remaining bits as well to encode additional information: Proposal bit, Port Role bits, Learning bit, Forwarding bit, and Agreement bit. The TCA bit is not used by RSTP.
- In RSTP, each switch originates BPDUs on its own, with their contents nevertheless based on the information from the BPDU stored on the switch’s Root Port. RSTP BPDUs therefore become more similar to a Hello mechanism known from routing protocols.
- If a switch ceases to receive RSTP BPDUs on its port, it is certain that the problem is contained on the link between this switch and its neighbor. This allows RSTP switches to age out BPDUs much sooner—in a 3x Hello interval. Three missing Hellos in a row cause a port to age out the stored BPDU.
- The MessageAge field value no longer has an influence on BPDU’s expiry. Instead, it serves the role of a hop count. Any BPDU whose MessageAge is equal to or higher than its MaxAge will be discarded upon arrival.
- In RSTP, an inferior BPDU originated by a designated switch on a segment is accepted right away, immediately replacing previously stored BPDUs.
- In other words, if a designated switch on a segment suddenly sends an inferior BPDU, other switches on the segment will immediately accept it as if the superior stored BPDU expired just when the inferior BPDU arrived, and reevaluate their own port roles and states on the segment according to usual rules.
- This inferior information has to be processed immediately to find out whether the neighboring switch has to be updated about the root switch’s identity or about a better path toward it.
Proposal/Agreement Process in RSTP
- Improvements described so far allow a switch or its neighbors to rapidly recover from a lost connectivity to the root switch. However, a connectivity disruption can also be caused by adding a new link into the topology.
- RSTP uses the Proposal/Agreement process on a point-to-point link to rapidly put such a link into operation without causing a temporary switching loop or significant interruptions in the communication.
- If a newly added point-to-point link causes one of the attached switches to place its Root Port on this new link, the roles of remaining ports on this switch can move from Root or Alternate to Designated (the root path cost of this switch can decrease below the costs of its neighbors).
- This can have a cascading effect of several switches updating their Root Ports, and this needs to be handled rapidly and in a loop-free manner.
- Preventing a switch from creating a switching loop by rapidly changing and activating its Root Port can be done by having the switch put all its Non-Edge Designated ports into Discarding state before the new Root Port is put into Forwarding state. Note that the Non-Edge Designated ports include those ports that have moved from old Root and Alternate roles to Designated after a superior resulting BPDU was received on the new Root Port and the switch reevaluated the roles of all ports.
- This procedure alone would allow a switch to rapidly change its Root Port while maintaining a loop-free topology, but at the same time, it would cause a major disruption.
- To avoid waiting twice for the ForwardDelay timer, an explicit signaling scheme between the switches needs to be used, allowing them to confirm that it is safe to put a Designated Port into the Forwarding state.
- This signaling scheme is called Proposal/Agreement.
- The Proposal signifies the willingness of a port to become Designated Forwarding, while the Agreement stands for permission to do so immediately.
- After a new point-to-point link is added between two switches, ports on both ends will come up as Designated Discarding, the default role and state for a Non-Edge port.
- Any Designated Port in a Discarding or Learning state sends BPDUs with the Proposal bit set.
- If one of the ports receiving a Proposal discovers that the Proposal constitutes the best received resulting BPDU, its role will change from Designated to Root (the state will remain Discarding yet). Other port roles on that switch will also be updated accordingly.
- Furthermore, a switch receiving a Proposal on its Root Port will immediately put all its Non-Edge Designated ports into a Discarding state. This operation is called Sync.
- A switch in Sync state is now isolated from the network, preventing any switching loop from passing through it: Its Root Port is still in the Discarding state (and even if it was Forwarding, the neighboring Designated Port is still Discarding or Learning), and its own Designated Ports are intentionally moved to the Discarding state. Now it is safe to move the new Root Port to the Forwarding state and inform the upstream switch that it is now allowed to move its Designated Discarding or Learning port to the Forwarding state.
- This is accomplished by a switch sending a BPDU with the Agreement bit set (or simply an Agreement) through its Root Port after performing the Sync.
- Upon receiving an Agreement on its Designated Discarding or Learning port, the upstream switch will immediately move that port into the Forwarding state, completing the Proposal/Agreement exchange between two switches.
- Because all Designated Discarding and Designated Learning ports send Proposals, the Proposal/Agreement exchange has effectively moved from “above” the switch to “beneath” it (with respect to the root switch being at the “top” of the spanning tree), constituting the cascading effect of switches pairwise reevaluating their choice of Root Ports, expressing their willingness to have their Designated Ports made Forwarding rapidly (Proposals), and eventually receiving approvals to do so (Agreements).
- Note: During the Proposal/Agreement exchange, all Non-Edge Designated ports will be moved to Discarding state (the Sync operation). If ports toward end hosts are not explicitly configured as Edge ports using the spanning-tree portfast port level command or the spanning-tree portfast default global level command (both have an effect on access ports only), they will become Discarding during Sync. Because end hosts are incapable of sending RSTP Agreements, these ports will require twice the ForwardDelay interval to become Forwarding again, and the end hosts will experience major connectivity outages. In RSTP, it is of crucial importance to configure ports toward end hosts as Edge ports; otherwise the performance of the network might be perceived as being even worse than with 802.1D STP.
Topology Change Handling in RSTP
- Only a transition of a Non-Edge port from a non-Forwarding state to the Forwarding state is considered a topology change event in RSTP.
- The reason is that a port that has newly become Forwarding can provide a better path to a set of MAC addresses than was previously available, and the CAM tables need to be updated.
- The loss of a Forwarding port is not a cause for topology change event anymore, as the set of MAC addresses previously learned on that port is definitely inaccessible unless some other port in the topology becomes Forwarding (which is handled as a topology change anyway) and possibly provides an alternate path toward them.
- The way of propagating topology change information has also changed. Instead of forwarding the information about a topology change using TCN BPDUs in a hop-by-hop fashion to the root switch and causing the root switch to send BPDUs with the TC flag set, RSTP switches immediately flood BPDUs with TC flag set.
- More precisely, a switch that detects a topology change on a port (that is, one of its own Non-Edge ports transitions into the Forwarding state) or learns about a topology change on a port (a BPDU with the TC flag set is received on its Root or Designated Port) will do the following:
- Set a so-called tcWhile timer to the value of the Hello time plus one second (older revisions of RSTP set this value to twice the Hello time) on all remaining Non-Edge Designated ports and Root Port if any, except the port on which the topology change was detected or learned.
- Immediately flush all MAC addresses learned on these ports.
- Send BPDUs with the TC flag set on these ports every Hello seconds until the tcWhile timer expires.
- Edge ports never cause a topology change event, and MAC addresses learned on them are not flushed during topology change event handling.
Rapid Per-VLAN Spanning Tree Plus (RPVST+)
- RPVST+ is a form of running RSTP on a per-VLAN basis, analogous to PVST+. This provides the subsecond convergence of RSTP with the advantages of PVST+.
- In global configuration mode, issue the spanning-tree mode rapid-pvst command. Also, it is very important to configure ports toward end hosts as Edge ports—either on a per-port basis using the spanningt-ree portfast command or globally using the spanning-tree portfast default command.
- Note: For RSTP and consequently RPVST+ to provide rapid reaction to changes in the network topology, all switches must run RSTP or RPVST+, all inter-switch links must be properly installed and recognized as point-to-point links, and all ports toward end stations must be properly identified as edge ports. Failure to meet these three requirements will degrade the RSTP and RPVST+ performance, voiding its advantages. Ports toward legacy switches will revert to legacy 802.1D STP or PVST+ operation. On shared links, RSTP and RPVST+ revert to timers. On non-edge ports, RSTP and RPVST+ rely on the Proposal/Agreement procedure to provide rapid reaction, and if the neighboring device does not speak RSTP or RPVST+, it will not be able to send an Agreement in response to a Proposal.
Comments
Post a Comment