Spanning Tree is designed to stop networks falling over from layer 2 frame loops caused by redundant links. It is a clever technology and needs to be respected. The whole mind set of setting a couple of core switches as root primary and secondary are destined to cause headaches in the future. Smart and calculated fail overs can be planned with STP and it’s many versions and L2 features.
Here within are my study notes for SWITCH and if you are able to glean any information off this then that is a bonus.
Bridge Protocol Data Unit’s are the heart of STP. They are what allow STP to function the way it does. BDPUs are sent to well-known STP MAC address off 00:80:c2:00:00:00. It uses the mac address of the switch itself inside the BDPU.
Configuration BPDU – STP Computation
Topology Change BDPU – announces changes in the topology.
BPDU’s are used to work out a stable reference point for an STP topology to build from. Loops are found and removed quickly due to this. BPDU’s are sent every 2 seconds .
Is seen as the weighting of a switch in the network. Default is 32,786 (ox8000).
The MAC address is sourced from either the Hypervisor, Backplane or 1024 MAC address pool.
Computation of STP by seeding of BPDU
At start up BPDU’s are sent around. PRIORITY + MAC ADDRESS are contained within. Each switch analyses and compares. (As with all L2 Technologies, the lower the value the better.) If it finds a better root bridge then it replaces it’s own. It then advertises the better root bridge ID in it’s BPDU and still ID’s it’s self as the sender.
Determine Root Path Cost
The root bridge sends out a BDPU with a path cost of 0. This is due to the fact all ports are on the root bridge.
Next Neighbour adds cost of their own port as the BPDU is processed. Then sends out BPDUs with the cumulative value.
STP Tie Breakers
Lowest root bridge ID
Lowest path cost to root
Lowest sender bridge ID
Lowest sender port ID
Disabled – Administratively down or faulty
Blocking – Blocking cannot receive or transmit. Cannot add MAC addresses. Receives BPDU’s only. Ports that STP shutdown to avoid looping are put into blocking.
Listening – Moved from blocking to listening if switch thinks it can become a root port. Receive and send BPDU’s with allows it work with STP. Becomes either Root or Designated.
Learning – After the Forward Delay has passed in the listening state, the port moves to learning. Receives and sends BPDU’s but also has the ability to learn MAC addresses! Cannot send data frames yet.
Forwarding – Another Forward Delay period passes in the Learning State and then port transitions to Forwarding. Port is fully functional.
Hello Time – 2 seconds
Forward Delay – Length of time spent in the listening and learning states. Default 15 seconds.
Max Age – The length of time a switch ‘stores’ it’s best BPDU. If nothing is received from the BPDU source after the max age timer expires then the BPDU is aged out. Default value is 20 seconds.
Topology change notification BPDU or TCN BPDU is generated when a port moves into a Forwarding state or from forwarding/learning to blocked. The Message Type field inside this BPDU is flagged with a 1. It is relayed to all switches that a change has occurred but no details regarding it. When the root bridge sets it’s TC Flag inside the config BPDU that follows, all switches that receive it change the length of their bridge table aging timers from 300 seconds to the Forward Delay default of 15 seconds.
This flushes all MAC addresses out much sooner than normal. Avoids Bridge Table corruption.