NetLab-2-Implement MST
NetLab-2-Implement MST
Topology
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Implement and Observe MST
Part 3: Configure, Tune and Verify Basic MST Operation
Background / Scenario
Cisco was involved in the early development of Multiple Spanning Tree. MST was standardized as IEEE
802.1s in 2002 and merged into 802.1Q in 2005. MST is an open protocol derived from RSTP, sharing all its
rapid convergence properties, and in fact, the only standardized spanning-tree protocol for VLAN-based
networks supported by multiple vendors. MST is a compromise between common spanning-tree and per-
VLAN spanning tree. An MST instance represents a unique spanning-tree topology. Multiple MST instances
can be created to account for each of the required spanning-tree topologies in a network, and an arbitrary
number of VLANs can be mapped to a single MST instance.
In this lab, you will set up two instances of MST, one for VLANs 2 and 3 and the other for VLANs 4 and 5. All
other VLANs will be mapped to the default MST instance (also referred to as IST or Internal Spanning Tree).
Note: This lab is an exercise in deploying and verifying MST and does not reflect networking best practices.
Note: Use the NetLab-0-Resetting the AC NetLab topology to properly erase all devices
Use the NetLab Template to capture the requested screenshots as proof of completion.
Instructions
Switch D1
hostname YOURNAME-D1
banner motd # D1, Multiple Spanning Tree #
spanning-tree mode rapid-pvst
line con 0
exec-timeout 0 0
logging synchronous
exit
interface range g0/1 - 3
switchport trunk encapsulation dot1q
switchport mode trunk
no shutdown
exit
vlan 2
name SecondVLAN
exit
vlan 3
name ThirdVLAN
exit
vlan 4
name FourthVLAN
exit
vlan 5
name FifthVLAN
exit
Switch D2
hostname YOURNAME-D2
banner motd # D2, Multiple Spanning Tree #
spanning-tree mode rapid-pvst
line con 0
exec-timeout 0 0
logging synchronous
exit
interface range g0/1 - 3
switchport trunk encapsulation dot1q
switchport mode trunk
no shutdown
exit
vlan 2
name SecondVLAN
exit
vlan 3
name ThirdVLAN
exit
vlan 4
name FourthVLAN
exit
vlan 5
name FifthVLAN
exit
Switch A1
hostname YOURNAME-A1
banner motd # A1, Multiple Spanning Tree #
spanning-tree mode rapid-pvst
line con 0
exec-timeout 0 0
logging synchronous
exit
spanning-tree mode rapid-pvst
line con 0
exec-timeout 0 0
logging synchronous
exit
interface range f0/1-4
switchport mode trunk
no shutdown
exit
vlan 2
name SecondVLAN
exit
vlan 3
name ThirdVLAN
exit
vlan 4
name FourthVLAN
exit
vlan 5
name FifthVLAN
exit
b. Set the clock on each switch to UTC time. (E.g., clock set 13:40:01 Jan 18 2022)
c. On D1, D2, and A1, enter the show spanning-tree vlan 1 command. Position the terminal windows so that
all three outputs can be seen and compared.
d. Based on the output generated, which switch was selected the root switch? Confirm that all of its port roles
are Designated (Desg) and forwarding (FWD) traffic.
e. On the two other non-root switches, identify which port was selected as the:
Root (Root) port and forwarding (FWD)
Designated (Desg) port and forwarding (FWD)
Alternate (Altn) port and blocking (BLK)
At this point, with no MST-specific configuration, MST Instance 0 is operational for all VLANs.
b. On D1 and D2, issue show spanning-tree command to see the STP information.
MST0
Spanning tree enabled protocol mstp
Root ID Priority 32768
Address 649e.f3d2.a500
Cost 0
Port 3 (GigabitEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
YOURNAME-D1#
Note: Outputs and Spanning Tree topologies highlighted in this lab will/may be different than what you
observe using your own equipment.
Take note of the information displayed for interfaces G0/1 and G0/2 because they are connected to a
switch that is not running MST. Their type is listed as P2p Bound (PVST).
c. On D1, add the keyword mst and issue show spanning-tree mst command to see MST-specific STP
information.
YOURNAME-D1#
Notice that the Root MAC address is not the same as the Bridge (this switch) address. This is an
indication that this switch is not the root. Also notice that G0/3 is a root port. This would make D2 the
MST root.
d. On D2, issue show spanning-tree mst command to see MST-specific STP information.
YOURNAME-D2#
The basic behavior of MST is the same as spanning tree, where a root bridge must be selected, then root
ports, and finally best paths to the root bridge from all non-root bridges.
In the current network, we can see that D2 has been elected the root bridge. The bridge priority defaults
to 32768, so the election is based on D2 having a lower base MAC address.
Note: The switch elected as root may be different in your lab topology, but the rules for election remain
the same.
Notice how A1 is running five instances of spanning tree. That is because it is still running rapid-PVST+.
f. On D2, issue the show spanning-tree root command and the output will be different. This is because
with MST, only one instance of the spanning-tree algorithm runs, regardless of the number of VLANs
mapped to it.
YOURNAME-D2# show spanning-tree root
a. On D1, enter MST configuration mode using the command spanning-tree mst configuration.
D1(config)# spanning-tree mst configuration
D1(config-mst)#
Note: While in spanning-tree mst configuration mode, you can use the show current and show pending
commands to view current and pending configuration settings.
f. Commit the configuration by typing exit and returning to global configuration mode.
D1(config-mst)# exit
D1(config)# end
D1#
g. Issue the command show spanning-tree mst to verify the configuration is in place.
YOURNAME-D1#
YOURNAME-D1#
h. On D1, change the revision number to 2 and add VLAN 3 to instance 1 and VLAN 5 to instance 2.
k. On A1,D1, and D2, issue the show spanning-tree mst command. Position the terminal windows so that
all three outputs can be seen and compared.
YOURNAME-A1#
a. Configure D1 as the primary root bridge for MST instance 1 and the secondary root bridge for MST
instance 2 as shown.
D1(config)# spanning-tree mst 1 root primary
D1(config)# spanning-tree mst 2 root secondary
b. Configure D2 the primary root bridge for MST instance 2 and the secondary root bridge for MST 1.
c. After you have configured both D1 and D2, go to A1 and issue the command show spanning-tree root.
In this output, you will see the root bridges differentiated.
YOURNAME-A1# show spanning-tree root
Root Hello Max Fwd
MST Instance Root ID Cost Time Age Dly Root Port
---------------- -------------------- --------- ----- --- --- ------------
MST0 32768 649e.f3d2.a500 0 2 20 15 Fa0/3
MST1 24577 6c41.6ace.7880 200000 2 20 15 Fa0/1
MST2 24578 649e.f3d2.a500 200000 2 20 15 Fa0/3
YOURNAME-A1#
From the above output, you can see that the root port for VLAN 1 is F0/1 and the root port for VLAN 2 is
F0/3. A1 is the root bridge for MST Instance 0 in this example.
d. On A1,D1, and D2, issue the show spanning-tree summary command. Position the terminal windows
so that all three outputs can be seen and compared.
Capture a SS displaying the output generated in Step 3d (output of D1, D2, and A1).
Step 3: Adjust port cost values to impact root and designated port selection.
As the network is implemented right now, there are two direct paths between switch A1 and the root bridge for
each MST. Path and port costs are evaluated to determine the shortest path to the root bridge.
In the case where there are multiple equal cost paths to the root bridge, additional attributes must be
evaluated. In our case, the lower interface number (for example, F0/1) is chosen as the Root Port, and the
higher interface number (for example, F0/2) is put into a spanning tree Blocking state.
You can see which ports are blocked with the show spanning-tree vlan-id command or the show
spanning-tree blockedports command. For now, examine VLAN 1 on D1.
a. On A1, issue the commands show spanning-tree vlan 1 and show spanning-tree blockedports.
YOURNAME-A1#
As you can see, MST 1 has its Root Port on F0/1 and F0/2, F0/3, and F0/4 are Alternate Blocking Ports.
To manipulate which port becomes the Root Port on non-root bridges, change the port cost (a value
between 1 and 200,000,000) or port priority value (a value between 0 and 240 in increments of 16).
Remember that this change could have an impact on downstream switches as well.
Note: The changes you are about to implement are considered topology changes and could have a
significant impact on the overall structure of the spanning tree in your switch network. Do not make these
changes in a production network without careful planning and prior coordination.
b. On A1, shutdown interfaces F0/1 and F0/2, assign a new port cost of 1000 to F0/2 using the spanning-
tree mst 1 cost value command, and then issue the no shutdown command on the ports.
A1(config)# interface range f0/1-2
A1(config-if-range)# shutdown
A1(config-if-range)# exit
A1(config)# interface f0/2
A1(config-if)# spanning-tree mst 1 cost 1000
A1(config-if)# exit
A1(config)# interface range f0/1-2
A1(config-if-range)# no shutdown
A1(config-if-range)# exit
c. Now verify that this impacts root port selection on A1 using the show spanning-tree vlan 1 and show
spanning-tree blockedports commands.
YOURNAME-A1# show spanning-tree mst 1
YOURNAME-A1#
YOURNAME-A1# show spanning-tree blockedports
YOURNAME-A1#
From the output, you can see that the root port selected by A1 for VLAN 1 is now interface F0/2, and the
port (and root) cost is now 1000.
YOURNAME-A1#
As expected with two equal-cost paths to the root bridge, the lower port ID was selected as the root port.
b. On D2, modify the port priority of D2 interface G0/2 so that it becomes the preferred port by issuing the
spanning-tree mst 2 port-priority value interface configuration command. Use a value of 64.
Open configuration window
c. On A1, issue the show spanning-tree mst 2 command and you will see that Fa0/4 is now the selected
root port.
Open configuration window
YOURNAME-A1#
d. On A1,D1, and D2, issue the show spanning-tree summary command. Position the terminal windows
so that all three outputs can be seen and compared.
Capture a SS displaying the output generated in Step 4d (output of D1, D2, and A1).