Lab 5
Lab 5
Spanning Tree I
Objective
Learn to configure and observe Spanning Tree Protocol (STP). Configure the appropriate settings on
Router1, Switch1, Switch2, Switch3, PC1, and PC2.
Lab Topology
The topology diagram below represents the NetMap in the Simulator.
Command Summary
Command Description
configure terminal enters global configuration mode from privileged EXEC mode
enable enters privileged EXEC mode
encapsulation dot1q vlan-id sets the encapsulation method of the interface for 802.1Q
virtual LAN (VLAN) trunking; also specifies the VLAN ID for
which the frames should be tagged
end ends and exits configuration mode
hostname host-name sets the device name
The IP addresses and subnet masks used in this lab are shown in the tables below:
IP Addresses
Device Interface IP Address Subnet Mask
Router1 FastEthernet 0/0 192.168.100.1 255.255.255.0
Lab Tasks
Task 1: Configure VLANs
This task involves configuring switches so that PC1 and PC2 are in VLAN 3.
1. Verify that the current IP configurations on PC1 and PC2 match the IP configurations listed in the IP
Addresses table.
2. Verify the connectivity by pinging from PC1 to PC2 (192.168.100.102). The ping should succeed.
5. Configure Switch2 with the appropriate host name, create VLAN 3, and add FastEthernet port 0/4 to
VLAN 3.
7. Configure Switch3 with the appropriate host name, create VLAN 3, and add FastEthernet port 0/4 to
VLAN 3.
9. Verify the configuration by pinging from PC1 to PC2 (192.168.100.102). The ping should succeed.
2. On Router1, configure the FastEthernet 0/0 interface with the appropriate IP address and subnet
mask; refer to the IP Addresses table. Configure the interface with 802.1Q encapsulation for VLAN
3. Enable the interface.
3. Verify the configuration by pinging from Router1 to PC1 (192.168.100.101) and PC2
(192.168.100.102). Both pings should succeed.
2. Issue the show spanning-tree vlan 3 command on Switch1, Switch2, and Switch3. Use the output
to answer the following questions:
3. What is the MAC address of the root bridge for VLAN 3? _____________________________
Once you have completed this lab, be sure to check your work by using the grading function.
You can do so by clicking the Grade Lab icon ( ) in the toolbar or by pressing Ctrl+G.
<output omitted>
DNS Servers . . . . . . . . . . . :
C:>ping 192.168.100.102
3. On Switch1, issue the following command to configure the appropriate host name:
Switch(config)#hostname Switch1
4. On Switch1, issue the following commands to configure FastEthernet ports 0/1, 0/2, and 0/3 as trunk
ports and to create VLAN 3:
Switch(config)#hostname Switch2
Switch2(config)#vlan 3
Switch2(config-vlan)#exit
Switch2(config)#interface fastethernet 0/4
Switch2(config-if)#switchport mode access
Switch2(config-if)#switchport access vlan 3
6. On Switch2, issue the following commands to configure FastEthernet ports 0/1 and 0/2 as trunk
ports:
7. On Switch3, issue the following commands to configure the appropriate host name, to create VLAN
3, and to add FastEthernet port 0/4 to VLAN 3:
Switch(config)#hostname Switch3
Switch3(config)#vlan 3
Switch3(config-vlan)#exit
Switch3(config)#interface fastethernet 0/4
Switch3(config-if)#switchport mode access
Switch3(config-if)#switchport access vlan 3
8. On Switch3, issue the following commands to configure FastEthernet ports 0/1 and 0/3 as trunk
ports:
C:>ping 192.168.100.102
Router(config)#hostname Router1
3. After the network converges, pings from Router1 to PC1 (192.168.100.101) and PC2
(192.168.100.102) should succeed.
Router1#ping 192.168.100.101
Router1#ping 192.168.100.102
You can manually configure the bridge priority on switches by issuing the spanning-tree vlan-id
priority value command, where value is a number from 0 through 65535; the default priority is
32768. By issuing the spanning-tree vlan 3 priority 0 command, you can ensure that the switch
you select is the root bridge even if another device is added to the network with a default bridge
priority value and a lower MAC address. In most cases, the device with the lowest priority value
setting will be the root bridge. The only variation occurs when two devices have the same priority
value setting; in this case, the device with the lowest MAC address will be the root bridge. The
combination of the priority value setting and the MAC address is used to determine which device has
the highest bridge priority.
2. The solutions for the following steps are based on the following output:
Bridge ID Priority 0
Address 000C.1380.3538
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15
When a switch is powered on, it sends out bridge protocol data units (BPDUs) that contain the
switch’s bridge ID. As soon as a switch receives a BPDU with a lower bridge ID than the bridge
ID of the current root bridge, the switch will consider that BPDU to be superior, replace the root
bridge ID with the bridge ID from the BPDU, and recalculate the root port and port costs. This
can have an undesired effect on how packets are sent through a switched network. Therefore,
to ensure that a particular switch remains the root bridge, you must ensure that any other
switch you connect to the network has a higher priority value than the one you select.
b. The sample output from all the switches shows that the switches are running Per VLAN
Spanning-Tree (PVST) protocol. STP is used to determine the path that frames will take when
multiple paths are available. You can determine the protocol from the following line of the
sample output:
c. Switch3 is the root bridge. One way to determine which device is the root bridge is to look for
a line of output that contains the following text: This bridge is the root. In this scenario,
the output from Switch3 contains this line of text; therefore, Switch3 is the root bridge.
Another way to determine which device is the root bridge is to compare the root ID address
and the bridge ID address. The root ID address, which is the MAC address of the root bridge, is
the same for all three switches; in this scenario, the root ID address is 000C.1380.3538. The
bridge ID address is the MAC address of the local device. The output from Switch3 shows that
the MAC address of the root ID and bridge ID are the same; therefore, Switch3 is the root
bridge.
d. In the sample output, the root bridge has a priority of 0, as indicated in the following line from
the sample output:
Root ID Priority 0
e. FastEthernet 0/2 on Switch2 is in the blocking state, as indicated by the following line from the
sample output:
Copyright © 1996–2017 Boson Software, LLC. All rights reserved. NetSim software and documentation are protected by copyright law.