Spanning Tree Primer

By | May 31, 2024

What is spanning tree, what is the purpose of this protocol, where does it work?

These questions are easy to answer. Spanning Tree is a Layer 2 Ethernet loop prevention protocol that works on Ethernet switches, that’s it, nothing else. That’s all spanning-tree does.

Why do we need this protocol? Imagine a network with two Layer 1 hubs connected by a pair of Ethernet cables and a PC connected to each of the hubs. When one of the PCs sends a communication over the cable, the connected hub will flood the data from both interfaces to the other hub, the receiving hub then forwards the received messages to the PC and back to the other interface back to the original hub, this communication will be in the Network continues until one of the connections is removed, this is called a loop, sometimes called a broadcast storm.

Broadcast storms are fatal to your network, causing voice and data outages. We no longer use hubs in modern networks, we usually use switches because of their functionality and features, which is a key feature of a layer 2 switch is spanning tree.

Now imagine the same network as above with two switches instead of two hubs. Instead of all four ports now being in the forwarding state, spanning tree uses various choices and weights to determine that a single port in our small topology will be blocked, now if one of the PCs attached to the switches broadcasts onto the line, it won’t the case may be loop traffic due to the blocked port.

We need to learn how spanning-tree decides which port or ports to block to prevent a loop or loops from occurring in our network.

The first thing you need to do to understand Spanning Tree is to imagine this: you step out of your house to go to the office, at the intersection at the top of the street you stop, turn left, right or straight ahead ?, your decision on which route to take is based on your knowledge of the location of the office.

STP works in exactly the same way, spanning-tree selects a device as a reference point, this reference point is advertised to other spanning protocols on other switches when a switch receives the reference point on more than one port based on link values ‚Äč‚Äčlike link- Bandwidth, port priority and port number will decide which port is better. Once the switches in the network have decided which ports to forward and which to block, STP has done its job.

Thanks to Joe Spoto | #Spanning #Tree #Primer

Leave a Reply

Your email address will not be published. Required fields are marked *