Spanning Tree Protocol NOTES

A root port is the port with the least cost path to the root switch.

“MAC address reduction” is a technique to provide a unique bridge ID per spanning tree instance (per-VLAN) without using multiple different MAC addresses from the switch. This is done by using the last 12 bits from the 2-byte priority field to represent the VLAN number (called System ID Extension). The first 4 bits of the 2-byte priority field are still used to configure a priority value in increments of 4096

default 1d STP timers:

  • Hello = 2sec
  • FwdDelay = 15sec
  • MaxAge = 20sec

A switch will age all entries in its CAM in FwdDelay seconds after receiving a BPDU with the TCA flag set.

Before a port changes from Block to Forwarding it goes into Listening state and then Learning state (to prevent temporary loops). Each state is the length of FwdDelay.

Transition from Forwarding to Blocking can be made immediately.

802.1Q trunks do not support PVST natively. When using 802.1Q trunks with non-Cisco switches, the switches must follow the IEEE standard and have a single STP instance for all VLANs running on the native VLAN (CST - Common Spanning Tree). Cisco switches do support PVST+ over 802.1Q trunks so a all Cisco network works fine with multiple instances per VLAN.

Cisco switches accomplish the PVST+ with 802.1Q by sending VLAN tagged BPDU’s to a multicast MAC address of 0100.0CCC.CCCD. Cisco PVST+ switches read and interpret the BPDU while non-Cisco switches forward them along like any other Mcast packet. This allows two Cisco PVST+ domains separated by a non-Cisco CST domain to be joined together.

The non-Cisco CST domain applies the STP topology of the native VLAN to all VLANs.

UplinkFast - Tracks alternate root ports - when a RP is lost (interface fails), an alternate RP is immediately transitioned to Forwarding and Triggers CAM updates of all switches. Ideal for access layer switches with links to dual/redundant dist/core switches. UplinkFast also optimizes the role of an edge switch by setting priority to 49,152, setting port costs to 3000. The idea being an edge access switch should likely never become a Root switch or a transit switch.

UplinkFast’s CAM updates are not done via the TCN/TCA process. Rather, CAM updates are done by flooding multicast frames containing the source MACs of all its locally known MACs. The dest MAC address of the flooded multicast frame is 0100.0CCD.CDCD

BackboneFast - Avoids waiting for MaxAge when a RP stops receiving hellos. The switch sends a special Root Link Query RLQ BPDU out the port missing the hellos asking if that upstream switch is still receiving hellos from the root switch. The upstream switch can respond back with another RLQ that the path to root is lost. At which point the switch has the knowledge it needs to know that a STP topology change is needed.

Three RSTP port types:

  • Point-to-point
  • Edge
  • Shared

RSTP is basically the IEEE standard implementation of Cisco’s PortFast, UplinkFast, and BackboneFast enhancements with other minor timer shortcuts to improve convergence. RSTP will only wait for 3 missing hellos, as opposed to 10. RTSP also skips the Listening state when transitioning a port from Discarding to Forwarding.

802.1s MST uses 802.1w RSTP for fast convergence

A group of MST switches with a common configuration is a region. A MST region presents itself as a single switch to non-MST or other MST regions connected to it. The STP instance connecting to these other regions is called the Internal Spanning Tree (IST).

Root Guard ports will recover when the undesired superior BPDUs are no longer received.

BPDU Guards err-disables a port that receives a BPDU.

Loop Guard places a port in STP loop-inconsistent state when it stops receiving BPDUs, and will recover when BPDUs are again received.