前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >什么是MSTP?有哪些专业术语,附华为MSTP实验配置

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

作者头像
网络技术联盟站
发布2023-03-13 21:28:26
7890
发布2023-03-13 21:28:26
举报
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
复制
SW1
<Huawei>undo terminal monitor 
<Huawei>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
复制
SW2
<Huawei>undo terminal monitor 
<Huawei>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
复制
SW3
<Huawei>undo terminal monitor 
<Huawei>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
复制
R1
<Huawei>undo terminal mo
<Huawei>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
复制
<Huawei>undo terminal monitor   关闭提醒
<Huawei>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的备选根
本文参与?腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2021-09-13,如有侵权请联系?cloudcommunity@tencent.com 删除

本文分享自 网络技术联盟站 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体分享计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 作用
  • MSTP基本概念
  • 2实验
    • 2.1:实验目的
      • 2.2:实验环境
        • 2.3:实验拓扑结构图
          • 2.4:实验配置
            • 2.5:实验总结
            相关产品与服务
            负载均衡
            负载均衡(Cloud Load Balancer,CLB)提供安全快捷的流量分发服务,访问流量经由 CLB 可以自动分配到云中的多台后端服务器上,扩展系统的服务能力并消除单点故障。负载均衡支持亿级连接和千万级并发,可轻松应对大流量访问,满足业务需求。
            领券
            问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
            http://www.vxiaotou.com