Day8 MSTP

Day8 MSTP

1.技术背景

单生成树在多vlan的网络中会导致:

- 部分vlan的数据不通
- 无法实现流量的负载分担
- 对于某些vlan,出现次优的二层路径

2.实现原理

设想:让每个vlan单独维护一个生成树,但是VLAN太多,会导致交换机运算消耗太大的运算资源。

MSTP: 多实例生成树 【multiple instance Spanning Tree Protocol】

IEEE:802.1S

生成树的维护,不再是一个,
如果想在网络中创建多个生成树,创建多个实例就可以,把符合某个实例路径的vlan映射到这个实例下。

3.配置过程

image-20230326115617999

1.VLAN和Trunk的基础配置

# VLAN 的配置 SW1-SW4
vlan batch 1 to 20

# Trunk链路 SW1-SW4的 G0/0/1和G0/0/2
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 20

# SW3的access接口 E0/0/1连接 vlan10的用户

interface Ethernet0/0/1
port link-type access
port default vlan 10

# SW4的access接口 E0/0/1连接 vlan20的用户
interface Ethernet0/0/1
port link-type access
port default vlan 20

2.交换的实例的部署

# SW1-SW4
stp region-configuration    # 进入交换机的域
region-name Huawei 		    # 域的名字---所有的交换机想要同步实例,域的名字必须相同
instance 1 vlan 1 to 10     # 将vlan1-10 映射到 实例1
instance 2 vlan 11 to 20    # 将vlan11-20 映射到 实例2
active region-configuration # 激活这个域的配置(不激活不生效)

3.根据实例去选择交换机的主备根桥

# SW1要成为实例1的主根桥 成为实例2的备根桥
stp instance 1 root primary
stp instance 2 root secondary

# SW2要成为实例2的主根桥 成为实例1的备根桥
stp instance 1 root secondary
stp instance 2 root primary

4.路径规划

# SW3
interface GigabitEthernet0/0/2
stp instance 2 cost 200000

# SW4
interface GigabitEthernet0/0/2
stp instance 1 cost 200000

5.配置边缘端口

# SW3和SW4
interface Ethernet0/0/1
stp edged-port enable

1 cost 200000




5.配置边缘端口

```sh
# SW3和SW4
interface Ethernet0/0/1
stp edged-port enable
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值