华为数通---配置Smart Link主备备份示例

定义

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类似,详见配置文件。

cpp 复制代码
<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

cpp 复制代码
[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。

cpp 复制代码
[SwitchA-smlk-group1]restore enable 
[SwitchA-smlk-group1]timer wtr 30
  • 使能发送Flush报文功能

配置SwitchA,并指定发送Flush报文的密码为SHA加密方式。

cpp 复制代码
[SwitchA-smlk-group1]flush send control-vlan 10 password simple huawei@123
  • 使能接收Flush报文功能

配置SwitchB,并指定接收Flush报文的密码为SHA加密方式。

cpp 复制代码
[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加密方式。

cpp 复制代码
[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加密方式。

cpp 复制代码
[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组功能
cpp 复制代码
[SwitchA-smlk-group1]smart-link enable 
[SwitchA-smlk-group1]quit
  • 验证配置结果

使用display smart-link group命令查看SwitchA上的Smart Link组信息。如果显示如下信息,则表示配置成功。

  1. Smart Link组功能已经使能
  2. 回切时间为30秒
  3. 控制VLAN编号为10
  4. 接口GE0/0/1为主接口且处于Active状态,接口GE0/0/2为从接口且处于Inactive。
cpp 复制代码
[SwitchA]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-ccd4-08f7  Control-vlan ID: 10
  Member                  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状态。

cpp 复制代码
[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 enabled
  Wtr-time is: 30 sec.
  There is no Load-Balance
  There is no protected-vlan reference-instance
  DeviceID: 4c1f-ccd4-08f7  Control-vlan ID: 10
  Member                  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。

cpp 复制代码
[SwitchA-GigabitEthernet0/0/1]undo shutdown

等待30秒后,可以看到接口GE0/0/1处于Active状态,接口GE0/0/2为Inactive状态。

cpp 复制代码
[SwitchA]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-ccd4-08f7  Control-vlan ID: 10
  Member                  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的配置文件
cpp 复制代码
#
sysname SwitchA
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
#
smart-link group 1
 restore enable
 smart-link enable
 port GigabitEthernet0/0/1 master
 port GigabitEthernet0/0/2 slave
 timer wtr 30
 flush send control-vlan 10 password simple huawei@123
#
return
  • SwitchB的配置文件
cpp 复制代码
#
sysname SwitchB
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
 smart-link flush receive control-vlan 10 password simple huawei@123
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
 smart-link flush receive control-vlan 10 password simple huawei@123
#
return
  • SwitchC的配置文件
cpp 复制代码
#
sysname SwitchC
#
vlan batch 10 to 30
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
 smart-link flush receive control-vlan 10 password simple huawei@123
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 to 30
 stp disable
 smart-link flush receive control-vlan 10 password simple huawei@123
#
return
相关推荐
刘婉晴2 分钟前
【K8S】配置和连接介绍
运维
网硕互联的小客服10 分钟前
如何在Ubuntu系统上查看和刷新DNS缓存?操作方法与原理解析
运维·服务器·网络·ubuntu
码农学院14 分钟前
制造业B2B官网GEO实战:用 Python 向量相似度给老产品手册自动补语义内链,让 AI 爬虫抓得更深
运维·人工智能·爬虫·ai优化aio
亚川楼宇自控系统数据中心厂家23 分钟前
从电表到碳报告:能碳管理系统如何支撑机房双碳合规
运维
邪修king25 分钟前
Re:Linux系统篇(二十五):文件系统(一):磁盘硬件底层原理:从物理结构到 CHS/LBA 寻址,搞懂硬盘数据的定位逻辑
java·linux·运维·gpt
威哥爱编程25 分钟前
HarmonyOS 扫码直达接入实战:系统扫、应用落,三步送用户进履约页
华为·harmonyos·arkts
威哥爱编程26 分钟前
HarmonyOS 6.0 智感握姿实战:一道安检门、五态分诊、一静一响两个坑
华为·harmonyos·arkts
Lynne30927 分钟前
工业边缘计算网关到底解决什么问题?从设备接入到AI推理的技术链路
网络·数据分析·数据
运维栈记32 分钟前
使用 MinIO Client (mc) 将自建 MinIO 数据备份至阿里云 OSS
运维·阿里云
鲁邦通物联网41 分钟前
海外设备怎么远程维护?工业路由器远程运维架构设计
运维·网络·智能路由器·工业路由器·工业级路由器·5g路由器·5g工业路由器