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

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

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


组网需求

图 配置动态路由接入M-LAG组网图所示,SwitchA、SwitchB和SwitchC组成M-LAG系统,SwitchB和SwitchC的M-LAG端口支持动态路由协议,用户在服务器上配置动态路由通过三层路由方式接入到M-LAG系统。

配置思路

采用如下思路配置动态路由接入M-LAG:

  1. 分别在SwitchB、SwitchC、SwitchD上配置路由协议,实现网络三层互通。
  2. 创建Eth-Trunk接口。
  3. 配置V-STP。
  4. 配置M-LAG:
  • 分别在SwitchB和SwitchC上配置DFS Group。
  • 将SwitchB和SwitchC之间的链路配置为peer-link。
  • 分别在SwitchB和SwitchC上配置绑定DFS Group和用户侧Eth-Trunk接口。
  1. 在SwitchB和SwitchC上配置OSPF over M-LAG的IP地址。SwitchB和SwitchC上需要配置不一样的M-LAG IP地址,否则会导致路由协议建立不起来。
  2. OSPF通过指定IP地址与SwitchA之间建立OSPF邻居。

操作步骤

  1. 配置路由协议

# 配置SwitchB。SwitchC和SwitchD的配置与SwitchB类似,这里不再赘述。配置OSPF时,注意需要发布32位Loopback接口地址。

