Smart Link+Monitor Link组网
1.技术背景及原理
一般情况下,Smart Link只能感知与其接口直连的链路故障。将Monitor Link配置在Smart Link的上游设备上,可使Smart Link迅速感知上游链路故障,进行链路切换。Smart Link与Monitor Link配合使用,扩大了Smart Link的应用场景范围,使组网构建更为灵活。
2.实验拓扑
3.基础配置
[SW1]dis cu
#
sysname SW1
#
vlan batch 10 20 100
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 100
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 100
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 10
#
interface GigabitEthernet0/0/4port link-type accessport default vlan 20
#
[SW2]dis cu
#
sysname SW2
#
vlan batch 10 20 100
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 100stp disablesmart-link flush receive control-vlan 100 password simple huawei@123
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 100stp disablesmart-link flush receive control-vlan 100 password simple huawei@123
#
monitor-link group 1port GigabitEthernet0/0/1 uplinkport GigabitEthernet0/0/2 downlink 1
#
[SW3]dis cu
#
sysname SW3
#
vlan batch 10 20 100
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 100stp disablesmart-link flush receive control-vlan 100 password simple huawei@123
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 100stp disablesmart-link flush receive control-vlan 100 password simple huawei@123
#
monitor-link group 1port GigabitEthernet0/0/2 uplinkport GigabitEthernet0/0/1 downlink 1
#
[SW4]dis cu
#
sysname SW4
#
vlan batch 10 20 100
#
stp region-configurationinstance 20 vlan 20active region-configuration
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 20 100stp disable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 20 100stp disable
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 10
#
interface GigabitEthernet0/0/4port link-type accessport default vlan 20
#
smart-link group 1load-balance instance 20 slaverestore enablesmart-link enableport GigabitEthernet0/0/1 masterport GigabitEthernet0/0/2 slavetimer wtr 30flush send control-vlan 100 password simple huawei@123
#
4.重点配置
[SW3]monitor-link group 1
[SW3-mtlk-group1]port GigabitEthernet 0/0/2 uplink
[SW3-mtlk-group1]port GigabitEthernet 0/0/1 downlink
[SW3]int GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]smart-link flush receive control-vlan 100 password simple huawei@123
[SW3]int GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]smart-link flush receive control-vlan 100 password simple huawei@123
[SW2]monitor-link group 1
[SW2-mtlk-group1]port GigabitEthernet 0/0/1 uplink
[SW2-mtlk-group1]port GigabitEthernet 0/0/2 downlink
[SW2]int GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]smart-link flush receive control-vlan 100 password simple huawei@123
[SW2]int GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]smart-link flush receive control-vlan 100 password simple huawei@123
[SW4-mst-region]di th
#
stp region-configuration
instance 20 vlan 20
active region-configuration
#
[SW4-smlk-group1]di th
#
smart-link group 1
load-balance instance 20 slave
restore enable
smart-link enable
port GigabitEthernet0/0/1 master
port GigabitEthernet0/0/2 slave
timer wtr 30
flush send control-vlan 100 password simple huawei@123
#
5.实验现象
负载分担已经实现
将SW2的上行链路shutdown
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]shutdown
再看SW3的G0/0/1抓包情况,流量走备份链路