STP Part II

Overview

In part 1 of this topic on STP, we looked at the STP concepts and discussed how STP helps in redundancy and loop prevention in LAN networks, in this second part, we will configure STP and as well as troubleshoot STP.

Configuration of STP

By default STP is on by default on CISCO switches, however, we will configure some of the other options in STP. The topology we will use in this configuration is shown below.

Configure and Verify the BID options

As we mentioned earlier, the BID is made up of the MAC address and the priority. Since we cannot change the MAC address on the switch, we need to change the priority, however, this is changed per VLAN using one of two ways.

  1. Use the root primary and secondary – this can be used to specify which switch will be the root bridge and the secondary. The command is used in the global configuration mode. In this case, we use the command:

  2. The second command that can be used is the priority command. The spanning tree command is a component of the BID and it is a value from 0 – 61440, the priority is any number in this range in multiples of 4096, this means that you cannot use a value like 200. This command is also configured per VLAN. The command is shown below.


NOTE: by default the spanning tree priority is 32778

In our case we will use the priority command on all the switches and the commands used are shown below.

These commands will change the priorities of all normal VLANs on the four switches to the configured value.

Configuring CISCO portfast technology

The CISCO portfast technology was discussed in part 1 of this chapter, to configure portfast on access ports, enter the following command in the access ports on a switch:

When this command is executed, the access ports will transition immediately from blocking to forwarding state and no BPDUs will be sent to these interfaces.

STP verification and troubleshooting

We need to verify the operation of STP on the switches. For this we will use the commands shown below.

Show spanning-tree active

The output of this command will show the active STP instances on a switch as shown below.

Some of the statistics include the type of STP, in this case it is 802.1D which is the open STP standard, the VLANs which have STP, the port roles and the priority, and you can also verify the bridge ID.

NOTE: the root bridge will have the same root id and bridge id values. This is the command used to verify which switch is the root bridge.

Show spanning-tree summary

Will tell you most of the spanning tree statistics that you need to know to determine the root bridge and the other switch roles. This is shown below.

The other verification commands can be used to operate the operation of STP.

  1. The show spanning-tree vlan <VLAN_ID> will show the variant of STP running on a various VLAN, it will tell you whether a switch is the root bridge for the specific VLAN and the operational status of the ports on the switch for the that VLAN.
  2. The show spanning-tree interface <INTERFACE NAME AND INTERFACE ID> will show similar output to the show spanning-tree VLAN and show spanning-tree active however, it will focus on the specific interface that is prompted.

NOTE: other verification and troubleshooting commands will be discussed in more detail in advanced courses such as CCNP, however, you are supposed to understand the commands discussed above well.

Other STP concepts

So far we have learnt about the 802.1d implementation of STP. In this section we will learn about other variants of STP such as RSTP, PVST+ and others, some of these are CISCO proprietary while others are open standards defined by IEEE. The table below shows the various STP implementation variants.

In this course, we will mostly focus on the PVST variations and RSTP. These concepts will be discussed in detail in the last part of this chapter on STP.

Review

In this chapter, we have looked at the configuration and verification of STP, we configured and verified the BID options, and we also configured CISCO portfast. Finally we looked at some of the verification and troubleshooting commands. In part 3 of this chapter, we will look at PVSTP and RSTP variations to STP.