4.3 MSTP基础配置

 

[S1]vlan batch 10 20
[S1]int e0/0/1
[S1-Ethernet0/0/1]port link-type trunk
[S1-Ethernet0/0/1]port trunk allow-pass vlan all
[S1-Ethernet0/0/1]int e0/0/2
[S1-Ethernet0/0/2]port link-type trunk
[S1-Ethernet0/0/2]port trunk allow-pass vlan all
[S1-Ethernet0/0/2]int e0/0/3
[S1-Ethernet0/0/3]port link-type access
[S1-Ethernet0/0/3]port default vlan 10

[S2]vlan batch 10 20
[S2]int e0/0/1
[S2-Ethernet0/0/1]port link-type trunk
[S2-Ethernet0/0/1]port trunk allow-pass vlan all
[S2-Ethernet0/0/1]int e0/0/2
[S2-Ethernet0/0/2]port link-type trunk
[S2-Ethernet0/0/2]port trunk allow-pass vlan all
[S2-Ethernet0/0/2]int e0/0/3
[S2-Ethernet0/0/3]port link-type access
[S2-Ethernet0/0/3]port default vlan 10

[S3]vlan batch 10 20
[S3]int e0/0/1
[S3-Ethernet0/0/1]port link-type trunk
[S3-Ethernet0/0/1]port trunk allow-pass vlan all
[S3-Ethernet0/0/1]int e0/0/2
[S3-Ethernet0/0/2]port link-type trunk
[S3-Ethernet0/0/2]port trunk allow-pass vlan all
[S3-Ethernet0/0/2]int e0/0/3
[S3-Ethernet0/0/3]port link-type access
[S3-Ethernet0/0/3]port default vlan 10
[S3-Ethernet0/0/3]int e0/0/4
[S3-Ethernet0/0/4]port link-type access
[S3-Ethernet0/0/4]port default vlan 20
通过抓包发现。VLAN 10 和VLAN 20 的数据都是通过S3的Ethernet0/0/1转发的。
#配置MSTP多实例
[S1]stp region-configuration                     //进入MST域视图
[S1-mst-region]region-name huawei                 //配置MST域名为huawei
[S1-mst-region]revision-level 1                     //配置MSTP修订级别为 1
[S1-mst-region]instance 1 vlan 10                 //指定VLAN 10 映射到MSTI 1
[S1-mst-region]instance 2 vlan 20                 //指定VLAN 10 映射到MSTI 2
[S1-mst-region]active region-configuration      //激活MST域设置

[S2]stp region-configuration
[S2-mst-region]region-name huawei
[S2-mst-region]revision-level 1
[S2-mst-region]instance 1 vlan 10
[S2-mst-region]instance 2 vlan 20
[S2-mst-region]active region-configuration

[S3]stp region-configuration
[S3-mst-region]region-name huawei
[S3-mst-region]revision-level 1
[S3-mst-region]instance 1 vlan 10
[S3-mst-region]instance 2 vlan 20
[S3-mst-region]active region-configuration
通过抓包发现。VLAN 10 和VLAN 20 的数据都仍然是通过S3的Ethernet0/0/1转发的。

#配置S2为MST实例2中的根交换机
[S2]stp instance 2 priority 0
抓包发现vlan 10 的数据通过S3的E0/0/1转发,vlan 20 的数据通过S3的E0/0/2转发,实现流量分担。
MSTP多实例的配置,可以达到流量分担的目的,有效利用网络资源,同时使得S3的两条上行链路可以相互备份。
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值