首页 > 编程知识 正文

Smart Link与Monitor Link的配置

时间:2023-05-04 05:33:18 阅读:227061 作者:1871

一。原理简述

在以太网的网络中,为了提高网络的可靠性,一般采用双归属上行方式进行组网,就是指交换机同时连接着两台上行交换机,可是存在一些问题,例如二层网络中可能存在环路问题。其解决方法是采用STP技术,但是这样的方式也存在着弊端,STP的收敛时间较长,当主用链路发生故障时,将流量转到备用链路上,而且效果非常不明显。

所以呢,就需要采用Smart Link的方式。网络中两条上行链路在正常的情况下,是只有一条链路处于连通状态,另一条是处于阻塞状态的,从而防止了环路引起的广播风暴。当主用链路发生故障后,流量会以毫秒的时间乐观的母鸡迅速的转换到备用链路上,以至于保证正常的转发操作。在默认的情况下,当原主用链路恢复正常时,将会维持在阻塞的状态,不会发生抢占的情况,可以保证网络的稳定性。当然可以通过手工配置的方式回切到原主用链路。

Smart Link虽然能够保证设备在本设备上行链路发生故障后,迅速的进行转换,但是对于跨设备的链路故障是不能提供有效的保护的。在这样的情况下,需要采用Monitor Link方式。

Monitor Link用于扩展Smart Link的备份范围,通过监控上游设备的上行链路,达到上行链路故障后快速的传达给下游的设备,从而触发Smart Link的主备链路切换,可以防止长时间因为上行链路的故障而出现网络的终端现象,使Smart Link备份的作用发挥更完善。

二。实验目的

(1)理解Smart Link的应用环境;

(2)掌握Smart Link的基本配置方法;

(3)掌握Smart Link的回切功能的配置方式;

(4)掌握Monitor Link的基本配置;

三。实验内容

为了实现主备链路冗余备份及故障后的快速迁移,现需要部署使用Smart Link技术,且为了进一步扩展Smart Link的备份范围,使用Monitor Link联动方式监控上游设备的上行链路来完善Smart Link。

四。实验拓扑

五。实验操作 1.配置Smart Link

为了实现主备链路冗余备份及快速迁移,现在要在交换机S1上部署Smart Link。使用smart-link group 命令创建Smart Link组,并开启Smart Link组功能。

[S1]smart-link group 1[S1-smlk-group1]smart-link enable

在华为的设备上,默认是开启生成树协议的,但是在配置Smart Link时,需要在运行Smart Link的接口上关闭生成树的协议。若没有在相关的接口下关闭该协议,会出现报错的现象。

[S1]int e0/0/3[S1-Ethernet0/0/3]stp disable //关闭STP生成树协议

而且在配置的时候,需要在Smart Link组中,指定主接口和备份接口。可以使用display smart-link group 命令查看相关的配置信息,及主备状态。

[S1]smart-link group 1[S1-smlk-group1]port Ethernet 0/0/3 master //设置为主接口[S1-smlk-group1]port Ethernet 0/0/4[S1-smlk-group1]port Ethernet 0/0/4 slave //设置为备份接口[S1]dis smart-link group 1 //查看主备状态Smart Link group 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Active 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Inactive 0 0000/00/00 00:00:00 UTC+00:00 2.配置回切功能

当主接口发生故障关闭时,备份接口会快速的切换为Active状态。在默认的情况下,当原接口恢复到正常的状态后,是不会再切换回来了,需要手工配置回切功能。

[S1]int e0/0/3[S1-Ethernet0/0/3]shutdown //模拟主接口的故障[S1]dis smart-link group 1 //查看主备状态Smart Link group 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Inactive 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Active 0 0000/00/00 00:00:00 UTC+00:00 //发现:主接口与备份接口的状态已经发生转换[S1]int e0/0/3[S1-Ethernet0/0/3]undo shutdown //恢复主接口的正常[S1]dis smart-link group 1Smart Link group 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Inactive 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Active 0 0000/00/00 00:00:00 UTC+00:00 //发现:当主接口恢复正常后,状态时没有发生改变的

如果需要原主链路恢复为Active状态,可以通过配置Smart Link组回切功能,在回切定时器超时后会自动切换到主链路。

使用restore enable 命令开启回切功能,将回切时间设置为30s(默认为60s)。

[S1]smart-link group 1[S1-smlk-group1]restore enable //开启回切功能[S1-smlk-group1]timer wtr 30 //设置回切定时器时间为30秒[S1-smlk-group1]dis smart-link group 1Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Active 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Inactive 0 0000/00/00 00:00:00 UTC+00:00 3.配置Monitor Link

通过监控上游设备的上行链路,而对下行链路进行同步设置,达到上游设备的上行链路的故障迅速传达给下行设备,从而触发下游设备的Smart Link的主备链路切换,防止因长时间的上行链路故障而出现网络故障。

在正常的情况下,S1与S2之间的链路为主链路,当S2的上行接口GE0/0/1出现故障时,Smart Link时无法感知到的,不会对其进行切换,会导致网络中断。可以在S2上配置Monitor Link监控上行接口,当其发生故障时,会使Smart Link组发生切换。

[S2]int g0/0/1[S2-GigabitEthernet0/0/1]shu[S2-GigabitEthernet0/0/1]shutdown //关闭GE0/0/1接口,模拟上行接口的故障[S1]dis smart-link group 1Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Active 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Inactive 0 0000/00/00 00:00:00 UTC+00:00 //会发现:下行链路的交换机是不能感知到故障的,不会进行切换,将导致连接到S1交换机选择E0/0/3接口转发数据,无法正常通信。

在S2交换机上开启Monitor Link组,配置GE0/0/1为上行接口,E0/0/3为下行接口。配置完后查看其主备状态。

[S2]monitor-link group 1 //创建Monitor Link组[S2-mtlk-group1]port g0/0/1 uplink //配置上行接口[S2-mtlk-group1]port Ethernet 0/0/3 downlink //配置下行接口[S1]dis smart-link group 1Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Inactive 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Active 0 0000/00/00 00:00:00 UTC+00:00 //发现:接口状态发生了转换,保证的流量的正常转发

使用timer recover-time 命令修改Monitor Link组的回切时间(默认为3秒)。

[S2-mtlk-group1]timer recover-time 10[S2]int g0/0/1[S2-GigabitEthernet0/0/1]undo shutdown [S1]dis smart-link group 1Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-ccd6-7271 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- Ethernet0/0/3 Master Active 0 0000/00/00 00:00:00 UTC+00:00 Ethernet0/0/4 Slave Inactive 0 0000/00/00 00:00:00 UTC+00:00

会发现:当S2的上行接口GE0/0/1重新恢复正常以后,下行链路Smart Link组将在时间超时后,重新切换到主链路。

???思考:Smart Link和Monitor Link的联合使用可以确保链路出现故障后及时的进行切换,如果所有的链路都正常,是否所有数据都只能通过主链路转发?

Smart Link可以实现流量的负载分担,不同VLAN的流量会沿不同的Smart ink组所确定的路径进行转发。通过把一个端口配置为多个Smart Link组的成员端口(每个Smart Link组的保护VLAN不同),而且该端口在不同的组中的转发状态时不同的,就可以实现不同VLAN的数据流量的转发路径的不同,达到负载分担的目的,同时也可以通过配置使流量进行负载分担不止一条链路转发数据。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。