[Computer Network] --- MSTP operating principle and configuration (basic)

foreword

We introduced STP and RSTP in the previous blog. Although RSTP has greatly improved STP, it still has some shortcomings. The highest level in the spanning tree is MSTP. Let's talk about the operation principle of MAST, and explain some basic MSTP knowledge. In a few days, I will post another MSTP advanced related knowledge (not yet haha).

1. Insufficient STP and RSTP

RSTP modifies and optimizes STP, and realizes the rapid convergence of network topology (P/A mechanism).
But in this case, all the underlying VLANs are sharing a spanning tree, and the blocked port is in the discarding state and does not forward any traffic. After a long time, it will be highlighted that the two cannot achieve load sharing of traffic between VLANs and link bandwidth l Problems such as low utilization rate, low utilization rate of equipment resources, and optimal path at the second level of equipment.
Let's take an example to illustrate the shortcomings of the two: as shown in the
insert image description here
figure:
Xiaoming, Xiaohong and Xiaolan all want to go to school (LAN), but because the STP/RSTP computing link ③ is blocked, so Xiaoming can only go to school through the route ①②④ , Xiaohong goes to school through route ②④, and Xiaolan goes to school through route ④. There must be no loss for Xiaohong and Xiaolan, but what about Xiaoming? There is a road leading to the school in front of my house, but I was forced to walk a long way. ②There are too many people (data) on the link and I have to queue up, but there is a short-cut road that no one walks in front of my house. This is also the problem of the inability to achieve load sharing of traffic between VLANs, the low utilization of link bandwidth, the low utilization of equipment resources, and the two-level optimal path of the equipment mentioned above.

Second, the principle of MSTP protocol overview

MSTP is backward compatible with RSTP and STP (two of the three devices run RSTP, if one runs MSTP, the device running MSTP will be backward compatible and change to run RSTP)
The idea of ​​MSTP is to map one or more vlans to an instance (instance), and then calculate the spanning tree separately according to the instance, and the vlans in the instance share the calculated spanning tree.
For example
insert image description here
, if there are 10 students (vlan) in two campuses who want to go to the museum, but they are not in the same campus, and the optimal routes to the museum are different, according to the idea of ​​MSTP, a teacher Wang will be sent to lead A. Students in the campus, send a teacher Li to lead the students in the B campus. Each campus will plan the optimal path to the destination without interfering with each other. After the teacher (instance) plans the route, the students in the campus (vlan) led by the teacher ) follow the optimal route calculated by the teacher, which can not only achieve fast convergence, but also provide redundant backup paths for data forwarding, and also achieve load balancing of vlan data.

3. MSTP basic configuration commands

Huawei devices have MSTP working mode enabled by default, so no configuration is required
1. Enter the MST domain view

[huawei]stp region-configuration

2. Configure the MST domain name

[huawei-mast-region]region-mame name

3. Configure the mapping relationship between spanning tree instances and vlans

[huawei-mast-region]instance {
    
    instance-id} vlan {
    
    vlan-id[to vlan-id2]} //默认全部映射到instance 0 上面

4. Configure the mst revision level (non) of the MST domain

[huawei-mast-region]revision-level {
    
    level}

5. It is very important to activate the configuration of the MST domain
, otherwise the above configuration will not take effect! ! !

[huawei-mast-region]active region-configuration

MSTP optional configuration commands (depending on requirements)

1. Configure root bridge or backup root bridge

[huawei]stp instance {
    
    instance-id} root {
    
    primary | secondard}

2. Configure the priority of the specified switching device in the specified instance (this is the default system priority of 32768)

[huawei]stp instance [instance-id] priority [ priority ]

3. Configure the operation of the specified switching device in the specified instance to obey the algorithm and path cost
insert image description here

[huawei g 0/0/1]stp instance [instance-id] cost [cost]

4. Configure the priority of the port in the specified spanning tree instance in the specified device (this is the default port priority of 128)
[huawei g 0/0/1]stp instance [instance-id] port priority [priority]

Guess you like

Origin blog.csdn.net/xiaobai729/article/details/124034047