Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Someone please explain what Spanning Tree Protocol (STP) actually does in layman's terms. I know it can cause problems with some network gear, but that's the extent of my knowledge.

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

It disables dynamically all links except one connecting two any switches. So it prevents network loops. And allows to have automatically enabled backup link in case the main one stops working.

But under bad configuration it can leave more then one link connecting two switches, then broadcast traffic starts multiplying and kills all network.

share|improve this answer
    
the other posts are excellent, and i'm probably not making any friends by choosing the shortest answer - but i this is the kind of soundbite i was looking for –  username May 14 '09 at 12:25
add comment

Quoting Wikipedia Spanning tree protocol -

Spanning tree protocol is a link layer network protocol that ensures a loop-free topology for any bridged LAN. It is based on an algorithm invented by Radia Perlman while working for Digital Equipment Corporation.[1][2] In the OSI model for computer networking, STP falls under the OSI layer-2. Spanning tree allows a network design to include spare (redundant) links to provide automatic backup paths if an active link fails, without the danger of bridge loops, or the need for manual enabling/disabling of these backup links. Bridge loops must be avoided because they result in flooding the network.

The Spanning Tree Protocol (STP), is defined in the IEEE Standard 802.1D. As the name suggests, it creates a spanning tree within a mesh network of connected layer-2 bridges (typically Ethernet switches), and disables those links that are not part of the tree, leaving a single active path between any two network nodes.

STP short summary:

  • Prevents network loops which cause network crashes.

  • Provides automatic link redundancy for continuous operation.

share|improve this answer
    
+1 thanks, i feel a little guilty not choosing this –  username May 14 '09 at 12:25
add comment

The Spanning Tree Protocol addresses the problem of packet collisions/network loops in a bridget network with redundant network paths.

Here is a nice article which explains the problem and the mechanism behind STP: Understanding Spanning Tree Protocol -- the Fundamental Bridging Algorithm.

[...] Redundancy eliminates a single point of hardware failure in a network. Whenever switch redundancy is present in a network, there is a loop. The trick here is to allow for multiple bridges and only allow for a singular path. The Spanning Tree Protocol (STP) algorithm provides the missing component the Sprocket network needs to implement a redundant network without the redundant traffic paths.

share|improve this answer
    
+1 great answer, if i could choose multiple answers i would –  username May 14 '09 at 12:26
    
No problem! Sometimes less is more. –  splattne May 14 '09 at 12:28
add comment

As a follow on as to why you need STP: bridging and switching operates at layer 2 of the OSI model and is commonly associated with MAC addresses in Ethernet networks. Unlike TCP/IP, which operates at layer 3, at layer 2 there is no concept of a hop count which cause packets to expire after a period of time.

Bridges and switches, operating at layer 2, will forward (if the destination mac address is known) or flood (if it is not) traffic out ports except the one it is received on. If there is a loop in the network this would prevent packets from ever expiring and quickly consume all available bandwidth.

The spanning-tree protocol prevents this from happening, while permitting redundant links to be 'standing by'. If a link fails, the previously blocked connection is enabled and in a matter of seconds restors connectivity.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.