1.Basic configuration of MSTP 2. Configuration of combining MSTP and VRRP

1.Basic configuration of MSTP
2. Configuration of combining MSTP and VRRP
MSTP Overview

The so-called Instance instance in the multi-instance spanning tree: is actually a set corresponding to a set of VLANs
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MSTP supports single Region or multiple Regions, but in general. We all use a single domain. Multi-domain will be much more complicated than a single domain. The rules are also slightly different
Switches must be in the same Region before MSTP multi-instance spanning tree calculation can be performed normally.
MSTI (Multiple Spanning Tree Instance: multiple spanning tree instances)
Multiple spanning trees can be generated in an MST domain, and each spanning tree is called an MSTI.
MSTI uses Instance ID identification, and the value of Huawei devices is 0~4094.
VLAN mapping table: Attributes of the MST domain, describing the mapping relationship between VLAN and MSTI.
For MSTP to work properly, the VLANs of all switches must be bound to the instances. Totally consistent!!!
IST (Internal Spanning Tree, internal spanning tree)
It is a spanning tree within each MST domain. Refers to a default tree that is not bound to VLANs in other instances.
IST is a special MSTI, and the MSTI's Instance ID is 0. Another name for IST is MSTI 0. It is a special default tree.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Revision version, revision level
MSTP requires that all switches have the same modification level to work properly.

MSTP experiment, combined with VRRP configuration.
MSTP configuration ideas
1. Modify STP mode
2. Configure MSTP domain name
3. Configure the binding between VLAN and instance
4. Configure revision level
5. Activate configuration
6. The MSTP configuration of all switches is exactly the same.

Configure MSTP instance
SW1、SW2、SW3:
vlan batch 10 20
STP mode mstp
stp region-configuration
region-name name
instance 1 vlan 10
instance 2 vlan 20
revision-level 1
active region-configuration
[SW1]stp instance 1 priority 0
[SW1]stp instance 2 priority 4096
[SW2]stp instance 1 priority 4096
[SW2]stp instance 2 priority 0
Configure vlan division of interface type
View different instance interface types.
[SW3]dis stp instance 1 brief
MSTID Port Role STP State Protection
1 GigabitEthernet0/0/2 ALTE DISCARDING NONE
1 GigabitEthernet0/0/3 ROOT FORWARDING NONE
1 GigabitEthernet0/0/11 DESI FORWARDING NONE
[SW3]dis stp instance 2 brief
MSTID Port Role STP State Protection
2 GigabitEthernet0/0/2 ROOT FORWARDING NONE
2 GigabitEthernet0/0/3 ALTE DISCARDING NONE
2 GigabitEthernet0/0/12 DESI FORWARDING NONE
Successfully divided different vlans into different instances to realize link traffic diversion! !
Configure VRRP
SW1 is the gateway of vlan10, and SW2 is the gateway of vlan20. (The vrrp master device corresponding to the vlan gateway and the spanning tree root device of the instance where the vlan is located are the same switch, otherwise a suboptimal path will be formed)
Generally, MSTP and VRRP are used in combination. Things to note. The root of the MSTP instance needs to be on the same device as the VRRP master. Otherwise, there will be a suboptimal path problem for Layer 2 forwarding. This is common sense combined with both.

[SW1-Vlanif10]ip address 192.168.10.252 24
[SW1-Vlanif20]ip address 192.168.20.252 24
[SW1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW1-Vlanif10]vrrp vrid 10 priority 110
[SW1-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW2-Vlanif10]ip address 192.168.10.253 24
[SW2-Vlanif20]ip address 192.168.20.253 24
[SW2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[SW2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[SW2-Vlanif20]vrrp vrid 20 priority 110
vrrp vrid xx track interface g0/0/x reduced 10 //Track uplink status change priority
[SW1]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
10 Master Vlanif10 Normal 192.168.10.254
20 Backup Vlanif20 Normal 192.168.20.254
----------------------------------------------------------------
Total:2 Master:1 Backup:1 Non-active:0
[SW1]dis stp instance 1 brief
MSTID Port Role STP State Protection
1 GigabitEthernet0/0/1 DESI FORWARDING NONE
1 GigabitEthernet0/0/3 DESI FORWARDING NONE
Instance 1 and VRRPmaster are on the same device!

