Chapter 12

Describe Rapid PVST+ Spanning Tree Protocol

Spanning Tree Protocol has existed for decades for a very good reason. Without this protocol, frames could potentially loop endlessly around a LAN if the LAN had physical paths that could permit this—and it is very common to create such paths to ensure redundancy in a LAN. For example, you want a server to be able to send traffic using an alternate path if there is an issue with the primary path. While Spanning Tree Protocol has been with us for decades, it has undergone many improvements, including the current versions of the protocol, Rapid PVST+.

This chapter covers the following essential terms and components:

  • Spanning Tree Protocol

  • PVST+

  • RPVST+

  • Spanning Tree Protocol root bridge selection

  • Spanning Tree Protocol optional features

  • PortFast

Topic: Understand Rapid PVST+ Spanning Tree Protocol

CramSaver

If you can correctly answer these CramSaver questions, save time by skimming the ExamAlerts in this section and then completing the CramQuiz at the end of this section and the Review Questions at the end of the chapter. If you are in doubt at all, read everything in this chapter!

1. What two values make up the bridge ID for Spanning Tree Protocol purposes?

_________

2. How does the show spanning-tree command indicate that a Cisco switch is using PVST+?

_________

3. What is the converged state of a nondesignated port?

_________

4. What value does Spanning Tree Protocol use to calculate the root port?

_________

5. What optional Spanning Tree Protocol feature permits ports to quickly transition from blocking to forwarding?

_________

Answers

1. The bridge ID is made up of the priority value and the system ID.

2. It shows ieee.

3. Blocking

4. The root cost value is used to calculate a root port.

5. PortFast

Spanning Tree Protocol is one technology of many that allows you to add redundancy to your switched infrastructure without causing Layer 2 switching loops. There are several different versions of Spanning Tree Protocol in use today. The classic version, termed 802.1D, might be the default on a Cisco Layer 2 switch today. If so, it is implemented on a per-VLAN basis, using a mode Cisco calls Per VLAN Spanning Tree Plus (PVST+).

Note

Because classic Spanning Tree Protocol is an older technology, switches are called bridges in the Spanning Tree Protocol standards. Do not be confused by this terminology. When you are reading about Spanning Tree Protocol and you read bridge, just think of your modern switch.

This classic version of Spanning Tree Protocol operates as follows:

  1. Spanning Tree Protocol elects a root bridge. Ports on this device are called designated ports, and each one is placed in a forwarding state.

  2. Each nonroot switch calculates which one of its ports has the least cost between itself and the root bridge. This cost value is the switch’s root cost. Spanning Tree Protocol makes this port the root port and puts it in the forwarding state.

  3. Obviously, many switches can attach to the same Ethernet segment. When two nonroot switches connect to a shared segment, the switch with the lowest root cost is selected as the segment’s designated bridge. That switch’s forwarding interface on that shared link is the designated port for that segment.

  4. Nonroot and nondesignated ports in the topology are placed in a blocking state.

ExamAlert

To find the lowest bridge ID (BID) for the root switch election, remember that the MAC address is represented in hexadecimal and is the least significant part of the BID. The hex numbering system is as follows: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

Notice that the key first step in this process is the election of the root bridge. To elect the root bridge, switches use Spanning Tree Protocol bridge protocol data units (BPDUs) to carry their bridge ID information. The device with the lowest bridge ID becomes the root bridge. This bridge ID is an 8-byte value that is unique for each switch. This identifier consists (in descending order of significance) of three parts: a 4-bit priority value, a 12-bit VLAN ID, and a 6-byte system ID. The 6-byte system ID is based on the built-in MAC address for the switch.

ExamAlert

Notice that if you do not modify the priority values on your switches, the election of the root bridge is based on the switch with the lowest built-in MAC address in your topology.

Figure 12.1 provides a topology we use to study Spanning Tree Protocol further.

image

Figure 12.1 A Classic Sample Spanning Tree Protocol Topology

Example 12.1 shows a key verification and troubleshooting command for Spanning Tree Protocol: show spanning-tree.

Example 12.1 Verifying Spanning Tree Protocol

DISTSW1#
DISTSW1# show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID  Priority   32769
           Address    fa16.3e2c.8b4f
           Cost       4
           Port       2 (GigabitEthernet0/1)
           Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec

 Bridge ID Priority   32769 (priority 32768 sys-id-ext 1)
           Address    fa16.3e3e.8330
           Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec
           Aging Time  300 sec

Interface       Role Sts   Cost   Prio.Nbr Type
--------------- ---- ---   ------ ------   ----------------
Gi0/1           Root FWD   4      128.2    Shr
Gi0/2           Desg FWD   4      128.3    Shr

DISTSW1#

