H3C smart-link实验 C套拆解
- 一、项目拓扑
- 二、项目需求
- 三、配置步骤
- 1.vlan-trunk
- 2.STP
- 3.smart-link
- 四、测试
一、项目拓扑
二、项目需求
总部局域网内sw3进行双上行链路灵活备份,smart-link组1 引用实例1(绑定vlan10)的流量从经过sw1的链路通向出口路由器r1,而smart-link组2引用实例2(绑定vlan20)的流量从经过sw2的链路通向r2,而组1和组2 分别在vlan 100 和vlan 200内发送和接受flush报文
三、配置步骤
1.vlan-trunk
网络中有 Vlan10,Vlan20,Vlan100,Vlan200 一共 4 个Vlan,数据可以在所有链路上转发
- 创建vlan (
以SW1举例,在SW2、SW3上配置同样命令
)
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 100
[SW1-vlan100]vlan 200
- 更改链路类型为 trunk ,放行所有vlan(
以SW1举例,在SW2、SW3上配置同样命令
)
[SW1]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2
[SW1-if-range]port link-type trunk
[SW1-if-range]port trunk permit vlan all
2.STP
- 关闭全局stp
[SW1]undo stp global enable
[SW2]undo stp global enable
[SW3]undo stp global enable
- 关闭接口stp
部分情况下不能关闭全局stp,需关闭接口stp
[SW3]int ran g1/0/1 g 1/0/2
[SW3-if-range]undo stp enable
- 配置stp域
这里stp域不用于mstp,用于实例绑定vlan,smart-link组绑定实例
[SW3]stp region-configuration
[SW3-mst-region]region-name h3c //stp域名
[SW3-mst-region]instance 1 vlan 1 10 100 //实例1绑定vlan1 10 100 (绑定vlan1防止环路)
[SW3-mst-region]instance 2 vlan 20 200 //实例2绑定vlan20 200
[SW3-mst-region]active region-configuration //激活stp域
3.smart-link
- 配置smart-link组1
[SW3]smart-link group 1
[SW3-smlk-group1]preemption mode role //开启抢占模式
[SW3-smlk-group1]flush enable control-vlan 100 //flush控制vlan100
[SW3-smlk-group1]protected-vlan reference-instance 1 //smart-link绑定实例1
[SW3-smlk-group1]port GigabitEthernet 1/0/1 primary //主
[SW3-smlk-group1]port GigabitEthernet 1/0/2 secondary //备
- 配置smart-link组2
[SW3]smart-link group 2
[SW3-smlk-group2]preemption mode role
[SW3-smlk-group2]flush enable control-vlan 200
[SW3-smlk-group2]protected-vlan reference-instance 2
[SW3-smlk-group2]port g1/0/1 secondary
[SW3-smlk-group2]port g1/0/2 primary
- 查看smart-link组状态
[SW3]dis sm g all
- 在SW1 SW2的接口下开启flush报文接受功能
[SW1]int rang g1/0/1 g1/0/2
[SW1-if-range]smart-link flush enable control-vlan 100 200
[SW2]int rang g1/0/1 g1/0/2
[SW2-if-range]smart-link flush enable control-vlan 100 200