Spanning Tree Protocol Summary

TERMINOLOGY

BRIDGE ID:

  • 8 bytes ID that uniquely identifies each switch
  • For calculations purposes the first 2 bytes are treated as priority, while the next 6 bytes are the switch’s MAC address:
  • Priority is configured with:

  • Junos default priority = 32,768
  • Range: 0 through 61,440
  • It can be set only in increments of 4096 because in reality the first 2 bytes of the BID include an Extended System ID that is used in MSTP or VSTP:

PORT COST:

  • Assigned to each interface
  • Used in the calculation of the root path cost
  • Priority is configured with:
  • Junos default cost = 20000 for 1 Gigabit Ethernet
  • Range = 1–200000000

ROOT BRIDGE:

  • Think of it as a reference point.
  • Elected based on Bridge ID
  • Lowest Bridge ID wins

ROOT PORT:

  • The port on each bridge “closest” to the root bridge
  • Closest in terms of total cost (Root Path Cost)

ROOT PATH COST:

  • A bridge’s total cost from itself to the Root Bridge
  • Received Root Path cost (received from neighbor in configuration BPDUs) + Root Port’s cost

PORT ID:

  • A unique identifier for each port on each switch
  • Port number is assigned by vendor
  • Priority is configured with:

DESIGNATED BRIDGE

  • A switch representing a LAN segment
  • If you imagine an end user connected to the segment, the Designated Bridge is the bridge that will allow traffic from that user to reach the root bridge. In the example: that would be SW2.

DESIGNATED PORT:

  • Designated bridge’s forwarding port on a LAN segment
  • Port used by a designated bridge to send traffic from the direction of the root to the LAN or from the LAN toward the root

BRIDGE PROTOCOL DATA UNIT – BPDU:

  • Packets used to exchange information between switches
  • Two types:
    • Configuration BPDU: used to make calculations
    • Topology change notification BPDU: used to report topology changes.

HOW IS THE LOOP FREE TREE DETERMINED:

EXAMPLE:

SPANNING TREE PROTOCOLS TYPES

TIMERS

max-age

  • Maximum age of received protocol BPDU
  • Range = 6-40 sec
  • Default = 20 sec

set protocols rstp max-age <age>

hello-time          

  • Time interval between configuration BPDUs
  • Range = 1-10 sec
  • Default = 2 sec

set protocols rstp hello-time <timer>

forward-delay       

  • Time a port remains in the listening or learning state during transition
  • Range = 4-30 sec
  • Default = 15 sec

set protocols rstp forward-delay <delay>

In STP these timers can only be changed on the Root Bridge. Changing them on any other switch has no effect.

ENABLING STP

RSTP is enabled by default (ELS and non-ELS) but ONLY IF the factory default configuration is loaded. If you take a brand new switch, and load your own configuration, NO RSTP (nor any other flavor of STP) is enabled by default any more!!!

in other words, RSTP is NOT enabled by default unless you are using the factory default configuration!!!

In non-ELS Junos, if you turned on RSTP on one interface, or configure a bridge priority, it automatically brought it on on all interfaces. Not the case on ELS Junos.

To enable RSTP use:

To enable MSTP use:

NOTE: Configuration name, Revision level, and MSTI-to-VLAN mapping MUST match

To enable VSTP:

NOTE: Configuring STP as protocols stp is NOT an option. Use the following command if you need to:

STP PROTECTION

INTERFACE TYPES

Related posts