From this command output, you can determine some important details regarding this spanning tree topology, including the following:

  • The VLAN running Spanning Tree Protocol in the topology is VLAN0001.

  • The Spanning Tree Protocol mode that is running by default on this device is ieee; this means PVST+ (Cisco’s per-VLAN flavor of 802.1D).

  • The root bridge in this topology has the MAC address fa16.3e2c.8b4f and priority value 32769 (which is the default value 32768 plus the VLAN ID 1).

  • The local bridge ID is fa16.3e3e.8330, with a bridge priority of 32769; therefore, this is not the root bridge.

  • Both of the local switch ports are in the forwarding state. One port is the root port, and the other port is a designated port.

Where is the root bridge? It must be the device off the gi0/1 interface (the root port): ACCSW1. You can confirm this with show spanning-tree on that device, as shown in Example 12.2.

Example 12.2 Verifying Spanning Tree Protocol on ACCSW1

ACCSW1#
ACCSW1# show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID  Priority   32769
           Address    fa16.3e2c.8b4f
           This bridge is the root
           Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec

 Bridge ID Priority   32769 (priority 32768 sys-id-ext 1)
           Address    fa16.3e2c.8b4f
           Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec
           Aging Time  300 sec

Interface      Role  Sts  Cost      Prio.Nbr  Type
-------------- ----  ---  --------- --------  -----------------
Gi0/1          Desg  FWD  4         128.2     Shr
Gi0/2          Desg  FWD  4         128.3     Shr

ACCSW1#

From this output, you can determine the following:

  • Because this is the root bridge, you can see that the root ID information matches the bridge ID information; also, there is additional output that clearly states This bridge is the root.

  • As described earlier, all the ports on this device are forwarding and are designated ports.

So where is the blocking taking place in this topology? It must be on the device DISTSW2, as the output in Example 12.3 confirms.

Example 12.3 Verifying Spanning Tree Protocol on DISTSW2

DISTSW2#
DISTSW2# show spanning-tree

VLAN0001
 Spanning tree enabled protocol ieee
 Root ID  Priority   32769
          Address    fa16.3e2c.8b4f
          Cost       4
          Port       2 (GigabitEthernet0/1)
          Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec

 Bridge ID Priority   32769 (priority 32768 sys-id-ext 1)
           Address    fa16.3edb.e1e9
           Hello Time  2 sec Max Age 20 sec Forward Delay 15 sec
           Aging Time 300 sec

Interface       Role Sts  Cost      Prio.Nbr Type
--------------- ---- ---  --------- -------- ---------------
Gi0/1           Root FWD  4         128.2    Shr
Gi0/2           Altn BLK  4         128.3    Shr

DISTSW2#

Notice the following on DISTSW2:

  • The root port (gi0/1) is in a forwarding state and connects directly to the root bridge of ACCSW1.

  • The nondesignated port is gi0/2 and is in the blocking state; this port connects to the nonroot bridge of DISTSW1.

How can you reconfigure this topology so that the root bridge is DISTSW1? The answer is simple: Lower the priority value on that device. This causes a recomputation of the Spanning Tree Protocol topology. Example 12.4 demonstrates this configuration.

Example 12.4 Configuring the Spanning Tree Protocol Priority Value

DISTSW1#
DISTSW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
DISTSW1(config)# spanning-tree vlan 1 priority 4096
DISTSW1(config)# end
DISTSW1#

If this reconfiguration worked, verification should be simple on DISTSW1, thanks to show spanning-tree, as demonstrated in Example 12.5.

Example 12.5 Verifying That DISTSW1 Is the New Root Bridge

DISTSW1#
DISTSW1# show spanning-tree

VLAN0001
 Spanning tree enabled protocol ieee
 Root ID   Priority    4097
           Address     fa16.3e3e.8330
           This bridge is the root
           Hello Time   2 sec Max Age 20 sec Forward Delay 15 sec

 Bridge ID Priority    4097 (priority 4096 sys-id-ext 1)
           Address fa16.3e3e.8330
           Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
           Aging Time 300 sec

Interface       Role Sts  Cost      Prio.Nbr Type
--------------- ---- ---  --------- -------- ----------------
Gi0/1           Desg FWD  4         128.2    Shr
Gi0/2           Desg FWD  4         128.3    Shr

DISTSW1#

Although PVST+ does a decent job, it can be fairly slow to converge. Rapid Spanning Tree Protocol (RSTP) was invented to improve convergence time. Cisco implements RSTP with a VLAN-by-VLAN version named Rapid Per VLAN Spanning Tree Plus (RPVST+). It is simple to make this change on a device, as shown in Example 12.6.

Example 12.6 Configuring a Switch for RPVST+

DISTSW1#
DISTSW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
DISTSW1(config)# spanning-tree mode rapid-pvst
DISTSW1(config)# end
DISTSW1#

To verify this change, once again you can rely on show spanning-tree, as Example 12.7 demonstrates.

Example 12.7 Verifying RPVST+

DISTSW1#
DISTSW1# show spanning-tree

VLAN0001
 Spanning tree enabled protocol rstp
 Root ID  Priority   4097
          Address    fa16.3e3e.8330
          This bridge is the root
          Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

 Bridge ID Priority   4097 (priority 4096 sys-id-ext 1)
           Address    fa16.3e3e.8330
           Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
           Aging Time  300 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- -----------------
