Principle and configuration of Huawei Smart Link and Monitor Link

Principle overview

In the second layer network, in order to improve the reliability of the network, the networking is generally carried out in a redundant manner. This method will bring loop problems. In order to solve the loop problem, in addition to adopting STP technology, Huawei also proposed a Smart Link solution. Program.
In the network, under normal conditions, only one of the two uplinks is in a connected state, and the other is in a blocked state, which avoids broadcast storms caused by loops. When the main link fails, the traffic will be in the millisecond level. Switch to the backup link within time to ensure normal data forwarding. By default, when the original active link recovers from a failure, it will remain in a blocked state without preemption, thereby maintaining network stability. The switchback function can be manually configured to switch traffic back to the original active link.
Smart Link defect: It can ensure that the device can quickly switch after the uplink of the device fails, but it cannot provide effective protection for link failures across devices.
For this reason, Monitor Link can be used to expand the link backup range of Smart Link. By monitoring the uplink of the upstream device, the uplink failure can be quickly communicated to the downstream device, thereby triggering Smart Link's main and backup link switching.

Experiment content

SW4 is connected to the external network as the company's export equipment, SW1 is the access side switch, and SW1 is dual-uplinked to SW4 through two switches SW2 and SW3, for this dual-uplink networking.
In order to realize the redundant backup of active and standby links and rapid migration after failure, Smart Link technology is deployed. In order to further expand the backup scope of Smart Link, the Monitor Link linkage method is used to monitor the uplink of upstream equipment to complete Smart Link.

Experimental topology

Insert picture description here

SW1

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1

[SW1]smart-link group 1      #创建Smart Link组1,并开启Smart Link组功能
[SW1-smlk-group1]smart-link enable
[SW1-smlk-group1]quit
[SW1]interface ethernet 0/0/3
[SW1-Ethernet0/0/3]stp disable  #配置Smart Link时,需要在运行Smart Link的接口下关闭STP
[SW1-Ethernet0/0/3]quit
[SW1]interface ethernet 0/0/4
[SW1-Ethernet0/0/4]stp disable 
[SW1-Ethernet0/0/4]quit
[SW1]smart-link group 1
[SW1-smlk-group1]port ethernet 0/0/3 master  #配置GE0/0/3为主接口
[SW1-smlk-group1]port ethernet 0/0/4 slave   #配置GE0/0/4为备份接口
[SW1-smlk-group1]quit

[SW1]display 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-ccb2-56c3
  Member                  Role   State    Flush Count Last-Flush-Time
  ----------------------------------------------------------------------
#E0/0/3为主端口,状态为Active,E0/0/4为备份端口,状态为Inactive
  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 

Configure failback function

When the main interface on SW1 fails, the backup port will immediately switch to the Active state, and, by default, when the original main interface is restored, the main interface will not automatically switch back to the Active state, and the switchback function needs to be manually configured.
Turn off the E0/0/3 interface of SW2 switch to simulate the occurrence of a fault, and return to SW1 to observe the active and standby status of Smart Link group 1.

SW2

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]interface ethernet 0/0/3
[SW2-Ethernet0/0/3]shutdown
[SW2-Ethernet0/0/3]quit

The active/standby state of SW1 has been automatically switched,
Insert picture description here
re-open the E0/0/3 interface of SW2, and observe the active /standby state of Smart Link group 1 on S1 again, but the active /standby state is not switched by default, and you need to turn on the back on SW1 Cut function.

[SW2]interface ethernet 0/0/3
[SW2-Ethernet0/0/3]undo shutdown


[SW1]smart-link group 1 
[SW1-smlk-group1]restore enable  #开启回切功能
[SW1-smlk-group1]timer wtr 30    #回切时间设置为30

Insert picture description here

Monitor Link configuration

Turn off the G0/0/1 interface of simulated SW2, and check the active/standby status of Smart Link group 1

[SW2]interface GigabitEthernet 0/0/1  
[SW2-GigabitEthernet0/0/1]shutdown 

#The main and standby are still not switched, E0/0/3 is still the main interface, which will cause switch 1 to fail to communicate normally

[SW1]display smart-link group 1
Smart 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-ccb2-56c3
  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 

SW2 enables Monitor Link group 1, configure the uplink interface as GE0/0/1, and the downlink interface as 0/0/3,

[SW2]monitor-link group 1
[SW2-mtlk-group1]port g	
[SW2-mtlk-group1]port GigabitEthernet 0/0/1
[SW2-mtlk-group1]port GigabitEthernet 0/0/1 uplink 
[SW2-mtlk-group1]port Ethernet 0/0/3
[SW2-mtlk-group1]port Ethernet 0/0/3 downlink 
[SW2-mtlk-group1]quit

Check the active/standby status of Smart Link group 1 of S1 again, E0/0/3 is Inactive, E0/0/4 is Active, and the traffic has been switched to the E0/0/4 interface, ensuring that the traffic is forwarded normally

[SW1]display smart-link group 1
Smart 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-ccb2-56c3
  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 

Modify the switchback time of the Monitor Link group to 10s (3 seconds by default). When the uplink of SW2 is restored, the downlink Smart Link group will switch back to the primary link after the time expires.

[SW2]monitor-link group 1
[SW2-mtlk-group1]timer recover-time 10

[SW2]monitor-link group 1
[SW2-mtlk-group1]timer recover-time 10
[SW2-mtlk-group1]quit
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]disp this
#
interface GigabitEthernet0/0/1
 shutdown
#
return
[SW2-GigabitEthernet0/0/1]undo shutdown 

Wait for about 40s to check the active/standby status of Smart Link group 1 of S1

[SW1]disp smart-link group 1
Smart 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-ccb2-56c3
  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 

Guess you like

Origin blog.csdn.net/qq_39689711/article/details/107095615