华为数据中心CE系列交换机级联M-LAG配置示例

M-LAG组网简介

M-LAG(Multi-chassis Link Aggregation)技术是一种跨设备的链路聚合技术,它通过将两台交换机组成一个逻辑设备,实现链路的负载分担和故障切换,从而提高网络的可靠性和稳定性。下面给大家详细介绍如何在华为交换机上进行M-LAG配置。在配置M-LAG之前,我们需要确认交换机的型号是否支持M-LAG,如数据中心交换机CE58、CE68、CE88、CE98等等交换机都支持M-LAG技术。

如下图组网所示,多级M-LAG互联可以在保证可靠性、提供链路利用率的同时扩展双归接入的网络规模,满足客户的需求。同时汇聚交换机作为双活网关,接入与汇聚之间采用交叉连线方式,保证设备级可靠性。

组网图:

配置步骤
一、配置STP

1,配置SwitchA

复制代码
一、配置STP
1,配置SwitchA
[SwitchA] stp bridge-address 0000-0000-1111     		//M_LAG中node 1 与node 2 生成树mac地址保持一致
[SwitchA] stp mode rstp
[SwitchA] stp tc-protection enable
[SwitchA] stp bpdu-protection enable
[SwitchA] stp v-stp enable

2,配置SwitchB

复制代码
[SwitchB] stp bridge-address 0000-0000-1111 ? ? ?? ??? ?//M_LAG中node 1 与node 2 生成树mac地址保持一致
[SwitchB] stp mode rstp
[SwitchB] stp tc-protection enable
[SwitchB] stp bpdu-protection enable
[SwitchB] stp v-stp enable

3,配置SwitchC

复制代码
[SwitchC] stp bridge-address 0000-0000-2222 ? ? ?? ??? ?//M_LAG中node 1 与node 2 生成树mac地址保持一致
[SwitchC] stp mode rstp
[SwitchC] stp tc-protection enable
[SwitchC] stp bpdu-protection enable
[SwitchC] stp v-stp enable

4,配置SwitchD

复制代码
[SwitchD] stp bridge-address 0000-0000-2222 ? ? ?? ??? ?//M_LAG中node 1 与node 2 生成树mac地址保持一致
[SwitchD] stp mode rstp
[SwitchD] stp tc-protection enable
[SwitchD] stp bpdu-protection enable
[SwitchD] stp v-stp enable
二、配置DFS Group

1,配置SwitchA

复制代码
[SwitchA] interface meth 0/0/0?
[SwitchA]-MEth0/0/0] ip address 10.1.1.1 24?? ??? ??? ??? ?//带外管理接口ip用作m-lag双住检测源
[SwitchA] dfs-group 1
[SwitchA-dfs-group-1] dual-active detection source-ip 10.1.1.1 peer 10.1.1.2
[SwitchA-dfs-group-1] priority 150
[SwitchA-dfs-group-1] quit

2,配置SwitchB

复制代码
[SwitchB] interface meth 0/0/0
[SwitchB]-MEth0/0/0] ip address 10.1.1.2 24?? ??? ??? ??? ?//带外管理接口ip用作m-lag双住检测源
[SwitchB] dfs-group 1
[SwitchB-dfs-group-1] dual-active detection source-ip 10.1.1.2 peer 10.1.1.1
[SwitchB-dfs-group-1] priority 120
[SwitchB-dfs-group-1] quit

3,配置SwitchC

复制代码
[SwitchC] interface meth 0/0/0
[SwitchC]-MEth0/0/0] ip address 10.1.1.3 24?? ??? ??? ??? ?//带外管理接口ip用作m-lag双住检测源
[SwitchC] dfs-group 1
[SwitchC-dfs-group-1] dual-active detection source-ip 10.1.1.3 peer 10.1.1.4
[SwitchC-dfs-group-1] priority 150
[SwitchC-dfs-group-1] quit

4,配置SwitchD

复制代码
[SwitchD] interface meth 0/0/0
[SwitchD]-MEth0/0/0] ip address 10.1.1.4 24?? ??? ??? ??? ?//带外管理接口ip用作m-lag双住检测源
[SwitchD] dfs-group 1
[SwitchD-dfs-group-1] dual-active detection source-ip 10.1.1.4 peer 10.1.1.3
[SwitchD-dfs-group-1] priority 150
[SwitchD-dfs-group-1] quit

1,配置SwitchA

