HCNA-17 Smart Link与Monitor Link
1、 配置Smart Link 先在S1上创建Smart Link组1,再开启Smart Link组功能 <Huawei>system-view [Huawei]sysnames1 [s1]smart-link group 1 //创建Smart-link 组1 [s1-smlk-group1]smart-linkenable //开启Smart-link功能 [s1-smlk-group1]quit 注意:在配置Smart Link时,需要在运行Smart Link的接口下关闭生成树协议; [s1]port-groupgroup-member GigabitEthernet 0/0/2 GigabitEthernet 0/0/3 [s1-port-group]stpdisable //关闭STP功能 [s1-port-group]quit 进入到Smart Link组1下,配置GE 0/0/2为主接口,GE 0/0/3为备份接口。 [s1]smart-link group 1 [s1-smlk-group1]portGigabitEthernet 0/0/2 master //配置为主接口 [s1-smlk-group1]portGigabitEthernet 0/0/3 slave //配置为备份接口 [s1]displaysmart-link group 1 //查看Smart-link 组1状态 Smart Linkgroup 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterActive 0 0000/00/00 00:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Inactive 0 0000/00/00 00:00:00 UTC+00 :00 查看下来:GE 0/0/2角色是(Master)主接口,状态是(Active)活动的;GE 0/0/3角色是(Slave)备份接口,状态是(inactive)不活动的。 模拟故障,切断GE 0/0/2接口再查看Smart-link 组1状态。 [s1]interfaceGigabitEthernet 0/0/2 [s1-GigabitEthernet0/0/2]shutdown //关闭接口 [s1-GigabitEthernet0/0/2]quit [s1]displaysmart-link group 1 Smart Linkgroup 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterInactive 0 0000/00/0000:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Active 0 0000/00/00 00:00:00 UTC+00 :00 查看到GE 0/0/2 (Master)为不活动;(Slave)为活动。 检察回切功能; [s1]interface GigabitEthernet 0/0/2 [s1-GigabitEthernet0/0/2]undoshutdown //恢复接口 [s1-GigabitEthernet0/0/2]quit [s1]displaysmart-link group 1 Smart Linkgroup 1 information : Smart Link group was enabled There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 4c1f-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterInactive 0 0000/00/0000:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Active 0 0000/00/00 00:00:00 UTC+00 查看下来,角色状态没有任何变化,为了确保网络稳定GE 0/0/2恢复接口后角色状态仍然是inactive说明Smart-link默认不具备抢占原来Active功能;需要手工配置回切功能: [s1]smart-linkgroup 1 [s1-smlk-group1]restoreenable //恢复开启 [s1-smlk-group1]timerwtr 30 //配置等待恢复时间30秒 [s1-smlk-group1]quit [s1]displaysmart-link group 1 Smart Linkgroup 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-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterActive 0 0000/00/00 00:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Inactive 0 0000/00/00 00:00:00 UTC+00 :00 30秒后GE 0/0/1 角色状态回切成功! 由于Smart-link无法感知上游设备故障,下面测试关闭S2 GE0/0/1接口后的Smart-link group 1状态。 <Huawei>system-view [Huawei]sysnames2 [s2]interfaceGigabitEthernet 0/0/1 [s2-GigabitEthernet0/0/2]shutdown [s2-GigabitEthernet0/0/2]quit 查看S1 Smart-link group 1状态 [s1]displaysmart-link group 1 Smart Linkgroup 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-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterActive 0 0000/00/00 00:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Inactive 0 0000/00/00 00:00:00 UTC+00 手功制造了S2 GE0/0/1故障,但S1却没有感知,仍然把GE0/0/2做为活动接口。 通过配置Monitor Link来监控上行接口,当上游设备接口出现故障时,让S1的Smart Link组完成切换。 [s2]monitor-linkgroup 1 //创建Monitor-Link组1 [s2-mtlk-group1]portGigabitEthernet 0/0/1 uplink //配置GE 0/0/1 为上行接口 [s2-mtlk-group1]portGigabitEthernet 0/0/2 downlink //配置GE 0/0/2 为下行接口 [s2-mtlk-group1]quit 查看S1 smart-link group 1状态 [s1]displaysmart-link group 1 Smart Linkgroup 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-cc80-6934 Member Role State Flush Count Last-Flush-Time ---------------------------------------------------------------------- GigabitEthernet0/0/2 MasterInactive 0 0000/00/0000:00:00 UTC+00 :00 GigabitEthernet0/0/3 Slave Active 0 0000/00/0000:00:00 UTC+00 :00 角色状态已经切换,下面配置monitor-link组1回切,然后恢复S2 GE0/0/1查看是否正常回切。 [s2]monitor-linkgroup 1 //进入monitor-link组1 [s2-mtlk-group1]timerrecover-time 10 //配置恢复时间 10秒 [s2-mtlk-group1]quit [s2-mtlk-group1]quit [s2-GigabitEthernet0/0/1]undoshutdown 完成。
|