Gi0/1            Desg FWD 4         128.2    Shr Peer(STP)
Gi0/2            Desg FWD 4         128.3    Shr Peer(STP)

DISTSW1#

In production, be sure that you make this change to your other switches as well so that you can take advantage of the faster convergence with Rapid PVST+.

You should also understand the enhancements made available with Rapid PVST+. Here is a summary of those enhancements:

  • Convergence is much faster with Rapid PVST+, thanks to a proposal and agreement handshake process between point-to-point connected switches.

  • Rapid PVST+ does not rely on timers to control convergence; many changes now trigger immediate convergence events.

  • Rapid PVST+ has two new port roles: alternate port and backup port. The alternate port is a port that converges quickly in the event of the loss of a root port. The backup port is a fast-converging port to replace a designated port.

  • Port states have been simplified. Specifically, the listening state has been removed completely. Ports can exist in one of the following four states: blocking, learning, forwarding, and disabled.

Spanning Tree Protocol has many powerful optional features you should consider. For the purposes of the CCNA 200-301 exam, you are responsible for understanding PortFast.

PortFast reduces the time it takes a port to move from blocking to forwarding in a Spanning Tree Protocol topology. This feature is used on ports connected to servers and workstations. PortFast should not be used on ports that connect to switches because it can cause switching loops. Example 12.8 demonstrates how easy it is to configure this powerful optional feature.

Example 12.8 Configuring PortFast

ACCSW1#
ACCSW1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ACCSW1(config)# interface gi0/3
ACCSW1(config-if)# spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc... to this interface when portfast is enabled, can cause temporary bridging loops. Use with CAUTION

%Portfast has been configured on GigabitEthernet0/3 but will only
 have effect when the interface is in a non-trunking mode.
ACCSW1(config-if)# end
ACCSW1#

CramQuiz

1. What is the first step of the Spanning Tree Protocol convergence process?

Image A. Block nondesignated ports.

Image B. Calculate designated ports.

Image C. Elect a root bridge.

Image D. Calculate root ports.

2. What is the default Spanning Tree Protocol priority value?

Image A. 0

Image B. 32768

Image C. 8192

Image D. 4098

3. What command allows you to see the current Spanning Tree Protocol parameters on a Cisco switch?

Image A. show 802dot1d

Image B. show topology spanning-tree

Image C. show redundancy

Image D. show spanning-tree

4. What command sets the priority to 4096 for VLAN 10?

Image A. spanning-tree vlan 10 priority 4096

Image B. spanning-tree priority 4096 vlan 10

Image C. spanning-tree 4096 10

Image D. spanning-tree priority 4096 vlan-id 10

CramQuiz Answers

1. C is correct. The first step of the Spanning Tree Protocol convergence process is to elect a root bridge.

2. B is correct. The default Spanning Tree Protocol priority on Cisco switches is 32768.

3. D is correct. The show spanning-tree command is extremely valuable for checking the Spanning Tree Protocol parameters and status.

4. A is correct. The spanning-tree vlan 10 priority 4096 command sets the priority value for the switch in VLAN 10.

Review Questions

1. What version of STP on a Cisco device implements classic IEEE 802.1D?

Image A. MST

Image B. PVST+

Image C. TRILL

Image D. RPVST+

2. What Spanning Tree Protocol feature is recommended for ports that connect to workstations or servers?

Image A. PortFast

Image B. UplinkFast

Image C. BPDU Guard

Image D. BackboneFast

3. What command allows a port to more quickly transition from blocking to forwarding?

Image A. spanning-tree portfast

Image B. spanning-tree convergefast

Image C. spanning-tree rstp

Image D. spanning-tree port-fast enable

4. What two new port roles were introduced with Rapid PVST+? (Choose two.)

Image A. Alternate

Image B. Designated

Image C. Root

Image D. Backup

Answers to Review Questions

1. B is correct. PVST+ uses classic Spanning Tree Protocol on a Cisco device.

2. A is correct. The optional PortFast feature for ports that connect to workstations or servers improves convergence time.

3. A is correct. The spanning-tree portfast command is applied in interface configuration mode and enables PortFast.

4. A and D are correct. The alternate and backup ports are new roles that exist to speed up convergence after topology changes (including failures).

Hands-On Lab Practice Assignment

Configuring Spanning Tree Protocol

To complete this Hands-On Lab Practice Assignment, download the assigned Packet Tracer file from the book’s companion website and perform the lab on your locally installed version of Packet Tracer. For instructions on how to download and use the Packet Tracer files, see “Packet Tracer Hands-On Lab Practice Assignments” in the Introduction of this book.

Additional Resources

Migrating from STP to RSTP

https://www.ajsnetworking.com/cisco-migrating-from-stp-to-rstp/

Spanning Tree Protocol

https://youtu.be/0tlrQC2uJN4

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.42.168