素材来源:华为数据中心交换机配置指南

一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!

附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客


组网需求

图1所示,通过配置M-LAG双归接入IP网络可以满足以下要求:

  • 当一条接入链路发生故障时,流量可以快速切换到另一条链路,保证可靠性。
  • 为了高效利用带宽,两条链路同时处于active状态,可实现使用负载分担的方式转发流量。

配置思路

采用如下的思路配置M-LAG双归接入IP网络:

  1. 在Switch上配置上行接口绑定在一个Eth-Trunk中。
  2. 分别在SwitchA和SwitchB上配置V-STP、DFS Group、peer-link和M-LAG接口。
  3. 分别在SwitchA和SwitchB上配置VLANIF接口IP地址和MAC地址,作为接入设备的双活网关。
  4. 分别在SwitchA、SwitchB和SwitchC上配置OSPF功能,保证三层互通。
  5. 分别在SwitchA和SwitchB上配置Monitor Link关联上行接口和下行接口,避免因上行链路故障导致用户侧流量无法转发而丢弃。

操作步骤

  1. 在Switch上配置上行接口绑定在一个Eth-Trunk中

# 配置Switch。

<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 11
[*Switch] interface eth-trunk 20
[*Switch-Eth-Trunk20] mode lacp-static
[*Switch-Eth-Trunk20] port link-type trunk
[*Switch-Eth-Trunk20] port trunk allow-pass vlan 11
[*Switch-Eth-Trunk20] trunkport 10ge 1/0/1 to 1/0/4
[*Switch-Eth-Trunk20] quit
[*Switch] commit
  1. 分别在SwitchA和SwitchB上配置V-STP、DFS Group、peer-link和M-LAG接口

# 配置SwitchA。

