Lead Image © Joellen Armstrong, Fotolia.com

Lead Image © Joellen Armstrong, Fotolia.com

Understanding the Spanning Tree protocol family

Switch Keeper

Article from ADMIN 39/2017
By
Several versions of the venerable Spanning Tree protocol have appeared through the years. We'll help you sort through the acronyms and show you which version is right for your network.

The Spanning Tree protocol, which was designed to provide a loop-free Ethernet network topology, has been around for more than 30 years and has been through many iterations. The various versions include the conventional Spanning Tree protocol, Per-VLAN Spanning Tree protocol, Rapid Spanning Tree protocol, and a more recent version known as the Multiple Spanning Tree protocol. This introduction to Spanning Tree looks at some of the important enhancements introduced with later variants.

Broadcast Storm

Ethernet uses a multiaccess broadcast technique. A switch spreads the broadcast message all over the network to make sure all hosts can receive the message. To accomplish the task, when the switch receives a broadcast, it duplicates the message to all ports except the port that sends the broadcast.

In Figure 1, PC1 generates broadcast traffic. When SW1 receives the traffic, it duplicates to all other ports. SW2 does the same thing, so that all hosts in the network receive the broadcast message. This mechanism works perfectly in a simple network that does not have a loop connection.

Figure 1: A simple switched network.

A loop connection complicates the simple scenario depicted in Figure 1. In Figure 2, when SW1 receives a broadcast, it duplicates the message to SW2. SW2 receives the message and sends it to SW3. When SW3 receives the message, it duplicates it back to SW1, and the process repeats forever. This phenomenon is called a broadcast storm, which can consume all available CPU resources and network bandwidth. The entire network could be unavailable in several seconds after a broadcast storm occurs.

Figure 2: A broadcast storm is created without Spanning Tree protection.

Spanning Tree Protocol

The Spanning Tree protocol (STP) is designed to eliminate the loop by blocking some links in the network. STP can define the port role and control the state of the switch ports. By moving the port from the forward state to the blocking state or vice versa, the paths between switches can be closed or opened. Decisions about which paths to open or close are made using the Spanning Tree Algorithm (STA). STP will choose a switch to be the root switch automatically. (It is also possible to choose the root switch manually through configuration.) After a root switch is chosen, all non-root switches should only have one path to reach the root switch.

If more than one path exists, all paths should be blocked except the best one. The best path is the path that has the lowest root cost. Root cost is a relative measure of the bandwidth of all linkages the message needs to pass through before reaching the root switch. Higher bandwidth linkages have lower costs. You can customize the root cost on each port to override the automatically calculated value in order to choose which path to use as the active path. The blocked paths become standby connections and will be awakened if the original root path is disconnected.

In Figure 3, SW1 is configured to be the root switch. SW3 has two paths to reach the root switch, left and right. The right path is blocked because of its higher root path cost.

Figure 3: A simple solution: Apply STP to elect a root switch and block redundant paths.

Topology Change

When a network port on a switch goes from DOWN to UP, the physical connection may become totally different. Any change to an existing network, such as adding a new switch, could cause looping. On the other hand, if a port goes from UP to DOWN, a link between the switches may be disconnected and cause the switch to lose the original root path. So, switches will keep track of the root path cost of each port. Changes to the physical connection will change the root path cost, and STP needs to change the network topology.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Spanning Tree Protocol
    Ethernet is so popular because it simply works and is inexpensive. However, the administration side looks a bit more complicated: For the network to run smoothly, the admin might need to make important decisions about the Spanning Tree protocol.
  • VTP for VLAN management
    Cisco's VLAN Trunking Protocol for Virtual LAN management in medium to large computer networks can make a network administrator's life easier.
  • Segmenting networks with VLANs
    Network virtualization takes very different approaches at the software and hardware levels to divide or group network resources into logical units independent of the physical layer. It is typically a matter of implementing secure strategies. We show the technical underpinnings of VLANs.
  • Floodlight: Welcome to the World of Software-Defined Networking

    Software-Defined Networking (SDN) marks a paradigm shift toward a more holistic approach for managing networking hardware. The Floodlight OpenFlow controller offers an easy and inexpensive way to experience the power of SDN.

  • OpenFlow and the Floodlight OpenFlow Controller
    Software Defined Networking (SDN) marks a paradigm shift toward a more holistic approach for managing networking hardware. The Floodlight OpenFlow controller offers an easy and inexpensive way to experience the power of SDN.
comments powered by Disqus