07-Monitor Link(端口联动)

具体使用场景可根据实际情况灵活应用。

技术简介

Monitor Link是一种接口联动方案,通过监控设备的上行接口,根据其up/down状态的变化来触发下行接口up/down状态的变化,从而触发下游设备上的拓扑协议进行链路的切换。

在这里插入图片描述
每个Monitor Link组都由上行接口和下行接口这两种成员接口组成,一个Monitor Link组可以有多个上行接口或下行接口,但一个接口只能属于一个Monitor Link组。

上行接口是被监控的接口,其所在链路被称为上行链路。Monitor Link组的状态与该接口的状态保持联动,当Monitor Link组中没有上行接口或所有上行接口都down时,Monitor Link组就处于down状态;而只要有一个上行接口up,Monitor Link组就处于up状态。

下行接口是监控接口,其所在链路被称为下行链路。该接口的状态与Monitor Link组的状态保持联动,当Monitor Link组的up/down状态发生改变时,下行接口的状态就会发生相应的改变,从而与Monitor Link组的状态保持一致。Device B的接口Port 1和Port 2组成了一个Monitor Link组,其中Port 1为上行接口,该接口所在的链路为上行链路;Port 2为下行接口,该接口所在的链路为下行链路。Device D上的情形也与Device B类似。

Monitor Link在运行中遵循以下机制:
每个Monitor Link组独立进行上行接口的监控和下行接口的联动。当Monitor Link组中没有上行接口或所有上行接口都down时,Monitor Link组就处于down状态,并将强制使其所有下行接口的状态都变为down;而只要有一个上行接口由down变为up,Monitor Link组的状态就恢复为up,并使其所有下行接口的状态都恢复为up。

配置案例

Device C为Smart Link设备,Device A、Device B和Device D为相关设备。Device C上VLAN 1~30的流量通过Smart Link组双上行到Device A。通过配置,在Device C上实现双上行链路的灵活备份,并且当Device A与Device B(或Device D)之间出现链路故障时,Device C能够感知到这个故障并完成其上行链路的切换。

