3.15. Configuring MSTP
Overview
Function Introduction
The MSTP (Multiple Spanning Tree Algorithm and Protocol (IEEE 802.1Q-2005)) enables multiple VLANs to be mapped to the same spanning-tree instance, thereby reducing the number of spanning-tree instances needed to support a large number of VLANs. The MSTP provides for multiple forwarding paths for data traffic and enables load balancing. It improves the fault tolerance of the network because a failure in one instance (forwarding path) does not affect other instances (forwarding paths). The most common initial deployment of MSTP is in the backbone and distribution layers of a Layer 2 switched network; this deployment provides the highly-available network required in a service-provider environment. When the switch is in the multiple spanning-tree (MST) modes, the Rapid Spanning Tree Protocol (RSTP), which is based on IEEE 802.1w, is automatically enabled. The RSTP provides rapid convergence of the spanning tree through explicit handshaking that eliminates the IEEE 802.1D forwarding delay and quickly transitions root ports and designated ports to the forwarding state.
Principle Description
N/A
Configuration
The configurations of Switch1-Switch4 are as blow. The configurations of these 4 Switches are same if there is no special description.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Set the mode of STP
Switch(config)# spanning-tree mode mstp
step 3 Enter the vlan configure mode and create vlan
Switch(config)# vlan database
Switch(config-vlan)# vlan 10
Switch(config-vlan)# vlan 20
Switch(config-vlan)# exit
step 4 Enter the MSTP configure mode create region and instance. Bind the vlan to the instance.
Switch(config)# spanning-tree mst configuration
Switch(config-mst)# region RegionName
Switch(config-mst)# instance 1 vlan 10
Switch(config-mst)# instance 2 vlan 20
Switch(config-mst)# exit
step 5 Enter the interface configure mode, set the attributes of the interfaces
Switch(config)# interface eth-0-9
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-10
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-17
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-18
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# no shutdown
Switch(config-if)# exit
step 6 Enable STP and set priority for each swicth
Switch1:
Switch# configure terminal
Switch(config)# spanning-tree priority 0
Switch(config)# spanning-tree enable
Switch2:
Switch# configure terminal
Switch(config)# spanning-tree instance 1 priority 0
Switch(config)# spanning-tree enable
Switch3:
Switch# configure terminal
Switch(config)# spanning-tree instance 2 priority 0
Switch(config)# spanning-tree enable
Switch4:
Switch# configure terminal
Switch(config)# spanning-tree enable
step 7 Exit the configure mode
Switch(config)# end
step 8 Validation
Use the following command to display the information of MSTP on Switch1:
Switch# show spanning-tree mst brief
#### MST0: Vlans: 1
Multiple spanning tree protocol Enabled
Root ID Priority 0 (0x0000)
Address 2225.fa28.c900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 0 (0x0000)
Address 2225.fa28.c900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role State Cost Priority.Number Type
-------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
#### MST1: Vlans: 10
Root ID Priority 1 (0x0001)
Address 9c9a.7d91.9f00
Bridge ID Priority 32769 (0x8001)
Address 2225.fa28.c900
Interface Role State Cost Priority.Number Type
--------------------------------------------------
eth-0-9 Rootport Forwarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
#### MST2: Vlans: 20
Root ID Priority 2 (0x0002)
Address 304c.275b.b200
Bridge ID Priority 32770 (0x8002)
Address 2225.fa28.c900
Interface Role State Cost Priority.Number Type
----------------------------------------------------
eth-0-9 Alternate Discarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Rootport Forwarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
Use the following command to display the information of MSTP on Switch2:
Switch# show spanning-tree mst brief
#### MST0: Vlans: 1
Multiple spanning tree protocol Enabled
Root ID Priority 0 (0x0000)
Address 2225.fa28.c900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (0x8000)
Address 9c9a.7d91.9f00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role State Cost Priority.Number Type
----------------------------------------------------------
eth-0-9 Rootport Forwarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
----------------------------------------------------------
Root ID Priority 1 (0x0001)
Address 9c9a.7d91.9f00
Bridge ID Priority 1 (0x0001)
Address 9c9a.7d91.9f00
Interface Role State Cost Priority.Number Type
----------------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
----------------------------------------------------------
Root ID Priority 2 (0x0002)
Address 304c.275b.b200
Bridge ID Priority 32770 (0x8002)
Address 9c9a.7d91.9f00
Interface Role State Cost Priority.Number Type
----------------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Rootport Forwarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
Use the following command to display the information of MSTP on Switch3:
Switch# show spanning-tree mst brief
Multiple spanning tree protocol Enabled
Root ID Priority 0 (0x0000)
Address 2225.fa28.c900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (0x8000)
Address 304c.275b.b200
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role State Cost Priority.Number Type
-----------------------------------------------------
eth-0-9 Rootport Forwarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Alternate Discarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
#### MST1: Vlans: 10
Root ID Priority 1 (0x0001)
Address 9c9a.7d91.9f00
Bridge ID Priority 32769 (0x8001)
Address 304c.275b.b200
Interface Role State Cost Priority.Number Type
------------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Rootport Forwarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
#### MST2: Vlans: 20
Root ID Priority 2 (0x0002)
Address 304c.275b.b200
Bridge ID Priority 2 (0x0002)
Address 304c.275b.b200
Interface Role State Cost Priority.Number Type
--------------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
Use the following command to display the information of MSTP on Switch4:
Switch# show spanning-tree mst brief
#### MST0: Vlans: 1
Multiple spanning tree protocol Enabled
Root ID Priority 0 (0x0000)
Address 2225.fa28.c900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768 (0x8000)
Address 80a4.be55.6400
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role State Cost Priority.Number Type
---------------------------------------------------------
eth-0-9 Designated Forwarding 20000 128.9 P2p
eth-0-10 Designated Forwarding 20000 128.10 P2p
eth-0-17 Rootport Forwarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
#### MST1: Vlans: 10
Root ID Priority 1 (0x0001)
Address 9c9a.7d91.9f00
Bridge ID Priority 32769 (0x8001)
Address 80a4.be55.6400
Interface Role State Cost Priority.Number Type
----------------------------------------------------------
eth-0-9 Alternate Discarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Rootport Forwarding 20000 128.17 P2p
eth-0-18 Alternate Discarding 20000 128.18 P2p
#### MST2: Vlans: 20
Root ID Priority 2 (0x0002)
Address 304c.275b.b200
Bridge ID Priority 32770 (0x8002)
Address 80a4.be55.6400
Interface Role State Cost Priority.Number Type
----------------------------------------------------------
eth-0-9 Rootport Forwarding 20000 128.9 P2p
eth-0-10 Alternate Discarding 20000 128.10 P2p
eth-0-17 Designated Forwarding 20000 128.17 P2p
eth-0-18 Designated Forwarding 20000 128.18 P2p
Application cases
N/A