Lab 5.5.1: Basic Spanning Tree Protocol Topology Diagram Addressing Table Device (Hostname) Interface IP Address Subnet Mask Default Gateway S1 VLAN 1 172.17.10.1 255.255.255.0 N/A S2 VLAN 1 172.17.10.2 255.255.255.0 N/A S3 VLAN 1 172.17.10.3 255.255.255.0 N/A PC1 NIC 172.17.10.21 255.255.255.0 172.17.10.254 PC2 NIC 172.17.10.22 255.255.255.0 172.17.10.254 PC3 NIC 172.17.10.23 255.255.255.0 172.17.10.254 PC4 NIC 172.17.10.27 255.255.255.0 172.17.10.254 Learning Objectives Upon completion of this lab, you will be able to: · Cable a network according to the topology diagram · Erase the startup configuration and reload the default configuration, setting a switch to the default state · Perform basic configuration tasks on a switch · Observe and explain the default behavior of Spanning Tree Protocol (STP, 802.1D) · Observe the response to a change in the spanning tree topology Task 1: Perform Basic Switch Configurations Step 1: Cable a network that is similar to the one in the topology diagram. You can use any current switch in your lab as long as it has the required interfaces shown in the topology diagram. The output shown in this lab is based on Cisco 2960 switches. Other switch models may produce different output. Set up console connections to all three switches. Step 2: Clear any existing configurations on the switches. Clear NVRAM, delete the vlan.dat file, and reload the switches. Refer to Lab 2.5.1 for the procedure. After the reload is complete, use the show vlan privileged EXEC command to confirm that only default VLANs exist and that all ports are assigned to VLAN 1. S1#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ----------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15,Fa0/16 Fa0/17, Fa0/18, Fa0/19,Fa0/20 Fa0/21, Fa0/22, Fa0/23,Fa0/24 Gig0/1, Gig0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Step 3: Configure basic switch parameters. Configure the S1, S2, and S3 switches according to the following guidelines: · Configure the switch hostname. · Disable DNS lookup. · Configure an EXEC mode password of class. · Configure a password of cisco for console connections. · Configure a password of cisco for vty connections. (Output for S1 shown) Switch>enable Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S1 S1(config)#enable secret class S1(config)#no ip domain-lookup S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#end %SYS-5-CONFIG_I: Configured from console by console S1#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Task 2: Prepare the Network Step 1: Disable all ports by using the shutdown command. Ensure that the initial switch port states are inactive with the shutdown command. Use the interface-range command to simplify this task. S1(config)#interface range fa0/1-24 S1(config-if-range)#shutdown S1(config-if-range)#interface range gi0/1-2 S1(config-if-range)#shutdown S2(config)#interface range fa0/1-24 S2(config-if-range)#shutdown S2(config-if-range)#interface range gi0/1-2 S2(config-if-range)#shutdown S3(config)#interface range fa0/1-24 S3(config-if-range)#shutdown S3(config-if-range)#interface range gi0/1-2 S3(config-if-range)#shutdown Step 2: Re-enable the user ports on S1 and S2 in access mode. Refer to the topology diagram to determine which switch ports on S2 are activated for end-user device access. These three ports will be configured for access mode and enabled with the no shutdown command. S1(config)#interface fa0/3 S1(config-if)#switchport mode access S1(config-if)#no shutdown S2(config)#interface range fa0/6, fa0/11, fa0/18 S2(config-if-range)#switchport mode access S2(config-if-range)#no shutdown Step 3: Enable trunk ports on S1, S2, and S3. Only a single VLAN is being used in this lab, however trunking has been enabled on all links between switches to allow for additional VLANs to be added in the future. S1(config-if-range)#interface range fa0/1, fa0/2 S1(config-if-range)#switchport mode trunk S1(config-if-range)#no shutdown S2(config-if-range)#interface range fa0/1, fa0/2 S2(config-if-range)#switchport mode trunk S2(config-if-range)#no shutdown S3(config-if-range)#interface range fa0/1, fa0/2 S3(config-if-range)#switchport mode trunk S3(config-if-range)#no shutdown Step 4: Configure the management interface address on all three switches. S1(config)#interface vlan1 S1(config-if)#ip address 172.17.10.1 255.255.255.0 S1(config-if)#no shutdown S2(config)#interface vlan1 S2(config-if)#ip address 172.17.10.2 255.255.255.0 S2(config-if)#no shutdown S3(config)#interface vlan1 S3(config-if)#ip address 172.17.10.3 255.255.255.0 S3(config-if)#no shutdown Verify that the switches are correctly configured by pinging between them. From S1, ping the management interface on S2 and S3. From S2, ping the management interface on S3. Were the pings successful? ___________________________________________ If not, troubleshoot the switch configurations and try again. Task 3: Configure Host PCs Configure the Ethernet interfaces of PC1, PC2, PC3, and PC4 with the IP address, subnet mask, and gateway indicated in the addressing table at the beginning of the lab. Task 4: Configure Spanning Tree Step 1: Examine the default configuration of 802.1D STP. On each switch, display the spanning tree table with the show spanning-tree command. Root selection varies depending on the BID of each switch in your lab resulting in varying outputs. S1#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0019.068d.6980 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 0019.068d.6980 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.3 P2p Fa0/2 Desg FWD 19 128.4 P2p Fa0/3 Desg FWD 19 128.5 P2p S2#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0019.068d.6980 Cost 19 Port 1 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 001b.0c68.2080 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Fa0/6 Desg FWD 19 128.6 P2p Fa0/11 Desg FWD 19 128.11 P2p Fa0/18 Desg FWD 19 128.18 P2p S3#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0019.068d.6980 Cost 19 Port 1 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 001b.5303.1700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/2 Altn BLK 19 128.2 P2p Step 2: Examine the output. The bridge identifier (bridge ID), stored in the spanning tree BPDU consists of the bridge priority, the system ID extension, and the MAC address. The combination or addition of the bridge priority and the system ID extension are known as the bridge ID priority. The system ID extension is always the number of the VLAN. For example, the system ID extension for VLAN 100 is 100. Using the default bridge priority value of 32768, the bridge ID priority for VLAN 100 would be 32868 (32768 + 100). The show spanning-tree command displays the value of bridge ID priority. Note: The “priority” value within the parentheses represents the bridge priority value, which is followed by the value of the system ID extension. Answer the following questions based on the output. 1. What is the bridge ID priority for switches S1, S2, and S3 on VLAN 1? a. S1 _______ b. S2 _______ c. S3 _______ 2. Which switch is the root for the VLAN 1 spanning tree? ________________ 3. Which spanning tree ports are in the blocking state on the root switch? _________________ 4. Do either of the non-root switches have a blocking port? _________Which switch and port is in the blocking state? _________ 5. How does STP elect the root switch? _________________________ 6. Since the bridge priorities are all the same, what else does the switch use to determine the root? ________________________ Task 5: Observe the response to the topology change in 802.1D STP Now let's observe what happens when we intentionally simulate a broken link Step 1: Place the switches in spanning tree debug mode using the command debug spanning-tree events. S1#debug spanning-tree events Spanning Tree event debugging is on S2#debug spanning-tree events Spanning Tree event debugging is on S3#debug spanning-tree events Spanning Tree event debugging is on Step 2: Intentionally shutdown a port on the root switch. This example uses S1, since it is the root. Your root switch may vary. S1(config)#interface fa0/1 S1(config-if)#shutdown Step 3: Record the debug output from the non-root switches. In this example we record the output from S2 and S3, since they are the non-root switches. S2# 1w2d: STP: VLAN0001 we are the spanning tree root S2# 1w2d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down 1w2d: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down S2# 1w2d: STP: VLAN0001 heard root 32769-0019.068d.6980 on Fa0/2 1w2d: supersedes 32769-001b.0c68.2080 1w2d: STP: VLAN0001 new root is 32769, 0019.068d.6980 on port Fa0/2, cost 38 1w2d: STP: VLAN0001 sent Topology Change Notice on Fa0/2 S3# 1w2d: STP: VLAN0001 heard root 32769-001b.0c68.2080 on Fa0/2 1w2d: STP: VLAN0001 Fa0/2 -> listening S3# 1w2d: STP: VLAN0001 Topology Change rcvd on Fa0/2 1w2d: STP: VLAN0001 sent Topology Change Notice on Fa0/1 S3# 1w2d: STP: VLAN0001 Fa0/2 -> learning S3# 1w2d: STP: VLAN0001 sent Topology Change Notice on Fa0/1 1w2d: STP: VLAN0001 Fa0/2 -> forwarding Based on the output from this example, when the link from S2 that is connected to the root switch goes down, what is its initial conclusion about the spanning tree root?______________________ Once S2 receives new information on Fa0/2, what new conclusion does it draw?____________________ Port Fa0/2 on S3 was previously in a blocking state before the link between S2 and S1 went down. What states does it go through as a result of the topology change? __________________________________ Step 4: Examine what has changed in the spanning tree topology using the show spanning-tree command. S2#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0019.068d.6980 Cost 38 Port 2 (FastEthernet0/2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 001b.0c68.2080 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/2 Root FWD 19 128.2 P2p Fa0/6 Desg FWD 19 128.6 P2p Fa0/11 Desg FWD 19 128.11 P2p Fa0/18 Desg FWD 19 128.18 P2p S3#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 0019.068d.6980 Cost 19 Port 1 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 001b.5303.1700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 19 128.1 P2p Fa0/2 Desg FWD 19 128.2 P2p Answer the following questions based on the output. 1. What has changed about the way that S2 forwards traffic? __________________________________ 2. What has changed about the way that S3 forwards traffic?__________________________________ Task 6: Using the show run command, record the configuration of each switch. S1#show run ! ! hostname S1 ! ! interface FastEthernet0/1 switchport mode trunk ! interface FastEthernet0/2 switchport mode trunk ! interface FastEthernet0/3 switchport mode access ! ! ! interface Vlan1 ip address 172.17.10.1 255.255.255.0 ! end S2#show run ! ! hostname S2 ! ! interface FastEthernet0/1 switchport mode trunk ! interface FastEthernet0/2 switchport mode trunk ! ! ! interface FastEthernet0/6 switchport mode access ! interface FastEthernet0/11 switchport mode access ! interface FastEthernet0/18 switchport mode access ! ! interface Vlan1 ip address 172.17.10.2 255.255.255.0 ! end S3#show run ! ! hostname S3 ! ! interface FastEthernet0/1 switchport mode trunk ! interface FastEthernet0/2 switchport mode trunk ! ! ! ! interface Vlan1 ip address 172.17.10.3 255.255.255.0 ! end Task 7: Clean Up Erase the configurations and reload the default configurations for the switches. Disconnect and store the cabling. For PC hosts that are normally connected to other networks (such as the school LAN or to the Internet), reconnect the appropriate cabling and restore the TCP/IP settings.