« Previous 1 2 3 Next »
Understanding the Spanning Tree protocol family
Switch Keeper
Per-VLAN Spanning Tree
In Figure 3, blocking the linkage between SW2 and SW3 solves the looping issue, but it also wastes bandwidth. The standby link is only used when the active link fails. Is there any method that will allow a more efficient use of bandwidth? The answer is Per-VLAN Spanning Tree (PVST) [1].
A virtual LAN (VLAN) configuration is common on many modern networks. Cisco's proprietary protocol, PVST, runs separate STP processes for each VLAN so that every VLAN has a different network topology. PVST is the default spanning tree mode for Cisco switches. You can choose which switch to use as the root switch and tune the root cost on each port. Thanks to PVST, you can choose a different root switch, as well as assign a different root cost, for each VLAN in order to create different network topologies for the VLANs.
Listing 1 shows the basic Cisco PVST configuration for the topology shown in Figure 4.
Listing 1
A Basic PVST Configuration
SW1(config)#spanning-tree vlan 10 root primary SW2(config)#spanning-tree vlan 20 root primary SW3(config)#interface fastEthernet 0/1 SW3(config-if)#spanning-tree vlan 20 cost 999 SW3(config-if)#interface fastEthernet 0/2 SW3(config-if)#spanning-tree vlan 10 cost 999
Because the traffic volumes are not always equal for the different VLANs, network traffic is not always equally load balanced through the two linkages, although at least both links are used instead of just one.
Convergence Time
The time period from when the topology changes until the network becomes stable again is called the convergence time. The convergence time can be from 30 to 50 seconds for STP and PVST, which means that if the network experiences changes in topology, STP needs up to 50 seconds to renew the network topology. Some of the network users might have a service interruption for up to 50 seconds, which is terribly long and not acceptable for a modern network. Cisco enhances PVST by adding features such as Backbone fast, UplinkFast, and PortFast [2] to shorten or eliminate the convergence time. However, these enhancements only help for the case of existing linkages going DOWN. Time for convergence is still necessary when adding new switches to the network.
Rapid Spanning Tree Protocol
To shorten the convergence time, Cisco released a proprietary protocol called Rapid Spanning Tree Protocol (RSTP, or Rapid-PVST in a Cisco configuration) [3]. RSTP inherits PVST's Backbone fast, UplinkFast, and PortFast features, and it also adds a synchronization process to speed up the convergence. Earlier protocols such as STP and PVST send Hello packets every two seconds to the neighbors to keep alive and exchange the network topology information.
When a topology change occurs, switches notify others and spread the information one by one when sending the next Hello message. In other words, switches wait to be notified passively after a change.
For RSTP, the function of Hello messages changes from notification to negotiation. When the topology changes, switches where the change occurs use Hello messages to communicate actively and immediately. The switches negotiate and decide the linkage state (Should it be forwarded or blocked?) in a very short time. After that, the second switch negotiates with the third switch, and so on. All switches in the network receive the topology change request and complete the convergence in a few hundred milliseconds (according Cisco).
Only a simple command is needed to migrate a Cisco device from PVST to RSTP:
SW1(config)#spanning-tree mode rapid-pvst
RSTP is backward compatible with PVST, which means you can migrate the switches on your network to RSTP one by one.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.