Lab 2.1
Lab 2.1
Addressing Table
Objectives
Part 1: Determine the Root Bridge and Port Roles
Part 2: Observe STP Port Selection Based on Path Cost
Part 3: Observe STP Port Selection Based on Port Priority
Part 4: Implement Load Balancing using PVST+ Configuration
Background / Scenario
Redundancy increases the availability of devices in the network topology by protecting the network from a
single point of failure. Redundancy in a switched network is accomplished through the use of multiple
switches or multiple links between switches. When physical redundancy is introduced into a network design,
loops and duplicate frames can occur.
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
The Spanning Tree Protocol (STP) was developed as a Layer 2 loop-avoidance mechanism for redundant
links in a switched network. STP ensures that there is only one logical path between all destinations on the
network by intentionally blocking redundant paths that could cause a loop.
The Per-VLAN Spanning Tree (PVST) protocol is a Cisco proprietary enhancement of STP that maintains a
separate spanning tree instance per VLAN in the network. This allows each spanning tree to be
independently fine-tuned to implement load balancing in the network.
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.64C4.1250
Cost 38
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
b. Use the show spanning-tree command on the rest of switches to gather information about the spanning
tree status of each switch. Complete the table.
Open configuration window
Based on the output from your switches, answer the following questions.
Why did spanning tree select this switch as the root bridge?
Notice that Packet Tracer uses a different color for the link light on one of the connections between the
switches. What do you think does this link light mean?
It indicates that the link is blocked.
Why did the spanning tree algorithm select this port as the non-designated (blocked) port?
Given the resulting spanning tree, what path do data frames take to go from PC1 to PC2?
It would take the path from PC1 to S1, to S4, then to S3, and finally to PC2
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
Issue the show spanning-tree command on S1. The Root ID section indicates the total cost of the least cost
path calculated by the switch to reach the root bridge.
S1# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.64C4.1250
Cost 38
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Notice that the cost is currently 38. This is because to reach the root bridge (S3) through S2, S1 crosses two
Fast Ethernet links with a cost of 19 each.
What would have been the path cost of S1 to S3 if going through S4? 38
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
Address 0001.64C4.1250
Cost 23
Port 3(FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Why did spanning tree change the previously blocked port to a root port, and block the port that was a root
port on the other S2?
How did the swapping of connection types between S4 and S3 affect the cost of the path? Hint: Observe the
cost of the G0/1 port using show spanning-tree command on S4.
The cost was reduced from the default cost of Fast Ethernet (19) to the lower cost of Gigabit Ethernet (4).
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.64C4.1250
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
Cost 23
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
What port did STP select as the root port on S1? fa0/2
Why did STP select this port as the root port on S1?
c. Adjust the port priority of the upstream switch S4 to influence the selection of the root port on S1 by
issuing the interface spanning-tree vlan port-priority command. Port priorities are set at 128 by default
and may be adjusted in increments of 16.
S4(config)# interface f0/3
S4(config-if)# spanning-tree vlan 1 port-priority 112
d. Wait for the spanning tree to adjust to the new topology (or you may click on the fast-forward button of
Packet Tracer) then issue the show spanning-tree command on S4. Confirm that the port priority has
now changed for F0/3.
S4# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.64C4.1250
Cost 4
Port 25(GigabitEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
e. Issue the show spanning-tree command on S1. Observe that the root port has again moved back to
F0/3 from F0/2.
S1# show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.64C4.1250
Cost 23
Port 3(FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
If any of these do not work, recheck your configurations and troubleshoot VLAN and trunk configurations
as necessary.
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 8 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority 32770
Address 0001.64C4.1250
Cost 38
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Currently, all switches are set equally at the default bridge priority value.
What is the bridge priority value of the switches for VLAN 1? 32769
What is the bridge priority value of the switches for VLAN 2? 32770
Why do the bridge priorities appear to be different values between VLAN 1 and VLAN2?
Because PVST+ uses the lower 12 bits of the bridge priority field to include the VLAN ID.
b. Influence the flow of traffic for each VLAN by manipulating the root bridge of their respective spanning
trees through bridge priority adjustment. Set S2 as the primary and S4 as the secondary root bridges of
VLAN 1; and S2 as secondary and S4 as primary root bridges of VLAN 2.
S2(config)# spanning-tree vlan 1 root primary
S2(config)# spanning-tree vlan 2 root secondary
VLAN 1 VLAN 2
Switch Bridge Priority Port Port Role Bridge Priority Port Port Role
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 9 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
VLAN 1 VLAN 2
Switch Bridge Priority Port Port Role Bridge Priority Port Port Role
The link lights may have changed to indicate new root and designated ports for each VLAN, affecting
the active links.
Why do you think have the recent configurations resulted in these link light changes?
2) Edit the packet filter so that only ping packets will be observed. First click on the ‘Show All/None’
button then click on the ‘Edit Filters’ button
3) From the resulting pop-up window, enable ICMP then close the pop-up.
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 10 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
b. Simulate a ping from PC1 to PC2 by clicking on the simple PDU button of Packet Tracer.
Once your cursor changes to a PDU symbol, first click on PC1 (to specify the PDU source), then click on
PC2 (to specify the destination)
c. Click on the play button to begin the simulation then observe the path taken by the packet. You may
adjust the animation speed by moving the speed slider to the right or left.
What path does the ping packet take to travel from PC1 to PC2?
d. Clear the simulation by clicking on the Delete button in the Scenario pane.
e. Perform a simulated ping between PC3 to PC4 this time using the same procedure and observe the path
taken.
What path does the ping packet take to travel from PC3 to PC4?
Reflection
1. What is the value of having redundant paths in a switched network?
Redundant paths in a switched network enhance reliability and availability. They provide alternative
routes in case of link failures, minimizing downtime and ensuring continuous connectivity.
2. Based on your tests and observations, in what order does a switch prioritize the following factors when
selecting which among its ports to assign as the root port? (1= first, 4= last)
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 11 of 12
Lab – Configuring and Verifying Standard IPv4 ACLs
3. How does the use of PVST+ contribute to more efficient utilization of switch links in a network?
PVST+ contributes to more efficient link utilization by creating separate spanning tree instances per
VLAN. This allows switches to independently optimize paths for each VLAN, reducing congestion and
ensuring better load balancing.
© 2024 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 12 of 12