当前位置: 首页 > news >正文

HCL模拟器下做M-LAG测试(以及和华为配置对比)-二层架构

1.简单二层架构

1.1 拓扑图

在这里插入图片描述

1.2 配置

1.2.1 Leaf1配置

system-mac必须配置,否则会有一个node处于unknown状态,即使配置主节点的mac,主节点也需要配置system-mac为自己的mac

## M-LAG配置[Leaf1] m-lag system-mac 0001-0001-0001			# 手动设置MAC,通常建议使用主设备的系统MAC,另一台设备配置需相同
[Leaf1] m-lag system-number 1				# 数字小的成为主设备,
[Leaf1] m-lag system-priority 130				# 两台的优先级需要一样
[Leaf1] m-lag mad exclude interface GigabitEthernet1/0/13	# 配置保留接口,这个接口会在脑裂后不会被关闭
[Leaf1] m-lag consistency-check disable			# 模拟器中配置完成后,会报一致性检测失败的错,导致接口起不来,使用这条命令能解决,但生产环境中慎用## keepalive链路配置[Leaf1] interface g1/0/13
[Leaf1-GigabitEthernet1/0/13]ip address 10.1.1.1 255.255.255.252
[Leaf1] m-lag keepalive ip destination 10.1.1.2 source 10.1.1.1	# 配置DAD检测接口## peer-link接口配置[Leaf1] interface Bridge-Aggregation10
[Leaf1-Bridge-Aggregation10] link-aggregation mode dynamic
[Leaf1]interface GigabitEthernet 1/0/11
[Leaf1-GigabitEthernet1/0/11] port link-aggregation group 10
[Leaf1]interface GigabitEthernet 1/0/12
[Leaf1-GigabitEthernet1/0/12] port link-aggregation group 10
[Leaf1] interface Bridge-Aggregation10
[Leaf1-Bridge-Aggregation10] port m-lag peer-link 1## M-LAG接口配置[Leaf1]int Bridge-Aggregation 5
[Leaf1-Bridge-Aggregation5] port link-type trunk
[Leaf1-Bridge-Aggregation5] port trunk permit vlan all
[Leaf1-Bridge-Aggregation5] link-aggregation mode dynamic
[Leaf1]interface GigabitEthernet 1/0/1
[Leaf1-GigabitEthernet1/0/1] port link-aggregation group 5
[Leaf1]int Bridge-Aggregation 5
[Leaf1-Bridge-Aggregation5] port m-lag group 5

华为的做法中,peer-link需要关闭STP

1.2.2 Leaf2配置

Leaf2和Leaf1的配置只有细微的差异

## M-LAG配置[Leaf2] m-lag system-mac 0001-0001-0001			
[Leaf2] m-lag system-number 2				
[Leaf2] m-lag system-priority 130				
[Leaf2] m-lag mad exclude interface GigabitEthernet1/0/13	
[Leaf2] m-lag consistency-check disable			## keepalive链路配置[Leaf2] interface g1/0/13
[Leaf1-GigabitEthernet1/0/13]ip address 10.1.1.2 255.255.255.252
[Leaf2] m-lag keepalive ip destination 10.1.1.1 source 10.1.1.2	## peer-link接口配置[Leaf2] interface Bridge-Aggregation10
[Leaf1-Bridge-Aggregation10] link-aggregation mode dynamic
[Leaf2]interface GigabitEthernet 1/0/11
[Leaf1-GigabitEthernet1/0/11] port link-aggregation group 10
[Leaf2]interface GigabitEthernet 1/0/12
[Leaf1-GigabitEthernet1/0/12] port link-aggregation group 10
[Leaf2] interface Bridge-Aggregation10
[Leaf1-Bridge-Aggregation10] port m-lag peer-link 1## M-LAG接口配置[Leaf2]int Bridge-Aggregation 5
[Leaf1-Bridge-Aggregation5] port link-type trunk
[Leaf1-Bridge-Aggregation5] port trunk permit vlan all
[Leaf1-Bridge-Aggregation5] link-aggregation mode dynamic
[Leaf2]interface GigabitEthernet 1/0/1
[Leaf1-GigabitEthernet1/0/1] port link-aggregation group 5
[Leaf2]int Bridge-Aggregation 5
[Leaf1-Bridge-Aggregation5] port m-lag group 5

1.2.3 SW配置

下行交换机上只需要配置链路聚合即可