<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] interface loopback 1
[*SwitchB-LoopBack1] ip address 10.2.2.2 32
[*SwitchB-LoopBack1] quit
[*SwitchB] interface loopback 2
[*SwitchB-LoopBack2] ip address 10.3.3.3 32
[*SwitchB-LoopBack2] quit
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] undo portswitch
[*SwitchB-10GE1/0/1] ip address 192.168.1.1 24
[*SwitchB-10GE1/0/1] quit
[*SwitchB] ospf 1 router-id 11.1.1.1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.0
[*SwitchB-ospf-1-area-0.0.0.0] network 10.3.3.3 0.0.0.0
[*SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit

OSPF成功配置后,SwitchB、SwitchC、SwitchD之间可通过OSPF协议发现对方的Loopback接口的IP地址,并能互相ping通。

  1. 创建Eth-Trunk接口,并将以太物理接口加入Eth-Trunk接口

服务器上行连接交换机的端口需要绑定在一个聚合链路中且链路聚合模式需要和交换机侧的聚合模式匹配。

# 在SwitchB上创建Eth-Trunk,配置为LACP模式并加入成员口。SwitchC的配置与SwitchB类似,此处不再赘述。

[~SwitchB] interface eth-trunk 1
[*SwitchB-Eth-Trunk1] mode lacp-static
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/4
[*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/5
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] interface eth-trunk 10
[*SwitchB-Eth-Trunk10] mode lacp-static
[*SwitchB-Eth-Trunk10] lacp mixed-rate link enable
[*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/2
[*SwitchB-Eth-Trunk10] quit
[*SwitchB] commit
  1. 配置V-STP

# 配置SwitchB。

[~SwitchB] stp mode rstp
[*SwitchB] stp v-stp enable
[*SwitchB] interface eth-trunk 10
[*SwitchB-Eth-Trunk10] stp edged-port enable
[*SwitchB-Eth-Trunk10] commit
[~SwitchB-Eth-Trunk10] quit

# 配置SwitchC。

[~SwitchC] stp mode rstp
[*SwitchC] stp v-stp enable
[*SwitchC] interface eth-trunk 10
[*SwitchC-Eth-Trunk10] stp edged-port enable
[*SwitchC-Eth-Trunk10] commit
[~SwitchC-Eth-Trunk10] quit
  1. 分别在SwitchB和SwitchC上配置DFS Group

# 配置SwitchB。SwitchC的配置与SwitchB类似,此处不再赘述。

[~SwitchB] dfs-group 1
[*SwitchB-dfs-group-1] source ip 10.3.3.3
[*SwitchB-dfs-group-1] quit
[*SwitchB] commit
  1. 将SwitchB和SwitchC之间的链路配置为peer-link

# 配置SwitchB。SwitchC的配置与SwitchB类似,此处不再赘述。

[~SwitchB] interface eth-trunk 1
[~SwitchB-Eth-Trunk1] peer-link 1
[*SwitchB-Eth-Trunk1] quit
[*SwitchB] commit
  1. 分别在SwitchB和SwitchC上配置绑定DFS和用户侧Eth-Trunk接口

# 配置SwitchB。SwitchC的配置与SwitchB类似,此处不再赘述。

[~SwitchB] interface eth-trunk 10
[~SwitchB-Eth-Trunk10] dfs-group 1 m-lag 1
[*SwitchB-Eth-Trunk10] quit
[*SwitchB] commit
  1. 分别在SwitchB和SwitchC上配置OSPF over M-LAG的IP地址

# 配置SwitchB。SwitchC的配置与SwitchB类似,此处不再赘述。

[~SwitchB] vlan 100
[*SwitchB-vlan100] quit
[*SwitchB] interface vlanif 100
[*SwitchB-Vlanif100] ip address 100.100.0.1 255.255.255.0
[*SwitchB-Vlanif100] m-lag ip address 100.100.0.3 255.255.255.0
[*SwitchB-Vlanif100] ospf source sub-address 100.100.0.3
[*SwitchB-Vlanif100] mac-address 0000-5e00-0101
[*SwitchB-Vlanif100] quit
[*SwitchB] commit
  1. OSPF通过指定IP地址与SwitchA之间建立OSPF邻居

# 配置SwitchB。SwitchC的配置与SwitchB类似,此处不再赘述。

[*SwitchB] ospf
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-0.0.0.0] network 100.100.0.0 0.0.0.255
[*SwitchB-ospf-1-area-0.0.0.0] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit

#配置SwitchA。

[~SwitchA] vlan 100
[*SwitchA-vlan100] quit
[*SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ip address 100.100.0.2 255.255.255.0
[*SwitchA-Vlanif100] quit
[*SwitchA] commit
[*SwitchA] ospf
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-0.0.0.0] network 100.100.0.0 0.0.0.255
[*SwitchA-ospf-1-area-0.0.0.0] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit
  1. 检查配置结果

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

[~SwitchB] display dfs-group 1 m-lag
*                : Local node
Heart beat state : OK
Node 1 *Dfs-Group ID   : 1Priority       : 100Address        : ip address 10.3.3.3State          : MasterCausation      : -System ID      : 0025-9e95-7c11SysName        : SwitchBVersion        : V200R020C00Device Type    : CE6881
Node 2Dfs-Group ID   : 1Priority       : 100Address        : ip address 10.4.4.4State          : BackupCausation      : -System ID      : 0025-9e95-7c31SysName        : SwitchCVersion        : V200R020C00Device Type    : CE6881

查看SwitchB上的M-LAG信息。

[~SwitchB] 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 inconsistent2 -- STP configuration under the port is inconsistent3 -- STP port priority configuration is inconsistent4 -- LACP mode of M-LAG is inconsistent5 -- M-LAG configuration is inconsistent6 -- The number of M-LAG members is inconsistent

查看SwitchC上的M-LAG信息。

[~SwitchC] 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 inconsistent2 -- STP configuration under the port is inconsistent3 -- STP port priority configuration is inconsistent4 -- LACP mode of M-LAG is inconsistent5 -- M-LAG configuration is inconsistent6 -- The number of M-LAG members is inconsistent

在SwitchB、SwitchC、SwitchA上执行display ospf peer brief命令,可查看到OSPF中各邻居的信息。

查看SwitchB上的OSPF邻居信息。

[~SwitchB] display ospf peer briefOSPF Process 1 with Router ID 11.1.1.1                    Peer Statistic Information   Total number of peer(s): 3                                                       Peer(s) in full state: 3   ----------------------------------------------------------------------------Area Id         Interface                  Neighbor id      State0.0.0.0         10GE1/0/1                  11.3.3.3         Full0.0.0.0         Vlanif100                  11.2.2.2         Full  0.0.0.0         Vlanif100                  11.4.4.4         Full

查看SwitchC上的OSPF邻居信息。

[~SwitchC] display ospf peer briefOSPF Process 1 with Router ID 11.2.2.2                    Peer Statistic Information   Total number of peer(s): 3                                                       Peer(s) in full state: 3   ----------------------------------------------------------------------------Area Id         Interface                  Neighbor id      State0.0.0.0         10GE1/0/1                  11.3.3.3         Full0.0.0.0         Vlanif100                  11.1.1.1         Full  0.0.0.0         Vlanif100                  11.4.4.4         Full

查看SwitchA上的OSPF邻居信息。

[~SwitchA] display ospf peer briefOSPF Process 1 with Router ID 11.4.4.4                    Peer Statistic Information   Total number of peer(s): 2                                                       Peer(s) in full state: 2   ----------------------------------------------------------------------------Area Id         Interface                  Neighbor id      State0.0.0.0         Vlanif100                  11.1.1.1         Full  0.0.0.0         Vlanif100                  11.2.2.2         Full

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

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

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

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

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

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

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

  4. 玩转华为数据中心交换机系列 | 配置基本QinQ示例

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

  5. 玩转华为数据中心交换机系列 | 配置M-LAG维护模式下升级示例

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

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

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

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

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

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

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

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

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

最新文章

  1. linux shell ls 列出文件绝对路径
  2. Activiti学习——Activiti与Spring集成
  3. jquery生成一个li_JQuery实现ul中添加LI和删除指定的Li元素功能完整示例
  4. Linux执行定时任务(crontab)遇到的坑
  5. LCFinder 0.3.0 Beta 发布,图像标注与目标检测工具
  6. 深度学习:词嵌入Embedding
  7. C++与Python混合编程
  8. 参考文献在论文中进行引用标注
  9. 锐文科技发布基于国产FPGA的智能网卡芯片
  10. ssm学生学籍管理系统
  11. html5的canvas绘制迷宫地图
  12. win7启动任务管理器快捷键
  13. Hive学习(待续)
  14. 手机信令数据怎么获得_论文推荐 | 基于手机信令数据的大规模通勤模式研究(2020-12-01)...
  15. 线性回归-----标准方程法实现线性回归方程
  16. Paypal与Moneybookers的比较
  17. 2021李宏毅机器学习笔记--21 Anomaly Detection
  18. Android拖动实现(一个流畅的拖动排序DragSortGridView,自动滚屏)
  19. demoのpython学习笔记【1】
  20. 物联网操作系统HelloX V1.85发布公告

热门文章

  1. C++ - 函数返回多个返回值的方法总结
  2. 三星对韩国意味着什么?假如三星破产了,韩国会受到什么影响?
  3. 协同(OA)应用中的七个机制
  4. 盈致科技2021大事件 感恩回首过去,高歌猛进一同共创未来
  5. 区分SLA,SLI,SLO Google 云原生的三个S
  6. x265 命令行参数大全
  7. Word处理控件Aspose.Words功能演示:使用Java合并MS Word文档
  8. rep论文阅读2:ResRep_Lossless CNN Pruning via Decoupling Remembering and Forgetting
  9. docker安装和基础使用
  10. 微程序控制计算机的工作原理,微程序控制器的基本原理详细图解