Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

What is MSTP – Multiple Spanning Tree Protocol?

Author : PyNet Labs
Last Modified: February 8, 2024 
A blog featured image of MSTP Protocol with an image of MST Regions

Introduction

Networks are becoming more complex and demanding as the number of devices and applications increases. In order to ensure efficient communication, network engineers must utilize protocols that can handle Vlans, redundancy, and load balancing. One protocol that serves this purpose is MSTP. It is an extension of the STP (Spanning tree protocol), which assists in preventing loops and offers path redundancy in a network.

With the help of MSTP, network engineers can create spanning trees with sets of VLANs and assign them to different switch ports. This way, it can optimize bandwidth use, reduce the convergence time, and simplify the configuration and management of the network. In this blog, we will explain what the MSTP protocol is, its purpose, implementation, advantages, and disadvantages.

Let’s first understand what the MSTP protocol is.

What is the MSTP Protocol?

MSTP Protocol or Multiple Spanning Tree Protocol is defined in IEEE 802.1s standard. MSTP is based on RSTP, which means it inherits all the features and improvements of RSTP, such as fast convergence, port roles, port states, edge ports, link types, etc. But, apart from all the functionalities that are defined in RSTP, MSTP added some new ones, such as regions, instances, mapping, and digest.

MSTP allows for creating multiple spanning trees within a single network. Each spanning tree is called an instance, and each instance can have its own root bridge and forwarding topology. Each instance can also be associated with one or more VLANs, which means that different VLANs can follow different paths on the same physical network. This can be useful for larger networks that require more flexibility and redundancy.

Purpose of Multiple Spanning Tree Protocol

The main purpose of MSTP is to optimize network performance and reliability by reducing the number of spanning tree instances and allowing different VLANs to follow different paths. MSTP also simplifies network configuration and management by using a common set of parameters for all instances within a region.

There are various limitations to previous versions of protocols such as RSTP. When we talk about RSTP or Rapid Spanning Tree Protocol, it is an upgraded version of the original STP. RSTP was introduced in order to prevent loops in a single broadcast domain. Still, RSTP has limitations when it comes to networks with multiple VLANs. Some of these are:

  • RSTP uses the same spanning tree instance for all VLANs, which means that it blocks links that could be used for different VLANs.
  • RSTP does not support load balancing based on VLANs, which means that it cannot optimize the traffic flow for each VLAN.
  • RSTP does not allow for different root bridges or priorities for different VLANs, which means that it cannot adapt to different network requirements or preferences.

MSTP addresses all the above limitations. It introduces the concept of MST regions and MST instances. An MST region is a group of switches that run the MSTP protocol and have the same configuration parameters.

An MST instance is a logical structure that defines a single forwarding topology for a set of VLANs within an MST region. Each MST instance has its own root bridge and priority values, as well as its own port roles and states.

Now that we have a basic understanding of MSTP along with its different purposes. Let’s discuss the implementation of the multiple-spanning tree protocol.

How to Implement the MSTP Protocol?

In order to implement the MSTP protocol on your network, we have provided some steps to follow.

Define MST region

The first step is to define an MST region. An MST region is defined as the group of switches that run MSTP and have the same configuration parameters. These parameters include:

  • Region name: A name that identifies the region.
  • Revision number: A number that indicates the version of the configuration.
  • VLAN-to-instance mapping: A table that assigns each VLAN to an instance.
A network topology of 6 switches, where 4 are shown inside MST Regions and 2 switches are in Non-MST Regions.

Note: It is crucial to consistently configure these parameters on all regional switches. If not, the switches will not be able to exchange MST information and will fall back to RSTP mode.

Configuring MST instance

The second step is to configure an MST instance. An MST instance is a logical entity that defines a single spanning tree for a set of VLANs. One needs to configure these parameters for each instance:

  • Instance number: A number that identifies the instance.
  • Root bridge: A switch that acts as the root bridge for the instance. You can either manually specify the root bridge by setting a low priority value or let the protocol elect the root bridge based on the switches’ MAC address and priority values.
  • Port roles: The role of each port on each switch for the instance. The port roles can be:
    • Root port: The port that connects to the root bridge or the shortest path to the root bridge.
    • Designated port: The port that connects to a non-root bridge and forwards traffic for the instance.
    • Alternate port: The port that provides an alternative path to the root bridge but is blocked to prevent loops.
    • Backup port: The port that provides a backup path to a designated port on the same switch but is blocked to prevent loops.
A network topology of 4 devices connected inside a MST Region

Configuring MST boundary

The third step is to configure an MST boundary. An MST boundary is a point where an MST region connects to another MST region or a non-MST network. One has to configure these parameters for each boundary:

  • Common and Internal Spanning Tree (CIST): The CIST is a special instance encompassing all VLANs and all switches in an MST region. It is used to communicate with other MST regions or non-MST networks. You need to configure the CIST root bridge and port roles for each boundary.
  • Common Spanning Tree (CST): The CST is a logical entity that represents the entire network as a single spanning tree. It is used to interconnect different MST regions or non-MST networks. You need to configure the CST root bridge and port roles for each boundary.

Let’s now understand the implementation of MSTP protocol with the help of a topology. In this topology there are four switches i.e., SW1, SW2, SW3, and SW4.  We have four VLANs namely VLAN 10, VLAN 20, VLAN 30, and VLAN 40. We also assume that we create two instances of spanning trees i.e., Instance one for VLAN 10 and VLAN 20, and Instance 2 for VLAN 30 and VLAN 40. Below, we have provided the topology for better understanding.