[H3C]interface Bridge-Aggregation 5
[H3C-Bridge-Aggregation5] port link-type trunk
[H3C-Bridge-Aggregation5] port trunk permit vlan all
[H3C-Bridge-Aggregation5] link-aggregation mode dynamic[H3C] interface range GigabitEthernet 1/0/1 to GigabitEthernet 1/0/2
[H3C-if-range] port link-aggregation group 5

1.3 配置验证

这里只验证基本的通信即可,因此在三台交换机上都起了一个VLAN100,并测试连通性,主要查看的内容是m-lag配置是否生效,已经生成树是否达到的预期的效果

1.3.1 M-LAG

[Leaf1]dis m-lag system System information
Local system number: 1                      Peer system number: 2
Local system MAC: 0001-0001-0001            Peer system MAC: 0001-0001-0001
Local system priority: 130                  Peer system priority: 130
Local bridge MAC: a6ca-1833-0100            Peer bridge MAC: a6ca-3325-0200
Local effective role: Primary               Peer effective role: Secondary
Health level: 0
Standalone mode on split: Disabled
In standalone mode: NoSystem timer information
Timer                      State       Value (s)    Remaining time (s)
Auto recovery              Disabled    -            -
Restore delay              Disabled    300          -
Consistency-check delay    Disabled    150          -
Standalone delay           Disabled    -            -
Role to None delay         Disabled    60           -

交换机上看到的对端设备为逻辑上的一台设备

[H3C]dis link-aggregation verbose 
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing 
Port Status: S -- Selected, U -- Unselected, I -- Individual 
Port: A -- Auto port, M -- Management port, R -- Reference port 
Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation, D -- Synchronization, E -- Collecting, F -- Distributing, G -- Defaulted, H -- Expired Aggregate Interface: Bridge-Aggregation5
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, a6a7-cb71-0300
Local: Port                Status   Priority Index    Oper-Key               FlagGE1/0/1             S        32768    1        1                      {ACDEF}GE1/0/2             S        32768    2        1                      {ACDEF}
Remote: Actor               Priority Index    Oper-Key SystemID               Flag   GE1/0/1(R)          32768    16387    40005    0x82  , 0001-0001-0001 {ACDEF}GE1/0/2             32768    32771    40005    0x82  , 0001-0001-0001 {ACDEF}

1.3.2 生成树

下面是Leaf1和Leaf2上关于VLAN100的生成树信息

[Leaf1-Bridge-Aggregation5]dis stp ins 0 int b5
-------[CIST Global Info][Mode MSTP]-------Bridge ID           : 32768.0001-0001-0001Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20Root ID/ERPC        : 32768.0001-0001-0001, 0RegRoot ID/IRPC     : 32768.0001-0001-0001, 0RootPort ID         : 0.0BPDU-Protection     : DisabledBPDU Filter         : DisabledBridge Config-Digest-Snooping     : DisabledTC or TCN received  : 15Time since last TC  : 0 days 0h:6m:52s----[Port5125(Bridge-Aggregation5)][FORWARDING][M-LAG]----Port protocol       : EnabledPort role           : Designated Port (Boundary)Port ID             : 128.5125Port cost(Legacy)   : Config=auto, Active=18Desg.bridge/port    : 32768.0001-0001-0001, 128.1029Port edged          : Config=disabled, Active=disabledPort filter         : Config=default, Active=disabledPoint-to-Point      : Config=auto, Active=trueTransmit limit      : 10 packets/hello-timeTC-Restriction      : DisabledRole-Restriction    : DisabledProtection type     : Config=none, Active=noneMST BPDU format     : Config=auto, Active=802.1sPort Config-Digest-Snooping     : DisabledRapid transition    : TrueNum of VLANs mapped : 2Port times          : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 20BPDU sent           : 208TCN: 0, Config: 0, RST: 0, MST: 208BPDU received       : 2TCN: 0, Config: 0, RST: 0, MST: 2
[Leaf2-Bridge-Aggregation5]dis stp ins 0 interface b5
-------[CIST Global Info][Mode MSTP]-------Bridge ID           : 32768.0001-0001-0001Bridge times        : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20Root ID/ERPC        : 32768.0001-0001-0001, 0RegRoot ID/IRPC     : 32768.0001-0001-0001, 0RootPort ID         : 0.0BPDU-Protection     : DisabledBPDU Filter         : DisabledBridge Config-Digest-Snooping     : DisabledTC or TCN received  : 20Time since last TC  : 0 days 0h:9m:39s----[Port5125(Bridge-Aggregation5)][FORWARDING][M-LAG]----Port protocol       : EnabledPort role           : Designated Port (Boundary)Port ID             : 128.5125Port cost(Legacy)   : Config=auto, Active=18Desg.bridge/port    : 32768.0001-0001-0001, 128.1029Port edged          : Config=disabled, Active=disabledPort filter         : Config=default, Active=disabledPoint-to-Point      : Config=auto, Active=trueTransmit limit      : 10 packets/hello-timeTC-Restriction      : DisabledRole-Restriction    : DisabledProtection type     : Config=none, Active=noneMST BPDU format     : Config=auto, Active=802.1sPort Config-Digest-Snooping     : DisabledRapid transition    : TrueNum of VLANs mapped : 2Port times          : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 20BPDU sent           : 0TCN: 0, Config: 0, RST: 0, MST: 0BPDU received       : 0TCN: 0, Config: 0, RST: 0, MST: 0