<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] stp mode rstp
[~SwitchA] stp bridge-address 1-1-1
[*SwitchA] stp v-stp enable
[*SwitchA] interface loopback 0
[*SwitchA-LoopBack0] ip address 10.1.1.1 32
[*SwitchA-LoopBack0] quit
[*SwitchA] dfs-group 1
[*SwitchA-dfs-group-1] source ip 10.1.1.1
[*SwitchA-dfs-group-1] priority 150
[*SwitchA-dfs-group-1] quit
[*SwitchA] interface eth-trunk 1
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/4
[*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchA-Eth-Trunk1] mode lacp-static
[*SwitchA-Eth-Trunk1] peer-link 1
[*SwitchA-Eth-Trunk1] quit
[*SwitchA] vlan batch 11
[*SwitchA] interface eth-trunk 10
[*SwitchA-Eth-Trunk10] mode lacp-static
[*SwitchA-Eth-Trunk10] port link-type trunk
[*SwitchA-Eth-Trunk10] port trunk allow-pass vlan 11
[*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/2
[*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/3
[*SwitchA-Eth-Trunk10] dfs-group 1 m-lag 1
[*SwitchA-Eth-Trunk10] quit
[*SwitchA] commit

# 配置SwitchB。

<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] stp mode rstp
[~SwitchB] stp bridge-address 1-1-1
[*SwitchB] stp v-stp enable
[*SwitchB] interface loopback 0
[*SwitchB-LoopBack0] ip address 10.1.1.2 32
[*SwitchB-LoopBack0] quit
[*SwitchB] dfs-group 1
[*SwitchB-dfs-group-1] source ip 10.1.1.2
[*SwitchB-dfs-group-1] priority 120
[*SwitchB-dfs-group-1] quit
[*SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/4
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchB-Eth-Trunk1] mode lacp-static
[*SwitchB-Eth-Trunk1] peer-link 1
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] vlan batch 11
[*SwitchB] interface eth-trunk 10
[*SwitchB-Eth-Trunk10] mode lacp-static
[*SwitchB-Eth-Trunk10] port link-type trunk
[*SwitchB-Eth-Trunk10] port trunk allow-pass vlan 11
[*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/2
[*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/3
[*SwitchB-Eth-Trunk10] dfs-group 1 m-lag 1
[*SwitchB-Eth-Trunk10] quit
[*SwitchB] commit
  1. 分别在SwitchA和SwitchB上配置VLANIF接口IP地址和MAC地址,作为接入设备的双活网关

两端的IP和虚拟MAC配置要求完全一致,目的是为M-LAG提供相同的IP和虚拟MAC。

# 配置SwitchA。

[~SwitchA] interface vlanif 11
[*SwitchA-Vlanif11] ip address 10.2.1.1 24
[*SwitchA-Vlanif11] mac-address 0000-5e00-0101
[*SwitchA-Vlanif11] quit
[*SwitchA] commit

# 配置SwitchB。

[~SwitchB] interface vlanif 11
[*SwitchB-Vlanif11] ip address 10.2.1.1 24
[*SwitchB-Vlanif11] mac-address 0000-5e00-0101
[*SwitchB-Vlanif11] quit
[*SwitchB] commit
  1. 分别在SwitchA、SwitchB和SwitchC上配置OSPF功能,保证三层互通

# 配置SwitchA。

[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] undo portswitch
[*SwitchA-10GE1/0/1] ip address 10.3.1.1 24
[*SwitchA-10GE1/0/1] quit
[*SwitchA] ospf 1
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.0
[*SwitchA-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# 配置SwitchB。

[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] undo portswitch
[*SwitchB-10GE1/0/1] ip address 10.4.1.1 24
[*SwitchB-10GE1/0/1] quit
[*SwitchB] ospf 1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# 配置SwitchC。

<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] undo portswitch
[*SwitchC-10GE1/0/1] ip address 10.3.1.2 24
[*SwitchC-10GE1/0/1] quit
[*SwitchC] interface 10ge 1/0/2
[*SwitchC-10GE1/0/2] undo portswitch
[*SwitchC-10GE1/0/2] ip address 10.4.1.2 24
[*SwitchC-10GE1/0/2] quit
[*SwitchC] ospf 1
[*SwitchC-ospf-1] area 0
[*SwitchC-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[*SwitchC-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[*SwitchC-ospf-1-area-0.0.0.0] quit
[*SwitchC-ospf-1] quit
[*SwitchC] commit
  1. 分别在SwitchA和SwitchB上配置Monitor Link关联上行接口和下行接口

# 配置SwitchA。

[~SwitchA] monitor-link group 1
[*SwitchA-mtlk-group1] port 10ge 1/0/1 uplink
[*SwitchA-mtlk-group1] port eth-trunk 10 downlink 1
[*SwitchA-mtlk-group1] quit
[*SwitchA] commit

# 配置SwitchB。

[~SwitchB] monitor-link group 1
[*SwitchB-mtlk-group1] port 10ge 1/0/1 uplink
[*SwitchB-mtlk-group1] port eth-trunk 10 downlink 1
[*SwitchB-mtlk-group1] quit
[*SwitchB] commit
  1. 验证配置结果

执行命令display dfs-group,查看M-LAG的相关信息。

# 查看DFS Group编号为1的M-LAG信息。

[~SwitchA] display dfs-group 1 m-lag
*                : Local node
Heart beat state : OK
Node 1 *Dfs-Group ID   : 1Priority       : 150Address        : ip address 10.1.1.1State          : MasterCausation      : -System ID      : 00e0-fc95-7c31SysName        : SwitchAVersion        : V200R020C00Device Type    : CE6881
Node 2Dfs-Group ID   : 1Priority       : 120Address        : ip address 10.1.1.2State          : BackupCausation      : -System ID      : 00e0-fc95-7c11SysName        : SwitchBVersion        : V200R020C00Device Type    : CE6881

# 查看SwitchA上的M-LAG信息。

[~SwitchA] display dfs-group 1 node 1 m-lag brief
* - Local nodeM-Lag ID     Interface      Port State    Status                Consistency-check1     Eth-Trunk 10   Up            active(*)-active      --              Failed reason:                                                                  1 -- Relationship between vlan and port is inconsistent                     2 -- STP configuration under the port is inconsistent                       3 -- STP port priority configuration is inconsistent                        4 -- LACP mode of M-LAG is inconsistent                                     5 -- M-LAG configuration is inconsistent                                    6 -- The number of M-LAG members is inconsistent

# 查看SwitchB上的M-LAG信息。

[~SwitchB] display dfs-group 1 node 2 m-lag brief
* - Local nodeM-Lag ID     Interface      Port State    Status                Consistency-check1     Eth-Trunk 10   Up            active-active(*)      -- Failed reason:                                                                  1 -- Relationship between vlan and port is inconsistent                     2 -- STP configuration under the port is inconsistent                       3 -- STP port priority configuration is inconsistent                        4 -- LACP mode of M-LAG is inconsistent                                     5 -- M-LAG configuration is inconsistent                                    6 -- The number of M-LAG members is inconsistent

通过以上显示信息可以看到,“Heart beat state”的状态是“OK”,表明心跳状态正常;SwitchA作为Node 1,优先级为150,“State”的状态是“Master”;SwitchB作为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的配置正确。

玩转华为数据中心交换机系列 | 配置交换机双归接入IP网络示例相关推荐

  1. 玩转华为数据中心交换机系列 | 配置M-LAG双归接入普通以太网络示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  2. 玩转华为数据中心交换机系列 | 配置VLAN内协议报文透传示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  3. 玩转华为数据中心交换机系列 | 配置动态LACP模式的链路聚合示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  4. 玩转华为数据中心交换机系列 | 配置VLAN间通过VLANIF接口通信示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 企 ...

  5. 玩转华为数据中心交换机系列 | 配置手工负载分担模式链路聚合示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  6. 玩转华为数据中心交换机系列 | 配置基于接口划分VLAN示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  7. 玩转华为数据中心交换机系列 | 配置动态路由接入M-LAG

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  8. 玩转华为数据中心交换机系列 | 配置MUX VLAN示例(汇聚层设备)

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 如 ...

  9. 玩转华为数据中心交换机系列 | 配置基于MAC地址划分VLAN示例

    素材来源:华为数据中心交换机配置指南 一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持! 附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客 组网需求 某 ...

最新文章

  1. 2022-2028年中国服务机器人行业市场调查研究及前瞻分析报告
  2. [导入]Java线程的深入探讨
  3. 青源 LIVE 预告 | 华为诺亚韩凯:视觉 Transformer 综述
  4. Redis 3.0.501 学习使用(1)
  5. [课程复习] 数据结构之经典题目回顾 (一)选择题、填空题1
  6. start()和run()的区别
  7. 玩转Spring——Spring IOC/DI
  8. Resx 文件无效。未能加载 .RESX 文件中使用的类型 System.Collections.Generic.List`1请确保已在项目中添加了必需的引用。
  9. poi导出word时替换的段落内容会多出一个}和逗号_办公族必备11个Word文字处理技巧,太实用了!...
  10. 微信小程序加载本地图片方法
  11. ssas 分区 设置_如何在Analysis Services多维中对SSAS多维数据集进行分区
  12. 超参数搜索——初始学习率搜索的学习笔记
  13. 微软账号被暂时停用咋办_游戏账号交易要注意什么?买游戏账号有哪些可能会被找回去...
  14. 修改Android动画速度
  15. 社交网络分析——影响力最大化(附带python例子实现)
  16. C/C++函数库 之 ctype.h
  17. 程序员,怎样打造个人影响力?
  18. 利用python计算股票相关指数
  19. 【历史上的今天】4 月 3 日:亚马逊卖出第一本书;世界上第一通手机电话;IBM 计算机先驱出生
  20. c语言程序设计植树,C语言程序设计实验报告——实验

热门文章

  1. rawpy坏点修复 ExifRead获取RAW曝光、ISO、光圈等exif信息
  2. 【2023秋招】10月9日字节跳动校招题目
  3. windows 平台下curl使用报错: (3) [globbing] unmatched close brace/bracket in column 13
  4. bulldog2 靶机渗透
  5. 大数据学习之环境构建
  6. 合成孔径雷达干涉测量InSAR数据处理、地形三维重建、形变信监息提取、测
  7. 【python】使用pushplus实现警报微信提醒,提供代码和详细注释
  8. hdmi网线延长器_HDMI单网线延长器HE200使用教程
  9. Spark入门之九:机器学习简介
  10. 烟台服务器装系统,【图】- 烟台芝罘区上门修电脑安装系统电话多少三站 - 烟台芝罘电脑维修 - 烟台百姓网...