Multiple Spanning Tree Protocol MSTP

1. Introduction to MSTP

RSTPImprovements have been made on STPthe basis to realize fast convergence of network topology. But RSTPthere STPis still the same defect: because all VLANthe spanning trees in the LAN share the same spanning tree, it is impossible VLANto achieve load balancing of data traffic among them. After the link is blocked, it will not carry any traffic, resulting in waste of bandwidth, and may also cause some VLANpackets cannot be forwarded.

MSTP兼容STP和RSTP,既可以快速收敛,又提供了数据转发的多个冗余路径,在数据转发过程中实现VLAN数据的负载均衡。

By MSTPdividing a switching network into multiple domains, multiple spanning trees are formed in each domain, and the spanning trees are independent of each other. Each spanning tree is called one 多生成树实例MSTI(Multiple Spanning Tree Instance), and each domain is called aMST域(MST Region:Multiple Spanning Tree Region)

2. MSTP experimental case

Experimental requirements:

  • 1) Create VLAN10 and VLAN20 for each switch
  • 2) All interface trunks of the switch can carry VLAN10 VLAN20
  • 3) Configure SMTP, block the g0/0/9 interface of LSW3 on VLAN10, and block the g0/0/17 interface of LSW5 on VLAN20

As shown in the figure , each switch is marked BID, among which LSW3is the root bridge, and the blocked port is LSW5. G0/0/13If the same spanning tree is shared with the switch, the load of the switch will be too large, so it needs to be configured to use a different spanning tree instance 1 , Each switch is created , and the interface type of the switch is configured to be able to carry ( you can see that the corresponding interface of the switch is added to the corresponding interface through the command )VLAN10VLAN20LSW4MSTPVLAN10VLAN20
insert image description hereVLAN10、VLAN20Trunkvlan10 vlan20display vlanVLAN

#LSW1
<Huawei>sys
[Huawei]undo info-center enable 
[Huawei]vlan batch 10 20
[Huawei]int g0/0/8
[Huawei-GigabitEthernet0/0/8]port link-type trunk 
[Huawei-GigabitEthernet0/0/8]port trunk allow-pass vlan 10 20

[Huawei-GigabitEthernet0/0/8]int g0/0/12
[Huawei-GigabitEthernet0/0/12]port link-type trunk 
[Huawei-GigabitEthernet0/0/12]port trunk allow-pass vlan 10 20     
#同样,对交换机LSW3、LSW4、LSW5进行相同的配置      

insert image description here2. Configure MSTP, create on each switch MSTP域, and create corresponding instances (using display stp briefcommands, you can view STPthe interface status of all instances)

#LSW1
[Huawei]stp region-configuration        #进入MSTP域视图
[Huawei-mst-region]region-name RG1      #配置MSTP域的域名为RG1,需要将各设备的MSTP域的域名设置一致
[Huawei-mst-region]instance 1 vlan 10   #配置多生成树实例和VLAN的映射关系,实例1承载VLAN10
[Huawei-mst-region]instance 2 vlan 20   #配置多生成树实例和VLAN的映射关系,实例2承载VLAN20
[Huawei-mst-region]active region-configuration    # 激活MSTP域的配置
#同样,对交换机LSW3、LSW4、LSW5进行相同的配置   

insert image description here3. Configure different instances to carry different VLAN
 1) configurationsMSTP实例1

  • LSW3To make the interface blocked by MSTP instance 1 g0/0/9, make it LSW5the root bridge of MSTP instance 1
#LSW5
[Huawei]stp instance 1 root primary    #配置当前设备为实例1的根桥设备
  • After configuration, you can use display stp instance 1the command to view the information of instance 1, and you can see that BIDthe priority of instance 1 has changed to 0
    insert image description here
  • At this point, check the interface status LSW3of STPthe instance, and you can see that g0/0/9the interface of instance 1 becomes blocked. If VLAN10you want to communicate, you can only passLSW4
    insert image description here

If g0/0/17it is a blocked port, g0/0/9it is a root port. At this time, you need to configure the LSW4bridge priority of the switch corresponding to instance 1 to make it higher than the priority LSW1of the bridge corresponding to instance 1.

 2), configurationMSTP实例2

  • LSW5Similarly, to make the interface blocked by MSTP instance 2 g0/0/17, make it LSW3the root bridge of MSTP instance 2
#LSW3
[Huawei]stp instance 2 root primary    #配置当前设备为实例2的根桥设备
  • BIDCheck the information of instance 2 after configuration, you can see that the priority of instance 2 has changed to 0
    insert image description here
  • At this time, check the interface status LSW5of STPthe instance, and you can see that the g0/0/13interface of instance 2 becomes blocked
    insert image description here
  • Our purpose is to block g0/0/17, so we need to configure LSW1the bridge priority of the switch corresponding to instance 2 so that its priority is higher than that LSW4of the bridge corresponding to instance 2
#LSW1
stp instance 2 priority 8192	#优先级是4096的倍数
  • Check the interface status of the STP instance after configuration LSW5. You can see that the g0/0/17interface of instance 2 becomes blocked. At this time, if VLAN20you want to communicate, you need to LSW1forward data; VLAN10for communication, you need to LSW4forward data to achieve VLANload balancing among different users.
    insert image description here

Guess you like

Origin blog.csdn.net/weixin_45954730/article/details/130544437