Spanning Tree Layer2 Multicast Broadcast Loop – Is STP Used to Prevent All Traffic Looping or Just Broadcast and Multicast?

broadcastlayer2loopmulticastspanning tree

Let's say we have 3 switches in a logical triangle, each switch connected to the other two. This provides an opportunity for a loop when multicast or broadcast traffic is traveling here. STP is used to prevent this, deciding on a root bridge which eliminates the redundant path. Problem is, as I see it, one of the possibly shorter paths (given the situation) is cut off. Is this just the way STP works, or is the path blocked only for certain types of offending traffic like multicast or broadcast?

Best Answer

Actually, STP figures out the least-cost (shortest), loop-free path to the root switch. This is the path used for all traffic not directly attached to the switch. STP uses BPDUs to figure this out.

With your scenario, three switches connected in a triangle, both of the non-root switches will have directly connected links to the root switch, and each link will be the lowest cost to the root switch from each switch. If one of the links is faster than the other, any traffic from the link between the non-root switches will use the switch with the faster link to the root switch.