可以看到,两边的桥ID都是一模一样的,说明对于VLAN100,两台leaf交换机都充当了根桥的角色,实现了逻辑上的一台设备

华为交换机的M-lag组中,主设备会把ID信息自动同步到备设备中,让下游的交换机看到的对端设备是逻辑上的一台,这才能够让LAG建立起来,对于STP,需要手工将两台设备的ID配置成一直,来保证两台交换机都是根桥。

在H3C的交换机上正好相反,需要在M-lag中手工配置MAC,STP会直接使用这个MAC作为ID的一部分。

相关文章:

  • k8s更改master节点IP
  • Pycharm创建Conda虚拟环境时显示CondaHTTPErOT
  • SpringBoot高手之路-springboot原理篇
  • 【深度学习基础】模型文件介绍
  • Tomcat 配置:一文掌握所有要点
  • 【学习笔记】Redis-AOF日志重写的机制
  • 【AI论文与新生技术】Follow-Your-Emoji:精细可控且富有表现力的自由式人像动画技术
  • 【深度学习】目标检测,Faster-RCNN算法训练,使用mmdetection训练
  • Spring boot项目
  • 商城项目【尚品汇】07分布式锁-2 Redisson篇
  • npm发布自己的插件包
  • Ansys的电磁场分析和系统电路仿真软件Electronics 2024 R1版本在Windows系统的下载与安装配置
  • 离散数学---树
  • leetcode 所有可能的路径(图的遍历)
  • Ansible——unarchive模块
  • [分享]iOS开发-关于在xcode中引用文件夹右边出现问号的解决办法
  • canvas 五子棋游戏
  • CSS3 变换
  • CSS实用技巧
  • IP路由与转发
  • laravel5.5 视图共享数据
  • Lsb图片隐写
  • php ci框架整合银盛支付
  • scala基础语法(二)
  • 机器学习 vs. 深度学习
  • 聚类分析——Kmeans
  • 聊聊directory traversal attack
  • 每天10道Java面试题,跟我走,offer有!
  • 让你的分享飞起来——极光推出社会化分享组件
  • 容器服务kubernetes弹性伸缩高级用法
  • 入职第二天:使用koa搭建node server是种怎样的体验
  • 使用API自动生成工具优化前端工作流
  • 《天龙八部3D》Unity技术方案揭秘
  • 昨天1024程序员节,我故意写了个死循环~
  • ​ssh-keyscan命令--Linux命令应用大词典729个命令解读
  • ​一帧图像的Android之旅 :应用的首个绘制请求
  • #LLM入门|Prompt#1.8_聊天机器人_Chatbot
  • #php的pecl工具#
  • $GOPATH/go.mod exists but should not goland
  • (007)XHTML文档之标题——h1~h6
  • (PySpark)RDD实验实战——取一个数组的中间值
  • (多级缓存)缓存同步
  • (附源码)ssm基于web技术的医务志愿者管理系统 毕业设计 100910
  • (三十)Flask之wtforms库【剖析源码上篇】
  • (图文详解)小程序AppID申请以及在Hbuilderx中运行
  • (学习日记)2024.03.25:UCOSIII第二十二节:系统启动流程详解
  • (转)linux 命令大全
  • (转)Mysql的优化设置
  • (转载)(官方)UE4--图像编程----着色器开发
  • (转载)在C#用WM_COPYDATA消息来实现两个进程之间传递数据
  • (最全解法)输入一个整数,输出该数二进制表示中1的个数。
  • *上位机的定义
  • ../depcomp: line 571: exec: g++: not found
  • .NET CF命令行调试器MDbg入门(一)
  • .Net 基于MiniExcel的导入功能接口示例