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

2024-06-04 07:52

本文主要是介绍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的一部分。

这篇关于HCL模拟器下做M-LAG测试(以及和华为配置对比)-二层架构的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1029493

相关文章

windos server2022的配置故障转移服务的图文教程

《windosserver2022的配置故障转移服务的图文教程》本文主要介绍了windosserver2022的配置故障转移服务的图文教程,以确保服务和应用程序的连续性和可用性,文中通过图文介绍的非... 目录准备环境:步骤故障转移群集是 Windows Server 2022 中提供的一种功能,用于在多个

windos server2022里的DFS配置的实现

《windosserver2022里的DFS配置的实现》DFS是WindowsServer操作系统提供的一种功能,用于在多台服务器上集中管理共享文件夹和文件的分布式存储解决方案,本文就来介绍一下wi... 目录什么是DFS?优势:应用场景:DFS配置步骤什么是DFS?DFS指的是分布式文件系统(Distr

关于Maven中pom.xml文件配置详解

《关于Maven中pom.xml文件配置详解》pom.xml是Maven项目的核心配置文件,它描述了项目的结构、依赖关系、构建配置等信息,通过合理配置pom.xml,可以提高项目的可维护性和构建效率... 目录1. POM文件的基本结构1.1 项目基本信息2. 项目属性2.1 引用属性3. 项目依赖4. 构

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d

gradle安装和环境配置全过程

《gradle安装和环境配置全过程》本文介绍了如何安装和配置Gradle环境,包括下载Gradle、配置环境变量、测试Gradle以及在IntelliJIDEA中配置Gradle... 目录gradle安装和环境配置1 下载GRADLE2 环境变量配置3 测试gradle4 设置gradle初始化文件5 i

SpringCloud配置动态更新原理解析

《SpringCloud配置动态更新原理解析》在微服务架构的浩瀚星海中,服务配置的动态更新如同魔法一般,能够让应用在不重启的情况下,实时响应配置的变更,SpringCloud作为微服务架构中的佼佼者,... 目录一、SpringBoot、Cloud配置的读取二、SpringCloud配置动态刷新三、更新@R

MySQL中my.ini文件的基础配置和优化配置方式

《MySQL中my.ini文件的基础配置和优化配置方式》文章讨论了数据库异步同步的优化思路,包括三个主要方面:幂等性、时序和延迟,作者还分享了MySQL配置文件的优化经验,并鼓励读者提供支持... 目录mysql my.ini文件的配置和优化配置优化思路MySQL配置文件优化总结MySQL my.ini文件

C#读取本地网络配置信息全攻略分享

《C#读取本地网络配置信息全攻略分享》在当今数字化时代,网络已深度融入我们生活与工作的方方面面,对于软件开发而言,掌握本地计算机的网络配置信息显得尤为关键,而在C#编程的世界里,我们又该如何巧妙地读取... 目录一、引言二、C# 读取本地网络配置信息的基础准备2.1 引入关键命名空间2.2 理解核心类与方法

最新版IDEA配置 Tomcat的详细过程

《最新版IDEA配置Tomcat的详细过程》本文介绍如何在IDEA中配置Tomcat服务器,并创建Web项目,首先检查Tomcat是否安装完成,然后在IDEA中创建Web项目并添加Web结构,接着,... 目录配置tomcat第一步,先给项目添加Web结构查看端口号配置tomcat    先检查自己的to