Back when I was getting started in IT, Spanning Tree Protocol was a lightly touched upon topic. “Just remember it’s on by default and it does most of the work for you.” Most small networks won’t have to configure STP. If you’re planning redundant network links then you have to pay attention to STP.
STP starts with 802.1D. It provides a loop-free topology on a Layer 2 network. When a failure occurs, the network can recover without the intervention from an administrator. A switch with STP will look for redundant links to other switches. When redundant links are found, the switch blocks one of those links to prevent a loop from occurring.
A switch listens on incoming frames to find out what network devices reside on which ports. A table is built with source MAC addresses with the port numbers where the switch found other network devices.
When switches aren’t aware of each other, a bridging loop can occur. This is when a frame is forwarded continuously between switches.
Switches communicate with each other via BPDUs, or bridge protocol data units. They are sent out every 2 seconds from the switch’s MAC address to a multicast address of 01:80:C2:00:00:00.
Two types of BPDUs can be transmitted:
- Configuration BPDU – for STP computation.
- Topology Change Notification (TCN) – sent when changes occur in the network topology.