A network topology of 4 switches which shows the implementation of MSTP Protocol.

The first step is to define an MST region like we discussed above. In this case, we will define the MST region for SW1, SW2, and SW3. Let’s name it REGION1 and assign it a revision number of 1. Further, we map  VLAN 10 and VLAN 20 to Instance 1, and VLAN 30 and VLAN 40 to Instance 2. We can use the commands as shown below on each switch.

switch(config)#spanning-tree mode mst

switch(config)#spanning-tree mst configuration

switch(config-mst)#name REGION1

switch(config-mst)#revision 1

switch(config-mst)#instance 1 vlan 10,20

switch(config-mst)#instance 2 vlan 30,40

switch(config-mst)#exit

Note: One must use the above command for each switch separately.

Moving on to the next step i.e., configure the root bridge priority and port priority for each instance in the region. We will make SW1 the root bridge for Instance 1, and SW2 the root bridge for Instance 2. We will also lower the port priority of SW3’s ports connected to SW1 and SW2 so that they become designated ports.

We can use the commands as discussed below on each switch:

SW1(config)# spanning-tree mst 1 priority 0

SW1(config)# spanning-tree mst 2 priority 4096

SW2(config)# spanning-tree mst 1 priority 4096

SW2(config)# spanning-tree mst 2 priority 0

SW3(config)# interface <interface_connected_to_SW1>

SW3(config-if)# spanning-tree mst 1 port-priority 128

SW3(config-if)# exit

SW3(config)# interface <interface_connected_to_SW2>

SW3(config-if)# spanning-tree mst 2 port-priority 128

SW3(config-if)# exit

Let’s now understand the MSTP protocol frame in detail.

Multiple Spanning Tree Protocol Frame

MSTP makes use of BPDUs (Bridge Protocol Data Units) in order to exchange information between spanning tree-compatible devices. BPDUs can be explained as special frames that hold information such as bridge ID, root ID, port ID, etc. These are sent periodically or when there is a topology change.

A table of 2 columns with various fields and byte of MSTP Protocol frame.

Below, we have explained all the fields in the BPDU.

NOTE: The first 13 fields are the same as RSTP BPDU. The other six fields we have explained.

  • Version 3 Length: A value that indicates the length of the BPDU in bytes for MSTP compatibility.
  • MST Configuration Identifier: A set of values that identify the MST region and its configuration parameters, such as region name, revision number, and VLAN-to-instance mapping digest (a hash value derived from the mapping table).
  • CIST Internal Root Path Cost: A value that indicates the cost of the path from the sender to the root bridge for the CIST within an MST region.
  • CIST Bridge Identifier: A value that identifies the sender bridge for the CIST within an MST region.
  • CIST Remaining Hops: A value that indicates how many hops a BPDU can traverse before it is discarded within an MST region.
  • MSTI Configuration Messages: A set of messages that contain information about each MST instance, such as instance number, root identifier, root path cost, bridge identifier, port identifier, flags, remaining hops, etc.

Let’s now discuss the advantages and disadvantages of MSTP Protocol.

Advantages of Multiple Spanning Tree Protocol

Some of the advantages of multiple spanning tree protocol are:

  • Firstly, it assists in reducing the number of spanning tree instances and BPDUs, which directly helps save the CPU and memory resources on the switches.
  • Better utilization of redundant links and load balancing across different VLANs.
  • It also assists in simplifying the network configuration and management by using a common set of parameters for all instances within a region.
  • It offers backward compatibility with other spanning tree protocols, such as STP or RSTP.

Disadvantages of Multiple Spanning Tree Protocol

Apart from all the advantages we have just discussed, MSTP has some disadvantages. Some of these are:

  • Firstly, it demands careful planning and design of the network topology and VLAN-to-instance mapping to avoid suboptimal paths or loops.
  • Requires consistent configuration of the MST region parameters on all switches in the region in order to avoid region mismatch or misconfiguration errors.
  • It is not always necessary that it supports some legacy or third-party devices that do not implement MSTP.

These are the advantages and disadvantages of MSTP Protocol.

Frequently Asked Questions

Q1. What is difference between RSTP and MSTP?

RSTP and MSTP are types of Spanning Tree Protocols mainly used to prevent network loops. The main difference between the RSTP and MSTP is that in the case of RSTP, it supports only one instance of a spanning tree. On the other hand, MSTP supports multiple instances for different VLANs.

Q2. What is the primary purpose for MSTP?

The primary purpose of MSTP is to allow multiple VLANs to share a single spanning tree instance. This result reduces the number of logical links and improves network efficiency.

Q3. What is MSTP in telecom?

MSTP in telecom stands for multi-service transport platform. It is based on SDH (Synchronous Digital Hierarchy) and provides unified network management.

Q4. What is the difference between MSTP and PVST?

MSTP and PVST are both spanning tree protocols. MSTP maps multiple VLANs to a single spanning tree instance, while PVST runs a separate spanning tree instance for each VLAN.

Conclusion

In this blog, we have explained the MSTP or multiple spanning tree protocol. We have discussed the purpose of the MSTP protocol, its implementation, advantages, and disadvantages. We also have explained the different fields in the MSTP protocol frame.

Still, if you have any doubts, feel free to use the comment section below.

Recent Blog Post

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram