website pop up marketing Rapid spanning tree protocol
Cisco CCNA | CCNP Certification Training Site. Cisco tips and tools for exam success. logo video
home | Module 3 New | Rapid spanning tree protocol

Rapid spanning tree protocol

Printer-Friendly Format

Rapid spanning tree protocol

The features discussed in the previous section—PortFast, UplinkFast, and BackboneFast were added by Cisco, and because of this they worked only on Cisco switches. IEEE added these features in a new STP protocol called Rapid Spanning Tree Protocol (RSTP) under the 802.1w standard.

Note: People using a home lab and want to configure RSTP will need a 2950T Catalyst switch as a minimum hardware requirement.

Similar to “traditional” spanning tree, RSTP will also elect a root bridge using the same parameters as STP. All RSTP ports will be in a forwarding state (designated ports), other ports could be an alternate port, root port, backup port, or disabled.

RSTP port roles

Table 3–3: RSTP port roles

Root port This elected port is forwarding data in the active topology.
Designated port An elected port that is forwarding data for every switched LAN segment.
Alternate port An alternative path to the root bridge but different from the root port path.
Backup port This port provides a redundant path (but less desirable) to a segment to which another switch port already connects. (They can only exist when there are two ports connected between the switches.)
Disabled This type of port does not participate in the active topology.

RSTP port states

Table 3–4: RSTP port states:

Operational status STP port state RSTP port state Port in active topology
Enabled Blocking Discarding No
Enabled Listening Discarding No
Enabled Learning Learning Yes
Enabled Forwarding Forwarding Yes
Disabled Disabled Discarding No

Figure 3–7: Using a root bridge

Per-VLAN STP and per-VLAN rapid STP

This will be a good time to introduce you to another very significant change which Cisco made to STP.

Note: This section discusses VLANs. For now, remember that VLANs provide different broadcast domains at layer 2 and hence keep traffic from one subnet different from another. We will cover VLANs in more detail shortly.

When the original bridging standard (802.1d) was drafted, VLANs did not exist. Hence, one Spanning Tree instance worked across the entire switch. Eventually VLANs were introduced, and they created different networks on the same switch. This gave rise to need to have differ-ent topology for load balancing and flexible Spanning Trees. The need for per-VLAN STP can be further understood from the following network:

Figure 3–8: Multiple exits—multiple VLANs

Let’s assume that all the switches have two VLANs configured. SwitchD has two ways to reach SwitchA. If one STP instance was running across the network, then fa0/17would be in the blocked state. With two STP instances running, we can have fa0/20 blocked for one vlan and fa0/17 blocked for another and utilize both links by loadbalancing traffic across them.

To achieve this, Cisco added the per-VLAN Spanning Tree Plus (PVST+) feature on its switches. When 802.1w (RSTP) was introduced by IEEE, it still did not accommodate multiple Spanning Tree instances on a switch. Cisco introduced the per-VLAN Rapid Spanning Tree (PVRST) to support rapid Spanning Tree instances on each VLAN on the switch. PVST+ and PVRST both provide the same functionality across both 802.1d and 802.1w standards.

PVST+ and PVRST both change the Bridge ID in the BPDU by adding the VLAN number to the configured priority.

Configuring PVRSTP+

To enable RSTP for each VLAN in our switched network, we use the following command:

Switch(config)#spanning-tree mode rapid-pvst

This is all that is needed if we need only instance of the spanning tree protocol. Later on in this section, we will show what is needed to enable the load-sharing capabilities.

Using the “show spanning-tree vlan <vlan#>” command, we can verify which type of spanning tree is running.

Switch#show spanning-tree vlan 10

Spanning tree enabled protocol rstp
Root ID Priority 24586
Address 0015.63f6.b700
Cost 3019
Port 107 (FastEthernet3/0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 49162 (priority 49152 sys-id-ext 10)
Address 000f.f794.3d00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
UplinkFast enabled but inactive in rapid-pvst mode
--output truncated

Two items are of interest in this output. First is the Spanning Tree Protocol—RSTP and the second is the “sys-id-ext 10”. This shows that the bridge priority was configured as 41942 and VLAN id 10 was added to it.

How can load balancing be achieved in the network shown in Figure 3–8 if VLAN 1 and VLAN 5 are being used on the LAN? We can achieve it by configuring Switch A with a better priority for VLAN 1 and configuring SwitchB with a better priority for VLAN 5. This can be done using the following commands:

SwitchA(config)#spanning-tree vlan 1 priority 4096
SwitchB(config)#spanning-tree vlan 5 priority 4096

Let’s see the “show spanning-tree” output for both VLANs on SwitchD to verify load balancing.
SwitchD#show spanning-tree
Spanning tree enabled protocol ieee
Root IDPriority4097
--output truncated--

Spanning tree enabled protocol ieee
Root IDPriority4101
--output truncated--

We can see that the root bridge for VLAN1 is SwitchA, whereas the root bridge for VLAN 5 is SwitchB. Fa0/20is the root port for VLAN 1, and Fa0/17is the root port for VLAN 5.

Troubleshooting STP

This section touches upon common STP problems and ways to troubleshoot them. The steps given here apply to both 802.1d and 802.1w running different STP process on each VLAN.

STP is a very maintenance-free protocol and generally does not require troubleshooting. STP will mostly have the following problems:

  • Incorrect root bridge
  • Incorrect root port
  • Incorrect designated port

Let’s look at each of the problems and ways to troubleshoot them.

Incorrect root bridge

The root bridge is selected based upon the BridgeID which consists of priority and the base MAC address of the switch. The “show spanning-tree vlan <vlan#>” command will show the current root bridge. Note the MAC address and the priority of the root bridge and compare it with those of the switch which you want to make the root bridge. Decreasing the priority of the correct switch should resolve the problem. This can be done using the “spanning-tree vlan <vlan#> priority <priority>” command.

Incorrect root port

Root port is the fastest path from a switch to the root bridge. The cost is the cumulative cost of all the links in the path. So if there are two 100Mbps links between a switch and a root bridge then the cost is 38. “show spanning-tree vlan (vlan #)” will show the current root port and its cost. Compare that with the cost of the desired path. The cost of the desired path can be changed using the “spanning-tree cost <cost>” interface command.

Incorrect designated port

Designated port is the lowest cost port connecting a network segment to the rest of the network. The designated port cost can be seen and changed using the “show spanning-tree vlan <vlan#>” command and the “spanning-tree cost <cost>” command.

Printer-Friendly Format

This site and/or material is not sponsored by, endorsed by, or affiliated with Cisco Systems, Inc. and/or its affiliates. Cisco®, Cisco Systems®, CCDA™, CCNA™, CCDP™, CCNP™, CCIE™, or CCSI™ are trademarks or registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.

Home | Search | Contact Us | Tell a Friend | Text Size

2006-2013 All Rights Reserved. Reproduction without permission prohibited.
Reality Press, Midsummer Court, 314 Midsummer Blvd.,Milton Keynes, MK92UB, UK

This site is powered by MemberGate Membership Site Software