定義
Smart Link,又叫做備份鏈路。一個Smart Link由兩個接口組成,其中一個接口作為另一個的備份。Smart Link常用于雙上行組網,提供可靠高效的備份和快速的切換機制。??
目的?
下游設備連接到上游設備,當使用單上行方式時,若出現單點故障,會造成業務中斷。若采用雙上行方式,將一臺下游設備同時連接到兩臺上游設備,可降低單點故障對網絡的影響,提高了可靠性。?
組網需求?
如下圖所示,為了保證網絡的可靠性,用戶側網絡采用雙上行方式組網。用戶希望能夠破除網絡環路,實現主備鏈路冗余備份和快速收斂。
?
配置思路?
采用如下的思路配置Smart Link功能:
-
創建VLAN,并配置接口允許相應VLAN通過。
-
在SwitchA上創建Smart Link備份組,并指定端口角色。
-
在SwitchA上使能回切功能,使得故障恢復后,流量切換到相對穩定的原主鏈路上。
-
在SwitchA上使能發送Flush報文功能。
-
在SwitchB、SwitchC和SwitchD三臺設備對應端口上使能Flush報文接收功能。
-
在SwitchA上使能Smart Link組功能。
操作步驟?
- 配置VLAN信息
# 在SwitchA上創建VLAN,并配置接口允許相應VLAN通過。SwitchB、SwitchC和SwitchD的配置與SwitchA類似,詳見配置文件。
<Huawei>system-view
[Huawei]sysname SwitchA
[SwitchA]vlan batch 10 to 30
[SwitchA]interface GigabitEthernet 0/0/1
[SwitchA-GigabitEthernet0/0/1]port link-type trunk
[SwitchA-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 to 30
[SwitchA-GigabitEthernet0/0/1]quit
[SwitchA]interface GigabitEthernet 0/0/2
[SwitchA-GigabitEthernet0/0/2]port link-type trunk
[SwitchA-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 to 30
[SwitchA-GigabitEthernet0/0/2]quit
- 在SwitchA上創建Smart Link備份組,并指定端口角色
# 配置SwitchA
[SwitchA]interface GigabitEthernet 0/0/1
[SwitchA-GigabitEthernet0/0/1]stp disable
[SwitchA-GigabitEthernet0/0/1]quit
[SwitchA]interface GigabitEthernet 0/0/2
[SwitchA-GigabitEthernet0/0/2]stp disable
[SwitchA-GigabitEthernet0/0/2]quit
[SwitchA]smart-link group 1
[SwitchA-smlk-group1]port GigabitEthernet 0/0/1 master
[SwitchA-smlk-group1]port GigabitEthernet 0/0/2 slave
- 使能回切功能并設置回切時間
# 配置SwitchA。
[SwitchA-smlk-group1]restore enable
[SwitchA-smlk-group1]timer wtr 30
- 使能發送Flush報文功能
# 配置SwitchA,并指定發送Flush報文的密碼為SHA加密方式。
[SwitchA-smlk-group1]flush send control-vlan 10 password simple huawei@123
- 使能接收Flush報文功能
# 配置SwitchB,并指定接收Flush報文的密碼為SHA加密方式。
[SwitchB]interface GigabitEthernet 0/0/1
[SwitchB-GigabitEthernet0/0/1]smart-link flush receive control-vlan 10 password
simple huawei@123
[SwitchB-GigabitEthernet0/0/1]stp disable
[SwitchB-GigabitEthernet0/0/1]quit
[SwitchB]interface GigabitEthernet 0/0/2
[SwitchB-GigabitEthernet0/0/2]smart-link flush receive control-vlan 10 password
simple huawei@123
[SwitchB-GigabitEthernet0/0/2]stp disable
[SwitchB-GigabitEthernet0/0/2]quit
# 配置SwitchC,并指定接收Flush報文的密碼為SHA加密方式。
[SwitchC]interface GigabitEthernet 0/0/1
[SwitchC-GigabitEthernet0/0/1]smart-link flush receive control-vlan 10 password
simple huawei@123
[SwitchC-GigabitEthernet0/0/1]stp disable
[SwitchC-GigabitEthernet0/0/1]quit
[SwitchC]interface GigabitEthernet 0/0/2
[SwitchC-GigabitEthernet0/0/2]smart-link flush receive control-vlan 10 password
simple huawei@123
[SwitchC-GigabitEthernet0/0/2]stp disable
[SwitchC-GigabitEthernet0/0/2]quit
# 配置SwitchD,并指定接收Flush報文的密碼為SHA加密方式。
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]smart-link flush receive control-vlan 10 password s
imple huawei@123
[Huawei-GigabitEthernet0/0/1]stp disable
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]smart-link flush receive control-vlan 10 password s
imple huawei@123
[Huawei-GigabitEthernet0/0/2]stp disable
[Huawei-GigabitEthernet0/0/2]quit
- 在SwitchA使能Smart Link組功能
[SwitchA-smlk-group1]smart-link enable
[SwitchA-smlk-group1]quit
- 驗證配置結果
# 使用display smart-link group命令查看SwitchA上的Smart Link組信息。如果顯示如下信息,則表示配置成功。
- Smart Link組功能已經使能
- 回切時間為30秒
- 控制VLAN編號為10
- 接口GE0/0/1為主接口且處于Active狀態,接口GE0/0/2為從接口且處于Inactive。
[SwitchA]display smart-link group 1
Smart Link group 1 information :Smart Link group was enabledWtr-time is: 30 sec.There is no Load-BalanceThere is no protected-vlan reference-instanceDeviceID: 4c1f-ccd4-08f7 Control-vlan ID: 10Member Role State Flush Count Last-Flush-Time----------------------------------------------------------------------GigabitEthernet0/0/1 Master Active 1 2023/12/08 16:08:26 UTC-08
:00 GigabitEthernet0/0/2 Slave Inactive 0 0000/00/00 00:00:00 UTC+00
:00
# 使用shutdown命令關閉接口GE0/0/1,可以看到接口GE0/0/1已經處于Inactive狀態,接口GE0/0/2為Active狀態。
[SwitchA]interface GigabitEthernet 0/0/1
[SwitchA-GigabitEthernet0/0/1]shutdown
[SwitchA-GigabitEthernet0/0/1]display smart-link group 1
Smart Link group 1 information :Smart Link group was enabledWtr-time is: 30 sec.There is no Load-BalanceThere is no protected-vlan reference-instanceDeviceID: 4c1f-ccd4-08f7 Control-vlan ID: 10Member Role State Flush Count Last-Flush-Time----------------------------------------------------------------------GigabitEthernet0/0/1 Master Inactive 1 2023/12/08 16:08:26 UTC-08
:00 GigabitEthernet0/0/2 Slave Active 0 0000/00/00 00:00:00 UTC+00
:00
# 使用undo shutdown命令開啟接口GE0/0/1。
[SwitchA-GigabitEthernet0/0/1]undo shutdown
# 等待30秒后,可以看到接口GE0/0/1處于Active狀態,接口GE0/0/2為Inactive狀態。
[SwitchA]display smart-link group 1
Smart Link group 1 information :Smart Link group was enabledWtr-time is: 30 sec.There is no Load-BalanceThere is no protected-vlan reference-instanceDeviceID: 4c1f-ccd4-08f7 Control-vlan ID: 10Member Role State Flush Count Last-Flush-Time----------------------------------------------------------------------GigabitEthernet0/0/1 Master Active 2 2023/12/08 16:12:21 UTC-08
:00 GigabitEthernet0/0/2 Slave Inactive 1 2023/12/08 16:11:27 UTC-08
:00
配置文件?
-
SwitchA的配置文件
#
sysname SwitchA
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 to 30stp disable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 to 30stp disable
#
smart-link group 1restore enablesmart-link enableport GigabitEthernet0/0/1 masterport GigabitEthernet0/0/2 slavetimer wtr 30flush send control-vlan 10 password simple huawei@123
#
return
-
SwitchB的配置文件
#
sysname SwitchB
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 to 30stp disablesmart-link flush receive control-vlan 10 password simple huawei@123
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 to 30stp disablesmart-link flush receive control-vlan 10 password simple huawei@123
#
return
-
SwitchC的配置文件
#
sysname SwitchC
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1port link-type trunkport trunk allow-pass vlan 10 to 30stp disablesmart-link flush receive control-vlan 10 password simple huawei@123
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10 to 30stp disablesmart-link flush receive control-vlan 10 password simple huawei@123
#
return