在这里插入图片描述
配置步骤:
(1)配置DeviceC
创建VLAN1~30,将这些VLAN都映射到MSTI1上,并激活MST域的配置。
system-view
[DeviceC]vlan1to30
[DeviceC]stpregion-configuration
[DeviceC-mst-region]instance1vlan1to30
[DeviceC-mst-region]activeregion-configuration
[DeviceC-mst-region]quit
分别关闭端口GigabitEthernet3/0/1和GigabitEthernet3/0/2,在这两个端口上分别关闭生成树协议,并将端口配置为Trunk端口且允许VLAN1~30通过。
[DeviceC]interfaceGigabitEthernet3/0/1
[DeviceC-GigabitEthernet3/0/1]shutdown
[DeviceC-GigabitEthernet3/0/1]undostpenable
[DeviceC-GigabitEthernet3/0/1]portlink-typetrunk
[DeviceC-GigabitEthernet3/0/1]porttrunkpermitvlan1to30
[DeviceC-GigabitEthernet3/0/1]quit
[DeviceC]interfaceGigabitEthernet3/0/2
[DeviceC-GigabitEthernet3/0/2]shutdown
[DeviceC-GigabitEthernet3/0/2]undostpenable
[DeviceC-GigabitEthernet3/0/2]portlink-typetrunk
[DeviceC-GigabitEthernet3/0/2]porttrunkpermitvlan1to30
[DeviceC-GigabitEthernet3/0/2]quit
创建SmartLink组1,并配置其保护VLAN为MSTI1所映射的VLAN。
[DeviceC]smart-linkgroup1
[DeviceC-smlk-group1]protected-vlanreference-instance1
配置SmartLink组1的主端口为GigabitEthernet3/0/1,从端口为GigabitEthernet3/0/2。
[DeviceC-smlk-group1]portGigabitEthernet3/0/1primary
[DeviceC-smlk-group1]portGigabitEthernet3/0/2secondary
在SmartLink组1中使能发送Flush报文的功能。
[DeviceC-smlk-group1]flushenable
[DeviceC-smlk-group1]quit
重新开启端口GigabitEthernet3/0/1和GigabitEthernet3/0/2。
[DeviceC]interfaceGigabitEthernet3/0/1
[DeviceC-GigabitEthernet3/0/1]undoshutdown
[DeviceC-GigabitEthernet3/0/1]quit
[DeviceC]interfaceGigabitEthernet3/0/2
[DeviceC-GigabitEthernet3/0/2]undoshutdown
[DeviceC-GigabitEthernet3/0/2]quit
(2)配置DeviceA
创建VLAN1~30。
system-view
[DeviceA]vlan1to30
分别将端口GigabitEthernet3/0/1和GigabitEthernet3/0/2配置为Trunk端口且允许VLAN1~30通过,并在这些端口上都使能接收Flush报文的功能。
[DeviceA]interfaceGigabitEthernet3/0/1
[DeviceA-GigabitEthernet3/0/1]portlink-typetrunk
[DeviceA-GigabitEthernet3/0/1]porttrunkpermitvlan1to30
[DeviceA-GigabitEthernet3/0/1]smart-linkflushenable
[DeviceA-GigabitEthernet3/0/1]quit
[DeviceA]interfaceGigabitEthernet3/0/2
[DeviceA-GigabitEthernet3/0/2]portlink-typetrunk
[DeviceA-GigabitEthernet3/0/2]porttrunkpermitvlan1to30
[DeviceA-GigabitEthernet3/0/2]smart-linkflushenable
[DeviceA-GigabitEthernet3/0/2]quit
(3)配置DeviceB
创建VLAN1~30。
system-view
[DeviceB]vlan1to30
分别将端口GigabitEthernet3/0/1和GigabitEthernet3/0/2配置为Trunk端口且允许VLAN1~30通过,在端口GigabitEthernet3/0/2上关闭生成树协议,并在这些端口上都使能接收Flush报文的功能。
[DeviceB]interfaceGigabitEthernet3/0/1
[DeviceB-GigabitEthernet3/0/1]portlink-typetrunk
[DeviceB-GigabitEthernet3/0/1]porttrunkpermitvlan1to30
[DeviceB-GigabitEthernet3/0/1]smart-linkflushenable
[DeviceB-GigabitEthernet3/0/1]quit
[DeviceB]interfaceGigabitEthernet3/0/2
[DeviceB-GigabitEthernet3/0/2]undostpenable
[DeviceB-GigabitEthernet3/0/2]portlink-typetrunk
[DeviceB-GigabitEthernet3/0/2]porttrunkpermitvlan1to30
[DeviceB-GigabitEthernet3/0/2]smart-linkflushenable
[DeviceB-GigabitEthernet3/0/2]quit
创建MonitorLink组1,并配置该组的上行接口为GigabitEthernet3/0/1,下行接口为GigabitEthernet3/0/2。
[DeviceB]monitor-linkgroup1
[DeviceB-mtlk-group1]portGigabitEthernet3/0/1uplink
[DeviceB-mtlk-group1]portGigabitEthernet3/0/2downlink
[DeviceB-mtlk-group1]quit
(4)配置DeviceD
创建VLAN1~30。
system-view
[DeviceD]vlan1to30
分别将端口GigabitEthernet3/0/1和GigabitEthernet3/0/2配置为Trunk端口且允许VLAN1~30通过,在端口GigabitEthernet3/0/2上关闭生成树协议,并在这些端口上都使能接收Flush报文的功能。
[DeviceD]interfaceGigabitEthernet3/0/1
[DeviceD-GigabitEthernet3/0/1]portlink-typetrunk
[DeviceD-GigabitEthernet3/0/1]porttrunkpermitvlan1to30
[DeviceD-GigabitEthernet3/0/1]smart-linkflushenable
[DeviceD-GigabitEthernet3/0/1]quit
[DeviceD]interfaceGigabitEthernet3/0/2
[DeviceD-GigabitEthernet3/0/2]undostpenable
[DeviceD-GigabitEthernet3/0/2]portlink-typetrunk
[DeviceD-GigabitEthernet3/0/2]porttrunkpermitvlan1to30
[DeviceD-GigabitEthernet3/0/2]smart-linkflushenable
[DeviceD-GigabitEthernet3/0/2]quit
创建MonitorLink组1,并配置该组的上行接口为GigabitEthernet3/0/1,下行接口为GigabitEthernet3/0/2。
[DeviceD]monitor-linkgroup1
[DeviceD-mtlk-group1]portGigabitEthernet3/0/1uplink
[DeviceD-mtlk-group1]portGigabitEthernet3/0/2downlink
[DeviceD-mtlk-group1]quit

通过使用display monitor-link group命令可以查看各设备上Monitor Link组的信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

劉小健

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值