10分钟带你了解MSTP协议,附加配置MSTP实验
目录
一 MSTP协议
【1】STP和RSTP的局限性
【2】关于MSTP
【3】MSTP的基本思想
【4】MSTP的功能
【5】三种生成树的比较
【6】MSTP的域
【7】配置MSTP
二MTP实验题
一.MSTP协议
STP生成树协议
RSTP快速生成树协议
MATP多生成树协议
【1】STP和RSTP的局限性:所有VLAN 共享一颗生成树,无法实现多条VLAN再链路上的负载分担
【2】关于MSTP:
【3】MSTP的基本思想:
【4】MSTP的功能:mstp为每个实例计算出一颗树,防环的同时进行了冗余备份,实现VLAN之间的负载分担
【5】三种生成树的比较:
【6】MSTP的域:
注意:域名相同,修订级别(0-65535,默认为0)。VLAN映射(VLAN与映射的关系)三者都相同为一个域
【7】配置MSTP
【1.1】区域配置
注:instance 0为默认实例,如通VLAN1一样
【2.2】配置实例与vlan的映射关系,激活域
【3.3】配置交换机在每个实例中根的情况
注:修改优先级必须是4096的倍数,最小为0
二.实验题
SW1的代码:
<Huawei>system-view
[1]sysname W1
[W1] vlan batch 10 20
W1]int e0/0/1
[W1-Ethernet0/0/1]port hybrid pvid vlan 10
[W1-Ethernet0/0/1]port hybrid untagged vlan 10 20
[W1-Ethernet0/0/1]int e0/0/1
[W1-Ethernet0/0/1]int g0/0/2
[W1-GigabitEthernet0/0/2]p l t
[W1-GigabitEthernet0/0/2]p l a v a
^
Error:Ambiguous command found at '^' position.
[W1-GigabitEthernet0/0/2]p t a v a
[W1-GigabitEthernet0/0/2]int e0/0/2
[W1-Ethernet0/0/2]port hybrid pvid 10
^
Error: Unrecognized command found at '^' position.
[W1-Ethernet0/0/2]port hybrid pvid vlan 10
[W1-Ethernet0/0/2]port hybrid untagged vlan 10 20
[W1-Ethernet0/0/2]q
[W1]stp region-c
[W1]stp region-configuration
[W1-mst-region]region-na
[W1-mst-region]region-name WW
[W1-mst-region]instance 1 vlan 10
[W1-mst-region]instance 2 vlan 20
[W1-mst-region]active
[W1-mst-region]active re
[W1-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[W1-mst-region]stp instance
[W1-mst-region]stp instance 1 root
[W1-mst-region]stp instance 1 root primary
[W1-mst-region]stp instance 1 root primary
[W1]stp re
[W1]stp region-configuration
[W1-mst-region]stp instancce 2 root secondary
^
Error: Unrecognized command found at '^' position.
[W1-mst-region]stp instance 2 root secondary
SW2的代码
W2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[W2]int e0/0/1
[W2-Ethernet0/0/1]p h p v 20
[W2-Ethernet0/0/1]p h u v 10 20
[W2-Ethernet0/0/1]int g0/0/2
[W2-GigabitEthernet0/0/2]p l t
[W2-GigabitEthernet0/0/2]p t a v a
[W2-GigabitEthernet0/0/2]int e0/0/2
[W2-Ethernet0/0/2]port hybrid pvid 20
^
Error: Unrecognized command found at '^' position.
[W2-Ethernet0/0/2]port hybrid pvid vlan 20
[W2-Ethernet0/0/2]port hybrid untagged vlan 10 20
[W2-Ethernet0/0/2]q
[W2]stp re
[W2]stp region-configuration
[W2-mst-region]region-
[W2-mst-region]region-name WW
[W2-mst-region]instance 1 vlan 10
[W2-mst-region]instance 2 vlan 20
[W2-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[W2-mst-region]stp instance 2 root primary
[W2]stp region-
[W2]stp region-configuration
[W2-mst-region]stp instance 1 root secondary
SW2的代码
Huawei]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port hybrid untagged vlan 10 20
[Huawei-Ethernet0/0/1]port hybeid pvid vlan 10
^
Error: Unrecognized command found at '^' position.
[Huawei-Ethernet0/0/1]port hybrid pvid vlan 10
[Huawei-Ethernet0/0/1]int e 0/0/3
[Huawei-Ethernet0/0/3]port hybrid pvid vlan 10
[Huawei-Ethernet0/0/3]port hybrid tagged vlan 10 20
[Huawei-Ethernet0/0/3]int e0/0/4
[Huawei-Ethernet0/0/4]port hybrid pvid vlan 20
[Huawei-Ethernet0/0/4]port hybrid untagged vlan 10 20
[Huawei-Ethernet0/0/4]int e0/0/3
[Huawei-Ethernet0/0/3]undo port hybrid tagged vlan 10 20
[Huawei-Ethernet0/0/3]port hybrid untagged vlan 10 20
[Huawei-Ethernet0/0/3]int e0/0/2
[Huawei-Ethernet0/0/2]port hybrid pvid vlan 20
[Huawei-Ethernet0/0/2]port hybrid untagged vlan 10 20
[Huawei-Ethernet0/0/2]re
[Huawei-Ethernet0/0/2]restart
[Huawei-Ethernet0/0/2]q
[Huawei]re
[Huawei]stp region-configuration
[Huawei-mst-region]region-name WW
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
R1的代码
Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R1
[R1]INT
[R1]interface G0/0/0
[R1-GigabitEthernet0/0/0]IP ADDRESS 192.168.10.1 24
Apr 11 2021 20:16:17-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.20.1 24
Apr 11 2021 20:16:54-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]int loopback 0
[R1-LoopBack0]ip address 1.1.1.1 24
连接: