Overview of RSTP and MSTP protocols

Detailed knowledge of STP can be used to check the official account and to view the past articles. This paper mainly introduces the concepts of RSTP and MSTP, as well as the configuration examples of MSTP.




RSTP (fast spanning tree protocol) is developed from STP, which is consistent with the basic idea of STP. It has all the functions of STP and is compatible with STP operation.



RSTP and STP are different


  • Reduced port status

  • Added port role

  • BPDU format and sending method are different

  • When the switching network topology changes, RSTP can restore the network connectivity faster


    1. Port status of RSTP



2. Port role of RSTP





MSTP (multiple spanning tree protocol) calculates multiple spanning trees based on instances, and realizes load sharing among instances. It mainly solves the following limitations of STP/RSTP while having the advantages of STP and RSTP:

(1) All VLAN s share a spanning tree

(2) The load sharing of different VLAN s on multiple Trunk links cannot be realized


1. MST domain

MST Region: a collection of bridges with the same MST configuration ID

(1) Domain name

(2) Revision level

(3) VLAN mapping relationship



2. MSTP configuration instance


2.1 configuration topology



2.2 configuration requirements


(1) vlan10, vlan20, vlan30 and vlan30 are created on all switches and released on interfaces 1 and 2.

(2) Configure MSTP and SW1 as the primary root of instance 1 and the backup root of instance 2; SW1 is the primary root of instance 2 and the backup root of instance 1. The final effect is to eliminate the layer-2 loop by using MSTP technology. Instance 1 blocks two ports on SW2 and instance 2 blocks one port on SW2, so as to realize link backup and vlan based load balancing.


2.3 configuration steps


(1) Create vlan10, vlan20, vlan30 and vlan30 on each switch and release them on interfaces 1 and 2;

[SW1]vlan 10[SW1-vlan10]vlan 20[SW1-vlan20]vlan 30[SW1-vlan30]vlan 40[SW1-vlan40]quit[SW1][SW1]int g 1/0/1[SW1-GigabitEthernet1/0/1]port link-type trunk [SW1-GigabitEthernet1/0/1]port trunk permit  vlan 10 20 30 40[SW1-GigabitEthernet1/0/1]int g 1/0/2[SW1-GigabitEthernet1/0/2] port trunk permit vlan 1 10 20 30 40[SW1-GigabitEthernet1/0/2]quit[SW1]
[SW2]vlan 10[SW2-vlan10]vlan 20[SW2-vlan20]vlan 30[SW2-vlan30]vlan 40[SW2-vlan40]int g 1/0/1[SW2-GigabitEthernet1/0/1]port link-type trunk [SW2-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40[SW2-GigabitEthernet1/0/1]int g 1/0/2[SW2-GigabitEthernet1/0/2] port link-type trunk[SW2-GigabitEthernet1/0/2] port trunk permit vlan 1 10 20 30 40[SW2-GigabitEthernet1/0/2]quit[SW2]
[SW3]vlan 10 [SW3-vlan10]vlan 20[SW3-vlan20]vlan 30[SW3-vlan30]vlan 40[SW3-vlan40]int g 1/0/1[SW3-GigabitEthernet1/0/1]port link-type trunk [SW3-GigabitEthernet1/0/1]port trunk permit vlan 10 20 30 40[SW3-GigabitEthernet1/0/1]int g 1/0/2[SW3-GigabitEthernet1/0/2] port link-type trunk[SW3-GigabitEthernet1/0/2] port trunk permit vlan 1 10 20 30 40[SW3-GigabitEthernet1/0/2]quit[SW3]

(2) Configure MST domain on each switch. The domain name is h3c and the revision level is 1. Create Instance1 to map Vlan10 and Vlan20 and Instance2 to map Vlan30 and Vlan40. (Note: if there are VLANs without active mapping, the default mapping is in instance 0)

Description: 1 The revision level has no practical significance; The same MST domain must have the same domain name, revision level and VLAN mapping relationship (special attention should be paid to when troubleshooting MSTP).

[SW1]stp region-configuration [SW1-mst-region] region-name h3c[SW1-mst-region] revision-level 1[SW1-mst-region] instance 1 vlan 10 20 [SW1-mst-region] instance 2 vlan 30 40 [SW1-mst-region] active region-configuration

Note: be sure to use the active region configuration command to activate the configuration, otherwise the configuration will not take effect. When modifying MSTP configuration, you also need to click this command again, otherwise the modified configuration will not take effect

[SW2]stp region-configuration [SW2-mst-region] region-name h3c[SW2-mst-region] revision-level 1[SW2-mst-region] instance 1 vlan 10 20 [SW2-mst-region] instance 2 vlan 30 40 [SW2-mst-region] active region-configuration
[SW3]stp region-configuration [SW3-mst-region]region-name h3c[SW3-mst-region]revision-level 1[SW3-mst-region]instance 1 vlan 10 20[SW3-mst-region]instance 2 vlan 30  40[SW3-mst-region]active region-configuration


(3) Configure primary root and backup root

SW1 is the primary root of instance 1 and the backup root of instance 2; SW1 is the primary root of instance 2 and the backup root of instance 1.

Note: the purpose of this step is to block different ports based on different instances to solve the disadvantage that STP/RSTP cannot realize the load sharing of different VLAN s on multiple Trunk links.

[SW1]stp instance 1 root primary [SW1]stp instance 2 root secondary [SW1]
[SW2]stp instance 1 root secondary [SW2]stp instance 2 root primary [SW2]


2.4 configuration verification

On SW3, click dis stp brief to view the configuration. It can be seen that instance 1 blocks 2 ports of SW3 and instance 2 blocks 1 port of SW3, indicating that the configuration is successful.

[SW3]dis stp brief  MST ID   Port                                Role  STP State   Protection 0        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE 0        GigabitEthernet1/0/2                ALTE  DISCARDING  NONE 1        GigabitEthernet1/0/1                ROOT  FORWARDING  NONE 1        GigabitEthernet1/0/2                ALTE  DISCARDING  NONE 2        GigabitEthernet1/0/1                ALTE  DISCARDING  NONE 2        GigabitEthernet1/0/2                ROOT  FORWARDING  NONE


View the MSTP configuration command as dis STP region configuration

[SW3]dis stp region-configuration  Oper Configuration   Format selector      : 0   Region name          : h3c   Revision level       : 1   Configuration digest : 0xca136a235706b316c8db8f921067a68f​​   Instance  VLANs Mapped   0         1 to 9, 11 to 19, 21 to 29, 31 to 39, 41 to 4094   1         10, 20   2         30, 40[SW3]

You can see that the domain name is h3c and the revision level is 1. Instance 1 maps vlan10 and vlan20, instance 2 maps vlan30 and vlan40, and the default instance 0 maps all other VLANs.





Follow me and add wechat to get this configuration project, more configuration cases, the latest film and television and common office software

Keywords: network security switch H3C stp

Added by GrecoClub on Tue, 08 Feb 2022 07:32:33 +0200