什么是MSTP?有哪些专业术语,附华为MSTP实验配置

什么是MSTP?有哪些专业术语,附华为MSTP实验配置

1概述mstp是多实例生成树,是IEEE802.1s中定义的生成树协议,通过生成多个生成树,来解决以太网环路问题。

作用在以太网中部署MSTP协议后可实现如下功能:

形成多棵无环路的树,解决广播风暴并实现冗余备份。多棵生成树在VLAN间实现负载均衡,不同VLAN的流量按照不同的路径转发。MSTP基本概念MST域(MST Region)都启动了MSTP。

具有相同的域名。具有相同的VLAN到生成树实例映射配置。具有相同的MSTP修订级别配置。一个局域网可以存在多个MST域,各MST域之间在物理上直接或间接相连。用户可以通过MSTP配置命令把多台交换设备划分在同一个MST域内。

VLAN映射表:VLAN映射表是MST域的属性,它描述了VLAN和MSTI之间的映射关系。

CST公共生成树CST(Common Spanning Tree)是连接交换网络内所有MST域的一棵生成树。

如果把每个MST域看作是一个节点,CST就是这些节点通过STP或RSTP协议计算生成的一棵生成树。

IST内部生成树IST(Internal Spanning Tree)是各MST域内的一棵生成树。

IST是一个特殊的MSTI,MSTI的ID为0,通常称为MSTI0。

IST是CIST在MST域中的一个片段。

SST运行STP或RSTP的交换设备只能属于一个生成树。

MST域中只有一个交换设备,这个交换设备构成单生成树。

CIST公共和内部生成树CIST(Common and Internal Spanning Tree)是通过STP或RSTP协议计算生成的,连接一个交换网络内所有交换设备的单生成树。

域根域根(Regional Root)分为IST域根和MSTI域根。

一个MST域内可以生成多棵生成树,每棵生成树都称为一个MSTI。MSTI域根是每个多生成树实例的树根。

总根总根是CIST(Common and Internal Spanning Tree)的根桥。

主桥主桥(Master Bridge)也就是IST Master,它是域内距离总根最近的交换设备。

端口角色根端口、指定端口、Alternate端口、Backup端口和边缘端口的作用同RSTP协议中定义。

除边缘端口外,其他端口角色都参与MSTP的计算过程。

同一端口在不同的生成树实例中可以担任不同的角色。

2实验2.1:实验目的实现trunk链路的负载均衡

2.2:实验环境ENSP三台交换机两台PC一台路由器2.3:实验拓扑结构图拓补图

2.4:实验配置代码语言:javascript代码运行次数:0运行复制SW1

undo terminal monitor

sys

[Huawei]sysn SW1

[SW1]user-interface console 0

[SW1-ui-console0]idle-timeout 0 0

[SW1]v b 10 20

[SW1]int e0/0/1

[SW1-Ethernet0/0/1]p h p v 10

[SW1-Ethernet0/0/1]p h u v a

[SW1-Ethernet0/0/1]int g0/0/1

[SW1-GigabitEthernet0/0/1]p l t

[SW1-GigabitEthernet0/0/1]p t a v a

[SW1-GigabitEthernet0/0/1]int g0/0/2

[SW1-GigabitEthernet0/0/2]p h p v 10

[SW1-GigabitEthernet0/0/2]p h u v 10 20

[SW1-GigabitEthernet0/0/2]q

[SW1]stp mode mstp

[SW1]stp region-configuration

[SW1-mst-region]region-name huawei

[SW1-mst-region]revision-level 1

[SW1-mst-region]instance 1 vlan 10

[SW1-mst-region]instance 2 vlan 20

[SW1-mst-region]active region-configuration

[SW1-mst-region]q

[SW1]stp instance 1 root primary

[SW1]stp instance 2 root secondary

代码语言:javascript代码运行次数:0运行复制SW2

undo terminal monitor

