Spanning Tree: why loops happen, BPDUs and the Bridge ID
Sign in to read this lesson
In a switched network, redundancy (a backup link) protects against a single point of failure, but it creates a loop. A broadcast frame circles between two switches forever, because an Ethernet frame has no TTL. The result is a broadcast storm, constantly changing MAC table entries and overloaded switch CPUs. Spanning Tree Protocol (STP, IEEE 802.1D) builds a loop-free topology by blocking some ports. The switches send each other BPDUs. The most important field in a BPDU is the Bridge ID: priority (default 32768) + VLAN (extended system ID) + MAC address. A lower Bridge ID is better.
What you will learn
- Redundancy brings loops. A second cable between two switches removes the single point of failure but creates a Layer 2 loop.
- In a loop a broadcast (for example an ARP request) circles forever, because Ethernet frames have no TTL. The result: a broadcast storm, a "flapping" MAC table (MAC flapping) and switches that stop working.
- STP (Spanning Tree Protocol, IEEE 802.1D) builds a loop-free (tree) topology by blocking some ports. It is on by default on Cisco switches.
- Switches send each other BPDUs (Bridge Protocol Data Units) every 2 seconds (Hello Time), to
01:80:c2:00:00:00(IEEE) and, for Cisco PVST+, to01:00:0c:cc:cc:cd. - Bridge ID = priority (default 32768) + extended system ID (VLAN number) + MAC address. A lower Bridge ID is better.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.