Configuring MSTP
Multiple Spanning Tree Protocol (MSTP) maps multiple VLANs into a spanning tree instance, with each instance having a spanning tree topology independent of other spanning tree instances.
Understanding MSTP
Ethernet networks are susceptible to broadcast storms if loops are introduced. However, an Ethernet network needs to include loops because they provide redundant paths in case of a link failure. Spanning-tree protocols address both of these issues because they provide link redundancy while simultaneously preventing undesirable loops.
Spanning-tree protocols intelligently avoid loops in a network by creating a tree topology (spanning tree) of the entire bridged network with only one available path between the tree root and a leaf. All other paths are forced into a standby state. The tree root is a switch within the network elected by the STA (spanning-tree algorithm) to use when computing the best path between bridges throughout the network and the root bridge. Frames travel through the network to their destination– a leaf. A tree branch is a network segment, or link, between bridges. Switches that forward frames through an STP spanning-tree are called designated bridges.
Juniper Networks devices provide Layer 2 loop prevention through Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP), Multiple Spanning Tree Protocol (MSTP), and VLAN Spanning Tree Protocol (VSTP). This topic explains MSTP.
If you are using Junos OS for EX Series and QFX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style, you can force the original IEEE 802.1D Spanning Tree Protocol (STP) version to run in place of RSTP or VSTP by setting force-version.
This topic describes:
- Benefits of MSTP
- MSTP Maps Multiple VLANs
- Configuring MSTP Regions
- Selecting a Spanning Tree Protocol
Benefits of MSTP
MSTP has the following benefits:
Multiple Spanning Tree Protocol works with most VLANs.
MSTP supports multiple instances on a single physical interface.
On MX Series and ACX Series routers, you can configure RSTP, MSTP, and VSTP instance interfaces as edge ports.
MSTP Maps Multiple VLANs
MSTP is an extension of RSTP that maps multiple independent spanning-tree instances onto one physical topology. Each spanning-tree instance (STI) includes one or more VLANs. Unlike in STP and RSTP configurations, a port might belong to multiple VLANs and be dynamically blocked in one spanning-tree instance, but forwarding in another. This behavior significantly improves network resource utilization by load-balancing across the network and maintaining switch CPU loads at moderate levels. MSTP also leverages the fast reconvergence time of RSTP when a network, switch, or port failure occurs within a spanning-tree instance.
MSTP creates a common and internal spanning tree (CIST) to interconnect and manage all MSTP regions and even individual devices that run RSTP or STP, which are recognized as distinct spanning-tree regions by MSTP. The CIST views each MSTP region as a virtual bridge, regardless of the actual number of devices participating in the MSTP region, and enables multiple spanning-tree instances (MSTIs) to link to other regions. The CIST is a single topology that connects all switches (STP, RSTP, and MSTP devices) through an active topology, ensuring connectivity between LANs and devices within a bridged network. This functionality provided by MSTP enables you to better utilize network resources while remaining backward-compatible with older network devices.
Configuring MSTP Regions
When enabling MSTP, you define one or more MSTP regions. An MSTP region defines a logical domain where multiple spanning-tree instances (MSTIs) can be administered independently of MSTIs in other regions, setting the boundary for bridge protocol data units (BPDUs) sent by one MSTI. An MSTP region is a group of switches that is defined by three parameters:
Region name—User-defined alphanumeric name for the region.
Revision level—User-defined value that identifies the region.
Mapping table—Numerical digest of VLAN-to-instance mappings.
An MSTP region can support up to 64 MSTIs,, and each MSTI can support from 1 to 4094 VLANs. When you define a region, MSTP automatically creates an internal spanning-tree instance (IST instance 0) that provides the root switch for the region and includes all currently configured VLANs that are not specifically assigned to a user-defined MSTI. An MSTI includes all static VLANs that you specifically add to it. The switch places any dynamically created VLANs in the IST instance by default, unless you explicitly map them to another MSTI. Once you assign a VLAN to a user-defined MSTI, the switch removes the VLAN from the IST instance.
Selecting a Spanning Tree Protocol
The default factory configuration is RSTP, a faster version of STP. To determine which spanning-tree protocol is best for your situation, see Table 1 below.
Protocol | Advantages | Disadvantages |
---|---|---|
RSTP |
|
|
STP |
|
|
MSTP |
|
|
VSTP |
|
|
See Also
Configuring MSTP
You can configure the Multiple Spanning Tree Protocol (MSTP) under the [edit
protocols]
hierarchy.
You can configure the Multiple Spanning Tree Protocol (MSTP) under the following hierarchy levels:
-
[edit logical-systems logical-system-name protocols]
-
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols]
-
[edit protocols]
-
[edit routing-instances routing-instance-name protocols]
The routing instance type can be either virtual-switch or layer2-control.
To configure the Multiple Spanning Tree Protocol:
See Also
Configuring MSTP Instances on a Physical Interface
You can configure a Multiple Spanning Tree Instance (MSTI) under the following hierarchy levels:
[edit logical-systems logical-system-name protocols mstp]
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols mstp]
[edit protocols mstp]
[edit routing-instances routing-instance-name protocols mstp]
The routing instance type can be either virtual-switch or layer2-control.
Before you begin, configure Multiple Spanning-Tree Protocol. For configuration details, see Configuring Multiple Spanning Tree Protocol.
Example: Configuring Network Regions for VLANs with MSTP
This example uses Junos OS for EX Series and QFX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style. The example also describes the configuration statement differences that can be substituted in the same configuration on EX Series switches that do not support ELS.
Multiple Spanning Tree Protocol (MSTP) is used to create a loop-free topology in networks using multiple spanning-tree regions in which each region contains multiple spanning-tree instances (MSTIs). MSTIs provide different paths for different VLANs. This functionality facilitates better load sharing across redundant links.
Up to 64 MSTIs can be created for an EX Series switch, and each MSTI can support up to 4094 VLANs.
This example describes how to configure MSTP on four EX Series switches:
- Requirements
- Overview and Topology
- Configuring MSTP on Switch 1
- Configuring MSTP on Switch 2
- Configuring MSTP on Switch 3
- Configuring MSTP on Switch 4
- Verification
Requirements
This example uses the following software and hardware components:
Junos OS Release 13.2X50-D10 or later for EX Series or QFX Series switches
Four QFX Series switches
Before you configure the switches for MSTP, be sure you have:
Installed and connected the four switches. See the hardware documentation for your switch.
Performed the initial software configuration on all switches. See Connecting and Configuring an EX Series Switch (CLI Procedure) or Connecting and Configuring an EX Series Switch (J-Web Procedure).
Overview and Topology
When the number of VLANs grows in a network, MSTP provides an efficient way of creating a loop-free topology by using MSTIs. Each MSTI in the spanning-tree domain maintains its own tree. Each tree can be mapped to different links, utilizing bandwidth that would be unavailable to a single tree. MSTIs reduce the demand on system resources.
Topology
The interfaces shown in Figure 1 will be configured for MSTP.
Property |
Settings |
---|---|
Switch 1 |
The following interfaces on Switch 1 are connected in this way:
|
Switch 2 |
The following interfaces on Switch 2 are connected in this way:
|
Switch 3 |
The following interfaces on Switch 3 are connected in this way:
|
Switch 4 |
The following interfaces on Switch 4 are connected in this way:
|
VLAN names and tag IDs |
|
MSTIs |
|
MSTI region |
|
The topology in Figure 1 shows a common and internal spanning tree (CIST). The CIST is a single spanning tree connecting all devices in the network. The switch with the lowest bridge priority is elected as the root bridge of the CIST. You can control the election of the root bridge by configuring the bridge priority. Switch 3 is the root bridge of the CIST.
The ports in an MSTP topology have specific roles:
The root port is responsible for forwarding data to the root bridge.
The alternate port is a standby port for the root port. When a root port goes down, the alternate port becomes the active root port.
The designated port forwards data to the downstream network segment or device.
The backup port becomes the active designated port and starts forwarding data when the designated port goes down.
In this example, one MSTP region contains Switch 1, Switch 2, Switch 3, and Switch 4. Within the region, four VLANs are created:
voice-vlan
supports voice traffic and has the VLAN tag identifier of10
.employee-vlan
supports data traffic and has the VLAN tag identifier of20
.guest-vlan
supports guest VLAN traffic (for supplicants that fail authentication) and has the VLAN tag identifier of30
.camera-vlan
supports video traffic and has the VLAN tag identifier of40
.
The VLANs are associated with specific interfaces on each of
the four switches. Two MSTIs, 1
and 2
, are then
associated with the VLAN tag identifiers, and some MSTP parameters,
such as cost, are configured on each switch.
Configuring MSTP on Switch 1
Procedure
CLI Quick Configuration
To quickly configure interfaces and MSTP on Switch 1, for ELS switches, copy the following commands and paste them into the switch terminal window:
[edit] set vlans voice-vlan description “Voice VLAN” set vlans voice-vlan vlan-id 10 set vlans employee-vlan description “Employee VLAN” set vlans employee-vlan vlan-id 20 set vlans guest-vlan description “Guest VLAN” set vlans guest-vlan vlan-id 30 set vlans camera-vlan description “Camera VLAN” set vlans camera-vlan vlan-id 40 set interfaces xe-0/0/9:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/12:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/11:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/9:0 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/12:0 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/11:0 unit 0 family ethernet-switching interface-mode trunk set protocols mstp configuration-name region1 set protocols mstp bridge-priority 16k set protocols mstp interface xe-0/0/9:0 cost 1000 set protocols mstp interface xe-0/0/9:0 mode point-to-point set protocols mstp interface xe-0/0/12:0 cost 1000 set protocols mstp interface xe-0/0/12:0 mode point-to-point set protocols mstp interface xe-0/0/11:0 cost 1000 set protocols mstp interface xe-0/0/11:0 mode point-to-point set protocols mstp msti 1 bridge-priority 16k set protocols mstp msti 1 vlan [10 20] set protocols mstp msti 1 interface xe-0/0/11:0 cost 1000 set protocols mstp msti 2 bridge-priority 8k set protocols mstp msti 2 vlan [30 40]
For non-ELS switches, instead of the following command
used above for ELS switches that sets an interface into trunk mode
using the interface-mode
statement:
set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration,
which uses the non-ELS port-mode
statement to set an interface
into trunk mode:
set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Step-by-Step Procedure
To configure interfaces and MSTP on Switch 1:
Starting with Junos OS Release 15.1 for EX Series and QFX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style, you can configure spanning tree parameters globally on all spanning tree interfaces. See Configuring MSTP on Switches for additional information.
Configure the VLANs
voice-vlan
,employee-vlan
,guest-vlan
, andcamera-vlan
:[edit vlans] user@switch1# set voice-vlan description “Voice VLAN” user@switch1# set voice-vlan vlan-id 10 user@switch1# set employee-vlan description “Employee VLAN” user@switch1# set employee-vlan vlan-id 20 user@switch1# set guest-vlan description “Guest VLAN” user@switch1# set guest-vlan vlan-id 30 user@switch1# set camera-vlan description “Camera VLAN” user@switch1# set guest-vlan vlan-id 40
Configure the VLANs on the interfaces, including support for the Ethernet Switching protocol:
[edit interfaces] user@switch1# set xe-0/0/9:0 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch1# set xe-0/0/12:0 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch1# set xe-0/0/11:0 unit 0 family ethernet-switching vlan members [10 20 30 40]
Configure the port mode for the interfaces:
[edit interfaces] user@switch1# set xe-0/0/9:0 unit 0 family ethernet-switching interface-mode trunk user@switch1# set xe-0/0/12:0 unit 0 family ethernet-switching interface-mode trunk user@switch1# set xe-0/0/11:0 unit 0 family ethernet-switching interface-mode trunk
Note:For non-ELS switches, instead of the following command used above for ELS switches that sets an interface into trunk mode using the
interface-mode
statement:set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration, which uses the non-ELS
port-mode
statement to set an interface into trunk mode:set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Configure MSTP on the switch, including the two MSTIs:
[edit protocols] user@switch1# mstp configuration-name region1 user@switch1# mstp bridge-priority 16k user@switch1# mstp interface xe-0/0/9:0 cost 1000 user@switch1# mstp interface xe-0/0/9:0 mode point-to-point user@switch1# mstp interface xe-0/0/12:0 cost 1000 user@switch1# mstp interface xe-0/0/12:0 mode point-to-point user@switch1# mstp interface xe-0/0/11:0 cost 1000 user@switch1# mstp interface xe-0/0/11:0 mode point-to-point user@switch1# mstp msti 1 bridge-priority 16k user@switch1# mstp msti 1 vlan [10 20] user@switch1# mstp msti 1 interface xe-0/0/11:0 cost 1000 user@switch1# mstp msti 2 bridge-priority 8k user@switch1# mstp msti 2 vlan [30 40]
Results
Check the results of the configuration:
user@switch1> show configuration interfaces { xe-0/0/9:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } xe-0/0/12:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } xe-0/0/11:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } } protocols { mstp { configuration-name region1; bridge-priority 16k; interface xe-0/0/9:0 { cost 1000; mode point-to-point; } interface xe-0/0/12:0 { cost 1000; mode point-to-point; } interface xe-0/0/11:0 { cost 1000; mode point-to-point; } msti 1 { bridge-priority 16k; vlan [ 10 20]; interface xe-0/0/11:0 { cost 1000; } } msti 2 { bridge-priority 8k; vlan [ 30 40 ]; } } vlans { voice-vlan { vlan-id 10; } employee-vlan { vlan-id 20; } guest-vlan { vlan-id 30; } camera-vlan { vlan-id 40; } }
Configuring MSTP on Switch 2
Procedure
CLI Quick Configuration
To quickly configure interfaces and MSTP on Switch 2, copy the following commands and paste them into the switch terminal window:
[edit] set vlans voice-vlan description “Voice VLAN” set vlans voice-vlan vlan-id 10 set vlans employee-vlan description “Employee VLAN” set vlans employee-vlan vlan-id 20 set vlans guest-vlan description “Guest VLAN” set vlans guest-vlan vlan-id 30 set vlans camera-vlan description “Camera VLAN” set vlans camera-vlan vlan-id 40 set interfaces xe-0/0/9:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces et-0/0/3 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/9:0 unit 0 family ethernet-switching interface-mode trunk set interfaces et-0/0/3 unit 0 family ethernet-switching interface-mode trunk set protocols mstp configuration-name region1 set protocols mstp bridge-priority 32k set protocols mstp interface xe-0/0/9:0 cost 1000 set protocols mstp interface xe-0/0/9:0 mode point-to-point set protocols mstp interface et-0/0/3 cost 1000 set protocols mstp interface et-0/0/3 mode point-to-point set protocols mstp msti 1 bridge-priority 32k set protocols mstp msti 1 vlan [10 20] set protocols mstp msti 2 bridge-priority 4k set protocols mstp msti 2 vlan [30 40]
For non-ELS switches, instead of the following command
used above for ELS switches that sets an interface into trunk mode
using the interface-mode
statement:
set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration,
which uses the non-ELS port-mode
statement to set an interface
into trunk mode:
set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Step-by-Step Procedure
To configure interfaces and MSTP on Switch 2:
Configure the VLANs
voice-vlan
,employee-vlan
,guest-vlan
, andcamera-vlan
:[edit vlans] user@switch2# set voice-vlan description “Voice VLAN” user@switch2# set voice-vlan vlan-id 10 user@switch2# set employee-vlan description “Employee VLAN” user@switch2# set employee-vlan vlan-id 20 user@switch2# set guest-vlan description “Guest VLAN” user@switch2# set guest-vlan vlan-id 30 user@switch2# set camera-vlan vlan-description “Camera VLAN” user@switch2# set guest-vlan vlan-id 40
Configure the VLANs on the interfaces, including support for the Ethernet Switching protocol:
[edit interfaces] user@switch2# set xe-0/0/9:0 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch2# set et-0/0/3 unit 0 family ethernet-switching vlan members [10 20 30 40]
Configure the port mode for the interfaces:
[edit interfaces] user@switch2# set xe-0/0/9:0 unit 0 family ethernet-switching interface-mode trunk user@switch2# set et-0/0/3 unit 0 family ethernet-switching interface-mode trunk
Note:For non-ELS switches, instead of the following command used above for ELS switches that sets an interface into trunk mode using the
interface-mode
statement:set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration, which uses the non-ELS
port-mode
statement to set an interface into trunk mode:set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Configure MSTP on the switch, including the two MSTIs:
[edit protocols] user@switch2# mstp configuration-name region1 user@switch2# mstp bridge-priority 32k user@switch2# mstp interface xe-0/0/9:0 cost 1000 user@switch2# mstp interface xe-0/0/9:0 mode point-to-point user@switch2# mstp interface et-0/0/3 cost 1000 user@switch2# mstp interface et-0/0/3 mode point-to-point user@switch2# mstp msti 1 bridge-priority 32k user@switch2# mstp msti 1 vlan [10 20] user@switch2# mstp msti 2 bridge-priority 4k user@switch2# mstp msti 2 vlan [30 40]
Results
Check the results of the configuration:
user@switch2> show configuration interfaces { xe-0/0/9:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } et-0/0/3 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } } protocols { mstp { configuration-name region1; bridge-priority 32k; interface xe-0/0/9:0 { cost 1000; mode point-to-point; } interface et-0/0/3 { cost 1000; mode point-to-point; } msti 1 { bridge-priority 32k; vlan [10 20]; } msti 2 { bridge-priority 4k; vlan [30 40]; } } } vlans { voice-vlan { vlan-id 10; } employee-vlan { vlan-id 20; } guest-vlan { vlan-id 30; } camera-vlan { vlan-id 40; } }
Configuring MSTP on Switch 3
Procedure
CLI Quick Configuration
To quickly configure interfaces and MSTP on Switch 3, copy the following commands and paste them into the switch terminal window:
[edit] set vlans voice-vlan description “Voice VLAN” set vlans voice-vlan vlan-id 10 set vlans employee-vlan description “Employee VLAN” set vlans employee-vlan vlan-id 20 set vlans guest-vlan description “Guest VLAN” set vlans guest-vlan vlan-id 30 set vlans camera-vlan description “Camera VLAN” set vlans camera-vlan vlan—id 40 set interfaces xe-0/0/11:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces et-0/0/6 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/21:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/11:0 unit 0 family ethernet-switching interface-mode trunk set interfaces et-0/0/6 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/21:0 unit 0 family ethernet-switching interface-mode trunk set protocols mstp configuration-name region1 set protocols mstp bridge-priority 8k set protocols mstp interface xe-0/0/11:0 cost 1000 set protocols mstp interface xe-0/0/11:0 mode point-to-point set protocols mstp interface et-0/0/6 cost 1000 set protocols mstp interface et-0/0/6 mode point-to-point set protocols mstp interface xe-0/0/21:0 cost 1000 set protocols mstp interface xe-0/0/21:0 mode point-to-point set protocols mstp msti 1 bridge-priority 4k set protocols mstp msti 1 vlan [10 20] set protocols mstp msti 2 bridge-priority 16k set protocols mstp msti 2 vlan [30 40]
For non-ELS switches, instead of the following command
used above for ELS switches that sets an interface into trunk mode
using the interface-mode
statement:
set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration,
which uses the non-ELS port-mode
statement to set an interface
into trunk mode:
set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Step-by-Step Procedure
To configure interfaces and MSTP on Switch 3:
Configure the VLANs
voice-vlan
,employee-vlan
,guest-vlan
, andcamera-vlan
:[edit vlans] user@switch3# set voice-vlan description “Voice VLAN” user@switch3# set voice-vlan vlan-id 10 user@switch3# set employee-vlan description “Employee VLAN” user@switch3# set employee-vlan vlan-id 20 user@switch3# set guest-vlan description “Guest VLAN” user@switch3# set guest-vlan vlan-id 30 user@switch3# set camera-vlan description “Camera VLAN” user@switch3# set guest-vlan vlan-id 40
Configure the VLANs on the interfaces, including support for the Ethernet Switching protocol:
[edit interfaces] user@switch3# set xe-0/0/11:0 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch3# set et-0/0/6 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch3# set xe-0/0/21:0 unit 0 family ethernet-switching vlan members [10 20 30 40]
Configure the port mode for the interfaces:
[edit interfaces] user@switch3# set xe-0/0/11:0 unit 0 family ethernet-switching interface-mode trunk user@switch3# set et-0/0/6 unit 0 family ethernet-switching interface-mode trunk user@switch3# set xe-0/0/21:0 unit 0 family ethernet-switching interface-mode trunk
Note:For non-ELS switches, instead of the following command used above for ELS switches that sets an interface into trunk mode using the
interface-mode
statement:set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration, which uses the non-ELS
port-mode
statement to set an interface into trunk mode:set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Configure MSTP on the switch, including the two MSTIs:
[edit protocols] user@switch3# mstp configuration-name region1 user@switch3# mstp bridge-priority 8k user@switch3# mstp interface xe-0/0/11:0 cost 1000 user@switch3# mstp interface xe-0/0/11:0 mode point-to-point user@switch3# mstp interface et-0/0/6 cost 1000 user@switch3# mstp interface et-0/0/6 mode point-to-point user@switch3# mstp interface xe-0/0/21:0 cost 1000 user@switch3# mstp interface xe-0/0/21:0 mode point-to-point user@switch3# mstp msti 1 bridge-priority 4k user@switch3# mstp msti 1 vlan [10 20] user@switch3# mstp msti 2 bridge-priority 16k user@switch3# mstp msti 2 vlan [30 40]
Results
Check the results of the configuration:
user@switch3> show configuration interfaces { xe-0/0/11:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } et-0/0/6 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } xe-0/0/21:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } } } protocols { mstp { configuration-name region1; bridge-priority 8k; interface xe-0/0/11:0 { cost 1000; mode point-to-point; } interface et-0/0/6 { cost 1000; mode point-to-point; } interface xe-0/0/21:0 { cost 1000; mode point-to-point; } msti 1 { bridge-priority 4k; vlan [10 20]; } msti 2 { bridge-priority 16k; vlan [30 40]; } } } vlans { voice-vlan { vlan-id 10; } employee-vlan { vlan-id 20; } guest-vlan { vlan-id 30; } camera-vlan { vlan-id 40; } }
Configuring MSTP on Switch 4
Procedure
CLI Quick Configuration
To quickly configure interfaces and MSTP on Switch 4, copy the following commands and paste them into the switch terminal window:
[edit] set vlans voice-vlan description “Voice VLAN” set vlans voice-vlan vlan-id 10 set vlans employee-vlan description “Employee VLAN” set vlans employee-vlan vlan-id 20 set vlans guest-vlan description “Guest VLAN” set vlans guest-vlan vlan-id 30 set vlans camera-vlan description “Camera VLAN” set vlans camera-vlan vlan-id 40 set interfaces xe-0/0/12:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/21:0 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces xe-0/0/12:0 unit 0 family ethernet-switching interface-mode trunk set interfaces xe-0/0/21:0 unit 0 family ethernet-switching interface-mode trunk set protocols mstp configuration-name region1 set protocols mstp bridge-priority 16k set protocols mstp interface xe-0/0/12:0 cost 1000 set protocols mstp interface xe-0/0/12:0 mode point-to-point set protocols mstp interface xe-0/0/21:0 cost 1000 set protocols mstp interface xe-0/0/21:0 mode point-to-point set protocols mstp msti 1 bridge-priority 16k set protocols mstp msti 1 vlan [10 20] set protocols mstp msti 2 bridge-priority 32k set protocols mstp msti 2 vlan [30 40]
For non-ELS switches, instead of the following command
used above for ELS switches that sets an interface into trunk mode
using the interface-mode
statement:
set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration,
which uses the non-ELS port-mode
statement to set an interface
into trunk mode:
set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Step-by-Step Procedure
To configure interfaces and MSTP on Switch 4:
Configure the VLANs
voice-vlan
,employee-vlan
,guest-vlan
, andcamera-vlan
:[edit vlans] user@switch4# set voice-vlan description “Voice VLAN” user@switch4# set voice-vlan vlan-id 10 user@switch4# set employee-vlan description “Employee VLAN” user@switch4# set employee-vlan vlan-id 20 user@switch4# set guest-vlan description “Guest VLAN” user@switch4# set guest-vlan vlan-id 30 user@switch4# set camera-vlan description “Camera VLAN” user@switch4# set guest-vlan vlan-id 40
Configure the VLANs on the interfaces, including support for the Ethernet Switching protocol:
[edit interfaces] user@switch4# set xe-0/0/12:0 unit 0 family ethernet-switching vlan members [10 20 30 40] user@switch4# set xe-0/0/21:0 unit 0 family ethernet-switching vlan members [10 20 30 40]
Configure the port mode for the interfaces:
[edit interfaces] user@switch4# set xe-0/0/12:0 unit 0 family ethernet-switching interface-mode trunk user@switch4# set xe-0/0/21:0 unit 0 family ethernet-switching interface-mode trunk
Note:For non-ELS switches, instead of the following command used above for ELS switches that sets an interface into trunk mode using the
interface-mode
statement:set interfaces interface-name unit 0 family ethernet-switching interface-mode trunk
substitute the following command for those lines in the configuration, which uses the non-ELS
port-mode
statement to set an interface into trunk mode:set interfaces interface-name unit 0 family ethernet-switching port-mode trunk
Configure MSTP on the switch, including the two MSTIs:
[edit protocols] user@switch4# mstp configuration-name region1 user@switch4# mstp bridge-priority 16k user@switch4# mstp interface xe-0/0/12:0 cost 1000 user@switch4# mstp interface xe-0/0/12:0 mode point-to-point user@switch4# mstp interface xe-0/0/21:0 cost 1000 user@switch4# mstp interface xe-0/0/21:0 mode point-to-point user@switch4# mstp msti 1 bridge-priority 16k user@switch4# mstp msti 1 vlan [10 20] user@switch4# mstp msti 2 bridge-priority 32k user@switch4# mstp msti 2 vlan [30 40]
Results
Check the results of the configuration:
user@switch4> show configuration interfaces { xe-0/0/12:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } xe-0/0/21:0 { unit 0 { family ethernet-switching { interface-mode trunk; vlan { members 10; members 20; members 30; members 40; } } } } } protocols { mstp { configuration-name region1; bridge-priority 16k; interface xe-0/0/12:0 { cost 1000; mode point-to-point; } interface xe-0/0/21:0 { cost 1000; mode point-to-point; } msti 1 { bridge-priority 16k; vlan [10 20]; } msti 2 { bridge-priority 32k; vlan [30 40]; } } } vlans { voice-vlan { vlan-id 10; } employee-vlan { vlan-id 20; } guest-vlan { vlan-id 30; } camera-vlan { vlan-id 40; } }
Verification
To confirm that the configuration is working properly, perform these tasks:
- Verifying MSTP Configuration on Switch 1
- Verifying MSTP Configuration on Switch 2
- Verifying MSTP Configuration on Switch 3
- Verifying MSTP Configuration on Switch 4
Verifying MSTP Configuration on Switch 1
Purpose
Verify the MSTP configuration on Switch 1.
Action
Issue the operational mode commands show spanning-tree interface and show spanning-tree bridge:
user@switch1> show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/9:0 128:1010 128:1010 16384.544b8c432703 1000 FWD DESG xe-0/0/12:0 128:1011 128:1011 16384.40a677792303 1000 BLK ALT xe-0/0/11:0 128:1012 128:1010 8192.544b8c44c103 1000 FWD ROOT Spanning tree interface parameters for instance 1 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/9:0 128:1010 128:1010 16385.544b8c432703 1000 FWD DESG xe-0/0/12:0 128:1011 128:1011 16385.40a677792303 1000 BLK ALT xe-0/0/11:0 128:1012 128:1010 4097.544b8c44c103 1000 FWD ROOT Spanning tree interface parameters for instance 2 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/9:0 128:1010 128:1012 4098.88a25e8c7603 1000 FWD ROOT xe-0/0/12:0 128:1011 128:1011 8194.544b8c432703 1000 FWD DESG xe-0/0/11:0 128:1012 128:1012 8194.544b8c432703 1000 FWD DESG user@switch1> show spanning-tree bridge STP bridge parameters Routing instance name : GLOBAL Context ID : 0 Enabled protocol : MSTP STP bridge parameters for CIST Root ID : 8192.54:4b:8c:44:c1:03 Root cost : 0 Root port : xe-0/0/11:0 CIST regional root : 8192.54:4b:8c:44:c1:03 CIST internal root cost : 1000 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Message age : 0 Number of topology changes : 3 Time since last topology change : 675 seconds Local parameters Bridge ID : 16384.54:4b:8c:43:27:03 STP bridge parameters for MSTI 1 MSTI regional root : 4097.54:4b:8c:44:c1:03 Root cost : 1000 Root port : xe-0/0/11:0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Number of topology changes : 3 Time since last topology change : 675 seconds Local parameters Bridge ID : 16385.54:4b:8c:43:27:03 STP bridge parameters for MSTI 2 MSTI regional root : 4098.88:a2:5e:8c:76:03 Root cost : 1000 Root port : xe-0/0/9:0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Number of topology changes : 3 Time since last topology change : 675 seconds Local parameters Bridge ID : 8194.54:4b:8c:43:27:03
Meaning
The operational mode command show spanning-tree interface
displays spanning-tree domain information such as the designated
port and the port roles.
The operational mode command show spanning-tree bridge
displays the spanning-tree domain information at either the bridge
level or the interface level. If the optional interface name is omitted,
all interfaces in the spanning-tree domain are displayed.
Verifying MSTP Configuration on Switch 2
Purpose
Verify the MSTP configuration on Switch 2.
Action
Issue the operational mode commands show spanning-tree interface and show spanning-tree bridge:
user@switch2> show spanning-tree bridge Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost et-0/0/3 128:1010 128:1011 8192.544b8c44c103 1000 FWD ROOT xe-0/0/9:0 128:1012 128:1010 16384.544b8c432703 1000 BLK ALT Spanning tree interface parameters for instance 1 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost et-0/0/3 128:1010 128:1011 4097.544b8c44c103 1000 FWD ROOT xe-0/0/9:0 128:1012 128:1010 16385.544b8c432703 1000 BLK ALT Spanning tree interface parameters for instance 2 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost et-0/0/3 128:1010 128:1010 4098.88a25e8c7603 1000 FWD DESG xe-0/0/9:0 128:1012 128:1012 4098.88a25e8c7603 1000 FWD DESG user@switch2> show spanning-tree bridge STP bridge parameters Routing instance name : GLOBAL Context ID : 0 Enabled protocol : MSTP STP bridge parameters for CIST Root ID : 8192.54:4b:8c:44:c1:03 Root cost : 0 Root port : et-0/0/3 CIST regional root : 8192.54:4b:8c:44:c1:03 CIST internal root cost : 1000 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Message age : 0 Number of topology changes : 2 Time since last topology change : 659 seconds Local parameters Bridge ID : 32768.88:a2:5e:8c:76:03 STP bridge parameters for MSTI 1 MSTI regional root : 4097.54:4b:8c:44:c1:03 Root cost : 1000 Root port : et-0/0/3 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Number of topology changes : 2 Time since last topology change : 659 seconds Local parameters Bridge ID : 32769.88:a2:5e:8c:76:03 STP bridge parameters for MSTI 2 MSTI regional root : 4098.88:a2:5e:8c:76:03 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Number of topology changes : 3 Time since last topology change : 655 seconds Local parameters Bridge ID : 4098.88:a2:5e:8c:76:03
Meaning
The operational mode command show spanning-tree interface
displays spanning-tree domain information such as the designated
port and the port roles. The spanning-tree interface parameters for
instance 2 show that both ports are designated ports, which means
Switch 2 is the root bridge for this instance.
The operational mode command show spanning-tree bridge
displays the spanning-tree domain information at either the bridge
level or interface level. If the optional interface name is omitted,
all interfaces in the spanning-tree domain are displayed.
Verifying MSTP Configuration on Switch 3
Purpose
Verify the MSTP configuration on Switch 3.
Action
Issue the operational mode commands show spanning-tree interface and show spanning-tree bridge:
user@switch3> show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/11:0 128:1010 128:1010 8192.544b8c44c103 1000 FWD DESG et-0/0/6 128:1011 128:1011 8192.544b8c44c103 1000 FWD DESG xe-0/0/21:0 128:1012 128:1012 8192.544b8c44c103 1000 FWD DESG Spanning tree interface parameters for instance 1 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/11:0 128:1010 128:1010 4097.544b8c44c103 1000 FWD DESG et-0/0/6 128:1011 128:1011 4097.544b8c44c103 1000 FWD DESG xe-0/0/21:0 128:1012 128:1012 4097.544b8c44c103 1000 FWD DESG Spanning tree interface parameters for instance 2 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/11:0 128:1010 128:1012 8194.544b8c432703 1000 BLK ALT et-0/0/6 128:1011 128:1010 4098.88a25e8c7603 1000 FWD ROOT xe-0/0/21:0 128:1012 128:1012 16386.544b8c44c103 1000 FWD DESG user@switch3> show spanning-tree bridge STP bridge parameters Routing instance name : GLOBAL Context ID : 0 Enabled protocol : MSTP STP bridge parameters for CIST Root ID : 8192.54:4b:8c:44:c1:03 CIST regional root : 8192.54:4b:8c:44:c1:03 CIST internal root cost : 0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Number of topology changes : 2 Time since last topology change : 786 seconds Local parameters Bridge ID : 8192.54:4b:8c:44:c1:03 STP bridge parameters for MSTI 1 MSTI regional root : 4097.54:4b:8c:44:c1:03 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Number of topology changes : 1 Time since last topology change : 786 seconds Local parameters Bridge ID : 4097.54:4b:8c:44:c1:03 STP bridge parameters for MSTI 2 MSTI regional root : 4098.88:a2:5e:8c:76:03 Root cost : 1000 Root port : et-0/0/6 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Number of topology changes : 1 Time since last topology change : 786 seconds Local parameters Bridge ID : 16386.54:4b:8c:44:c1:03
Meaning
The operational mode command show spanning-tree
interface
displays spanning-tree domain information such as
the designated port and the port roles. Switch 3 is the root bridge
for instance 0, which is the CIST, as well as for instance 1. In both
instances, all ports on Switch 3 are designated ports.
The operational mode command show spanning-tree bridge
displays the spanning-tree domain information at either the bridge
level or the interface level. If the optional interface name is omitted,
all interfaces in the spanning-tree domain are displayed.
Verifying MSTP Configuration on Switch 4
Purpose
Verify the MSTP configuration on Switch 4.
Action
Issue the operational mode commands show spanning-tree interface and show spanning-tree bridge:
user@switch4> show spanning-tree interface Spanning tree interface parameters for instance 0 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/12:0 128:1011 128:1011 16384.40a677792303 1000 FWD DESG xe-0/0/21:0 128:1012 128:1012 8192.544b8c44c103 1000 FWD ROOT Spanning tree interface parameters for instance 1 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/12:0 128:1011 128:1011 16385.40a677792303 1000 FWD DESG xe-0/0/21:0 128:1012 128:1012 4097.544b8c44c103 1000 FWD ROOT Spanning tree interface parameters for instance 2 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost xe-0/0/12:0 128:1011 128:1011 8194.544b8c432703 1000 FWD ROOT xe-0/0/21:0 128:1012 128:1012 16386.544b8c44c103 1000 BLK ALT user@switch4> show spanning-tree bridge STP bridge parameters Routing instance name : GLOBAL Context ID : 0 Enabled protocol : MSTP STP bridge parameters for CIST Root ID : 8192.54:4b:8c:44:c1:03 Root cost : 0 Root port : xe-0/0/21:0 CIST regional root : 8192.54:4b:8c:44:c1:03 CIST internal root cost : 1000 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Message age : 0 Number of topology changes : 2 Time since last topology change : 823 seconds Local parameters Bridge ID : 16384.40:a6:77:79:23:03 STP bridge parameters for MSTI 1 MSTI regional root : 4097.54:4b:8c:44:c1:03 Root cost : 1000 Root port : xe-0/0/21:0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 19 Number of topology changes : 2 Time since last topology change : 823 seconds Local parameters Bridge ID : 16385.40:a6:77:79:23:03 STP bridge parameters for MSTI 2 MSTI regional root : 4098.88:a2:5e:8c:76:03 Root cost : 2000 Root port : xe-0/0/12:0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Hop count : 18 Number of topology changes : 2 Time since last topology change : 823 seconds Local parameters Bridge ID : 32770.40:a6:77:79:23:03
Meaning
The operational mode command show spanning-tree
interface
displays spanning-tree domain information such as
the designated port and the port roles.
The operational mode command show spanning-tree bridge
displays the spanning-tree domain information at either the bridge
level or the interface level. If the optional interface name is omitted,
all interfaces in the spanning-tree domain are displayed.
Disabling MSTP
To disable the entire MSTP instance:
Include the disable statement. You can include this statement at the following hierarchy levels:
[edit logical-systems logical-system-name protocols mstp]
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols mstp]
[edit protocols mstp]
[edit routing-instances routing-instance-name protocols mstp]
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.