sys

[Huawei]sysn SW2

[SW2]user-interface console 0

[SW2-ui-console0]id

[SW2-ui-console0]idle-timeout 0 0

[SW2-Ethernet0/0/1]q

[SW2]v b 10 20

[SW2]int e0/0/1

[SW2-Ethernet0/0/1]p h p v 20

[SW2-Ethernet0/0/1]p h u v 10 20

[SW2-Ethernet0/0/1]int g0/0/1

[SW2-GigabitEthernet0/0/1]p l t

[SW2-GigabitEthernet0/0/1]p t a v a

[SW2-GigabitEthernet0/0/1]int g0/0/2

[SW2-GigabitEthernet0/0/2]p h p v 20

[SW2-GigabitEthernet0/0/2]p h u v 10 20

[SW2-GigabitEthernet0/0/2]q

[SW2]stp mode mstp

[SW2]stp region-configuration

[SW2-mst-region]region-name huawei

[SW2-mst-region]revision-level 1

[SW2-mst-region]instance 1 vlan 10

[SW2-mst-region]instance 2 vlan 20

[SW2-mst-region]active region-configuration

[SW2-mst-region]q

[SW2]stp instance 1 root secondary

[SW2]stp instance 2 root primary

代码语言:javascript代码运行次数:0运行复制SW3

undo terminal monitor

sys

[Huawei]sysn SW3

[SW3]user-interface console 0

[SW3-ui-console0]idle-timeout 0 0

[SW3]v b 10 20

[SW3]int e0/0/1

[SW3-Ethernet0/0/1]p h p v 10

[SW3-Ethernet0/0/1]p h u v 10 20

[SW3-Ethernet0/0/1]int e0/0/3

[SW3-Ethernet0/0/3]p h p v 10

[SW3-Ethernet0/0/3]p h u v 10 20

[SW3-Ethernet0/0/3]int e0/0/2

[SW3-Ethernet0/0/2]p h p v 20

[SW3-Ethernet0/0/2]p h u v 10 20

[SW3-Ethernet0/0/2]int e0/0/4

[SW3-Ethernet0/0/4]p h p v 20

[SW3-Ethernet0/0/4]p h u v 10 20

[SW3-Ethernet0/0/4]q

[SW3]stp mode mstp

[SW3]stp region-configuration

[SW3-mst-region]region-name huawei

[SW3-mst-region]revision-level 1

[SW3-mst-region]instance 1 vlan 10

[SW3-mst-region]instance 2 vlan 20

[SW3-mst-region]active region-configuration

代码语言:javascript代码运行次数:0运行复制R1

undo terminal mo

sys

[Huawei]sysn R1

[R1]user-interface console 0

[R1-ui-console0]idle-timeout 0 0

[R1-ui-console0]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 192.168.10.1 24

[R1-GigabitEthernet0/0/0]int g0/0/1

[R1-GigabitEthernet0/0/1]ip add 192.168.20.1 24

[R1-GigabitEthernet0/0/1]int loo 0

[R1-LoopBack0]ip add 1.1.1.1 32

2.5:实验总结代码语言:javascript代码运行次数:0运行复制undo terminal monitor 关闭提醒

sys

[SW]user-interface console 0

[SW-ui-console0]idle-timeout 0 0 设置永不超时

[SW]stp mode mstp stp模式设置为mstp

[SW]stp region-configuration 进入mstp区域设置

[SW-mst-region]region-name huawei 区域名称

[SW-mst-region]revision-level 1 版本级别为1

[SW-mst-region]instance 1 vlan 10 定义示例1为vlan10

[SW-mst-region]instance 2 vlan 20

[SW-mst-region]active region-configuration 对mstp配置保存

[SW-mst-region]q

[SW]stp instance 1 root primary 定义本交换机为实例1的根

[SW]stp instance 2 root secondary 定义本交换机为实例2的备选根

更多创意作品