复制代码
[SwitchA] interface Eth-Trunk 0
[SwitchA-Eth-Trunk0] mode lacp-static
[SwitchA-Eth-Trunk0] trunkport xge ?0/0/47 to ?0/0/48
[SwitchA-Eth-Trunk0] peer-link 1
[SwitchA-Eth-Trunk0] quit

2,配置SwitchB

复制代码
[SwitchB] interface Eth-Trunk 0
[SwitchB-Eth-Trunk0] mode lacp-static
[SwitchB-Eth-Trunk0] trunkport xge ?0/0/47 to ?0/0/48
[SwitchB-Eth-Trunk0] peer-link 1
[SwitchB-Eth-Trunk0] quit

3,配置SwitchC

复制代码
[SwitchC] interface Eth-Trunk 0
[SwitchC-Eth-Trunk0] mode lacp-static
[SwitchC-Eth-Trunk0] trunkport xge ?0/0/47 to ?0/0/48
[SwitchC-Eth-Trunk0] peer-link 1
[SwitchC-Eth-Trunk0] quit

4,配置SwitchD

复制代码
[SwitchD] interface Eth-Trunk 0
[SwitchD-Eth-Trunk0] mode lacp-static
[SwitchD-Eth-Trunk0] trunkport xge ?0/0/47 to ?0/0/48
[SwitchD-Eth-Trunk0] peer-link 1
[SwitchD-Eth-Trunk0] quit

四、配置业务口

1,配置SwitchA

复制代码
[SwitchA] interface Eth-Trunk 1
[SwitchA-Eth-Trunk1] mode lacp-static
[SwitchA-Eth-Trunk1] port link-type trunk
[SwitchA-Eth-Trunk1] port trunk allow-pass vlan all
[SwitchA-Eth-Trunk1] dfs-group 1 m-lag 1
[SwitchA-Eth-Trunk1] trunkport xge ?0/0/1 to ?0/0/2 ? ? //添加与汇聚交换机C、D的互联物理接口
[SwitchA] interface Eth-Trunk 2
[SwitchA-Eth-Trunk2] mode lacp-static
[SwitchA-Eth-Trunk2] port link-type trunk
[SwitchA-Eth-Trunk2] port trunk allow-pass vlan all
[SwitchA-Eth-Trunk2] dfs-group 1 m-lag 2
[SwitchA-Eth-Trunk2] trunkport xge ?0/0/3 ? ??? ??? ? //添加与Server互联的物理接口

2,配置SwitchB

复制代码
[SwitchB] interface Eth-Trunk 1
[SwitchB-Eth-Trunk1] mode lacp-static
[SwitchB-Eth-Trunk1] port link-type trunk
[SwitchB-Eth-Trunk1] port trunk allow-pass vlan all
[SwitchB-Eth-Trunk1] dfs-group 1 m-lag 2
[SwitchB-Eth-Trunk1] trunkport xge ?0/0/1 to ?0/0/2 ? ? //添加与汇聚交换机C、D的互联物理接口
[SwitchB] interface Eth-Trunk 2
[SwitchB-Eth-Trunk2] mode lacp-static
[SwitchB-Eth-Trunk2] port link-type trunk
[SwitchB-Eth-Trunk2] port trunk allow-pass vlan all
[SwitchB-Eth-Trunk2] dfs-group 1 m-lag 2
[SwitchB-Eth-Trunk2] trunkport xge ?0/0/3 ? ??? ??? ? //添加与Server互联的物理接口

3,配置SwitchC

复制代码
[SwitchC] interface Eth-Trunk 1
[SwitchC-Eth-Trunk1] mode lacp-static
[SwitchC-Eth-Trunk1] port link-type trunk
[SwitchC-Eth-Trunk1] port trunk allow-pass vlan all
[SwitchC-Eth-Trunk1] dfs-group 1 m-lag 1
[SwitchC-Eth-Trunk1] trunkport xge ?0/0/1 to ?0/0/2 ? ? //添加与接入交换机A、B的互联物理接口

4,配置SwitchD

复制代码
[SwitchD] interface Eth-Trunk 1
[SwitchD-Eth-Trunk1] mode lacp-static
[SwitchD-Eth-Trunk1] port link-type trunk
[SwitchD-Eth-Trunk1] port trunk allow-pass vlan all
[SwitchD-Eth-Trunk1] dfs-group 1 m-lag 1
[SwitchD-Eth-Trunk1] trunkport xge ?0/0/1 to ?0/0/2 ? ? //添加与接入交换机A、B的互联物理接口
五、验证DFS Group的M-LAG信息

