STP

If implemented correctly the Spanning Tree Protocol or STP is like your best Friend. Simply put it prevents loops forming at Layer 2 when switches are bridged interconnecting via multiple paths. The key in the last sentence was the term multiple paths. The Spanning Tree Protocol implements the 802.1D IEEE algorithm by exchanging Layer 2 Bridge Protocol Data Units or BPDU messages with other Switches to detect loops, and then removes the loops by shutting down selected bridge interfaces.


Types of Spanning Tree Protocols

  • Spanning Tree Protocol or 802.1d
  • Common Spanning Tree or CST
  • Per VLAN Spanning Tree or PVST
  • Per VLAN Spanning Tree Plus or PVST+
  • Rapid Spanning Tree Protocol or RSTP – 802.1w
  • Multiple Spanning Tree or MISTP – 802.1s

802.1D Port States

  1. Disable
  2. Listening
  3. Learning
  4. Blocking
  5. Forwarding

802.1D Tree Timers

  • Max Age = 20 
  • Hello = 2 
  • Forward Delay = 15 

Port Costs

  • 10 Mbps Port Cost = 100 
  • 100 Mbps Port Cost = 19 
  • 1 Gbps Port Cost = 4
  • 10 Gbps Port Cost = 1 

Control Plan Port Features

  • PortFast
  • Root guard
  • Loop guard
  • BPDU guard

Raping Spanning Protocol or IEEE 802.1W

The IEEE 802.1w Spanning Tree protocol is an enhancement to the traditional 802.1d Spanning Tree protocol. The faster convergence times come in the form of new enhanced BPDU’s. Back in the day when it was acceptable to converge a network in minutes as opposed to seconds the traditional 802.1d standard was considered a suitable solution. The beauty in the 802.1w protocol is its ability to work with the older 802.1d standard to exchange BPDU’s that both protocols can understand.


802.1W Port States

  1. Discarding
  2. Learning
  3. Forwarding

802.1W Port Roles

  • Root
  • Designated
  • Blocking
  • Alternate
  • Backup

Bridge Protocol Data Unit or BPDU

  • Contains the Bridge ID 
  • Contains the Root Path Cost 
  • Contains the Root ID 
  • Contains the Root Timers

Per VLAN Bridge Priority Values

0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440.

The default value is 32768. The Bridge priority is a combination of the priority + MAC

The default value is 32768. I always set the VLAN priority to 4096 for each VLAN that I’m going to advertise from the Root Bridge. Remember in a Root Bridge election the Bridge (Switch) with the lowest Bridge ID wins the election. For example is you had two Switches with a their default Bridge ID of 32768 + MAC the Switch the the lowest Bridge ID will be elected as the Root Bridge. By setting the VLAN Priority to 4096 for all VLAN I control the election process and the place of the Root Bridge.

The Bridge ID

  •  A 2 byte Bridge Priority, System ID, and 6 byte MAC address. Priority + System ID ( VLAN ID+ MAC

 Spanning Tree Root Guard

Use Root Guard on downstream trunk ports toward the none Root Bridges to prevent the the trunk port from receiving superior BPDU’s. This basically insures the designated ports do not become a root port. If a superior BPDU is received on the port its placed into a root-inconsistent state.

Spanning Tree BPDU Guard

Use Spanning Tree BPDU Guard in conjunction with Spanning Portfast to insure that unwanted BPDU’s are not seen or processed on the port that have Portfast enabled.

Spanning Tree Port Fast

Used on Edge ports or Host ports ONLY to speed up the port state from blocking to forwarding. With Spanning Tree enabled ports progress through states before they stabilize. The Network Admin can speed up the process on Access Switches by enabled Portfast on a per port basis.

Spanning Tree Loop Guard

Loop Guard detects the sudden lose of BPDU’s. Configure Spanning Tree Loop Guard on all Switches in domain.

Spanning Tree Uplink Fast

Designed for fast reconfiguration of Access Switches. Should not be configured on Distribution or Core switches.

The Spanning-Tree Election Process

  1. All Bridges (Switches) have a unique Bridge ID Priority + System ID ( VLAN ID ) + MAC
  2. All Bridges claim to be the Root Bridge with a Priority of 32,768
  3. The MAC address can come from Supervisor, VLAN, Backplane or Pool.
  4. All Switches begin by sending out BPDUs with their Bridge ID.
  5. When the Switch receives a BPDU with a better ID, it replaces its own.
  6. Sooner or later STP converges and all Switches agree on one Root Bridge.

Routing Switching Voice Firewall Wireless