Thursday, August 8, 2013

And finally...RSTP

Rapid Spanning Tree, or RSTP, is an IEEE approved protocol designated 802.1w.  It shares some similarities and core function with STP, namely:
  1. Same root bridge election process
  2. Same path cost determination
It is fully backward-compatible, however the benefit of the "rapid" is lost when using RSTP along with STP.

RSTP changed the port states, replacing listening and learning with a single state of "discarding."  It also added some port types, which are "alternate" and "backup."

The alternate port takes the function of the root port should the root become in-operational, and the backup port takes the place of a designated port.  The port types are not "blocking" but "discarding" so they never need to go through the listening and learning states, allowing faster convergence.  The ports also have the ability to assume a different port role based on the condition of their links.  For instance - a port that is acting as a backup port can transition to a root port if its root port fails and the fastest path back to the root is through the other switch to which it is connected.

RSTP considers any port connected to another switch running in full-duplex to be a point-to-point link, while any half-duplex connection is considered to be link type "shared."  A half-duplex connection would typically be to a hub, although these are not in wide use any longer in 2013.  Any end-user devices such as PC or phone are considered to be edge-type links.  RSTP converges differently based on port type.

One major difference between RSTP and STP is that in STP, only the root bridge sends BPDUs, generally.  In RSTP, all switches send BPDUs to all other switches in the topology.  The BPDU is used for link state and root bridge identification, but also is used as a keep-alive.  If an RSTP switch misses 3 BPDUs (compared to STP's 20-second max age) it identifies that switch as dead and sends the TCN to all switches alerting to the change.

Edge type ports in RSTP are similar to using portfast and BPDU guard on that interface, except that by configuring the port with portfast it becomes an edge device and by default will transition to a point-to-point port type if it receives a BPDU.

Point-to-point ports handle convergence rapidly by following a different process than STP.  When a switch is introduced in to a network, and based on initial BPDU that alerts it that one of its local ports will become a designated port, it immediately transitions that port to the forwarding state and sends a proposal to the sending switch to start sending data.

The sending switch, upon receipt of the proposal, sets all other non-edge ports to discarding to deter loops and begins learning MAC addresses of its edge-type ports.  The process of putting nonedge ports into discarding state is called synchronizing the ports.

RSTP design and configuration is beyond the CCNA certification level, but it's good to know how and why it works.

No comments:

Post a Comment