验证M-LAG配置是否正确。可以通过显示命令来检查DFS Group、M-LAG状态信息。

1,接入交换机SwitchA上DFS Group、M-LAG状态检查

复制代码
[SwitchA] display dfs-group 1 m-lag
*                : Local node
Heart beat state : OK
Node 1 *
  Dfs-Group ID   : 1
  Priority       : 150
  Address        : ip address 10.1.1.1
  State          : Master
  Causation      : -
  System ID      : 0025-9e95-7c31
  SysName        : SwitchC
  Version        : V100R006C00
  Device Type    : CE6850EI
Node 2
  Dfs-Group ID   : 1
  Priority       : 120
  Address        : ip address 10.1.1.2
  State          : Backup
  Causation      : -
  System ID      : 0025-9e95-7c11
  SysName        : SwitchD
  Version        : V100R006C00
  Device Type    : CE6850EI
[SwitchA] display dfs-group 1 node 1 m-lag brief
* - Local node
M-Lag ID     Interface      Port State    Status
       1     Eth-Trunk 1   Up            active(*)-active
       2     Eth-Trunk 2   Up            active(*)-active

2,汇聚交换机SwitchC上DFS Group、M-LAG状态检查

复制代码
[SwitchC] display dfs-group 1 m-lag
*                : Local node
Heart beat state : OK
Node 1 *
  Dfs-Group ID   : 1
  Priority       : 150
  Address        : ip address 10.1.1.3
  State          : Master
  Causation      : -
  System ID      : 0025-9e95-7c41
  SysName        : SwitchC
  Version        : V100R006C00
  Device Type    : CE6850EI
Node 2
  Dfs-Group ID   : 1
  Priority       : 120
  Address        : ip address 10.1.1.4
  State          : Backup
  Causation      : -
  System ID      : 0025-9e95-7c21
  SysName        : SwitchD
  Version        : V100R006C00
  Device Type    : CE6850EI
[SwitchC] display dfs-group 1 node 1 m-lag brief
* - Local node
M-Lag ID     Interface      Port State    Status
       1     Eth-Trunk 1    Up            active(*)-active

通过以上显示信息可以看到,"Heart beat state"的状态是"OK",表明心跳状态正常;SwitchA和SwitchC作为Node 1,优先级为150,"State"的状态是"Master";SwitchB和SwitchD作为Node 2,优先级为120,"State"的状态是"Backup"。同时"Causation"的状态是"-",Node 1的"Port State"状态为"Up",Node 2的"Port State"状态为"Up",且Node 1和Node 2的M-LAG状态均为"active",表明M-LAG的配置正确。

通过以上配置步骤,就可以在华为CE交换机上成功配置M-LAG,提高网络的可靠性和稳定性。

相关推荐
修炼室2 小时前
告别天天变动的随机端口!基于 Tailscale 子网路由(Subnet Router)外网原生直连学院服务器及安装踩坑指南
运维·服务器
华纳云IDC服务商2 小时前
高防服务器清洗流量导致丢包怎么办?
运维·服务器·网络
一直跑2 小时前
codex服务器运用(服务器上不了外网chatgpt)
运维·服务器·chatgpt
云服务器代理商2 小时前
腾讯云香港服务器选择指南:延迟优势、配置价格与开通思路
服务器·云计算·腾讯云·腾讯云服务器·香港节点·腾讯云国际·腾讯云海外
草莓熊Lotso2 小时前
【Linux网络】深入理解 TCP 协议(一):报头设计与可靠性基石
linux·运维·服务器·c语言·网络·c++·tcp/ip
互联网散修2 小时前
鸿蒙实战:图片编辑器——像素马赛克从卡顿到丝滑的终极优化
华为·编辑器·harmonyos
YYYing.2 小时前
【C++大型项目之高性能服务器框架 (一) 】一切物语的开始:日志系统&配置系统篇
服务器·高并发·高性能·c/c++·后端框架
加油码2 小时前
Linux 信号详解:从 Ctrl+C 到进程异常退出,真正理解信号机制
linux·服务器·c++
Shadow(⊙o⊙)2 小时前
QT常用控件3.0,font字体设置,toolTip提示,focusPolicy焦点定位原则,中型控件StyleSheet样式表。
服务器·开发语言·前端·c++·qt