In the network shown in Figure 6-16, 802.1d STP is being used on VLAN 5. The administrator wants to ensure that SwitchA is always the root bridge. They also want to ensure that interface fa0/16 is always the root port on SwitchB and SwitchC. In addition to that, interface fa0/1 on all switches should transition to forwarding as soon as a host connects to it.

Figure 6-16   Lab 6-2 

16

Solution

To ensure that SwitchA is always the root bridge, change the priority on it as shown below:

SwitchA(config)#spanning-tree vlan 5 priority 8192 

To ensure that fa0/16 is always the root port on SwitchB and SwitchC, change the port costs as shown below:

SwitchB(config)#int fa0/16
SwitchB(config-if)#spanning-tree cost 1

SwitchC(config)#int fa0/16
SwitchC(config-if)#spanning-tree cost 1

Finally, to ensure that fa0/1 transitions to forwarding as soon as host connects, enable portfast on these ports as shown below:

SwitchA(config)#int fastEthernet0/1
SwitchA(config-if)#spanning-tree portfast

SwitchB(config)#int fastEthernet0/1
SwitchB(config-if)#spanning-tree portfast

SwitchC(config)#int fastEthernet0/1
SwitchC(config-if)#spanning-tree portfast

To verify that SwitchA is the root bridge, use the show spanning-tree vlan 5 command on SwitchA as shown below:

SwitchA#show spanning-tree vlan 5

VLAN0005
Spanning tree enabled protocol ieee
Root ID    Priority    32773
Address     0013.c3e8.2500
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
–output truncated—

To verify that fa0/16 is the root port, use the show spanning-tree vlan 5 command on SwitchB and SwitchC as shown below:

SwitchB#show spanning-tree vlan 5

–output truncated–

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– ——————————–
fa0/15              Altn BLK 200         128.17   P2p
fa0/16              Root FWD 119      128.20   P2p

SwitchC#show spanning-tree vlan 5

–output truncated–

Interface           Role Sts Cost      Prio.Nbr Type
——————- —- — ——— ——– ——————————–
fa0/15              Altn BLK 200         128.17   P2p
fa0/16              Root FWD 119      128.20   P2p

Summary

In this chapter you learned about the second most important layer covered in CCNA. This means that most of the topics covered in this chapter are very important from the exam perspective. From this chapter ensure that you remember:

  • Three functions of a switch.
  • Problems created by loops
  • Root bridge election and how to influence them using bridge priority
  • Root port election and how to influence them using port cost.
  • Various versions of STP and Cisco proprietary changes to them.
  • Switching methods.

STP is most of the most complex and important topics covered in CCNA. The next chapter covers another such topic so I strongly suggest you go through this chapter again before moving to the next one.