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

相关文章

SpringCloud动态配置注解@RefreshScope与@Component的深度解析

《SpringCloud动态配置注解@RefreshScope与@Component的深度解析》在现代微服务架构中,动态配置管理是一个关键需求,本文将为大家介绍SpringCloud中相关的注解@Re... 目录引言1. @RefreshScope 的作用与原理1.1 什么是 @RefreshScope1.

SpringBoot日志配置SLF4J和Logback的方法实现

《SpringBoot日志配置SLF4J和Logback的方法实现》日志记录是不可或缺的一部分,本文主要介绍了SpringBoot日志配置SLF4J和Logback的方法实现,文中通过示例代码介绍的非... 目录一、前言二、案例一:初识日志三、案例二:使用Lombok输出日志四、案例三:配置Logback一

springboot security之前后端分离配置方式

《springbootsecurity之前后端分离配置方式》:本文主要介绍springbootsecurity之前后端分离配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的... 目录前言自定义配置认证失败自定义处理登录相关接口匿名访问前置文章总结前言spring boot secu

一文详解SpringBoot响应压缩功能的配置与优化

《一文详解SpringBoot响应压缩功能的配置与优化》SpringBoot的响应压缩功能基于智能协商机制,需同时满足很多条件,本文主要为大家详细介绍了SpringBoot响应压缩功能的配置与优化,需... 目录一、核心工作机制1.1 自动协商触发条件1.2 压缩处理流程二、配置方案详解2.1 基础YAML

springboot简单集成Security配置的教程

《springboot简单集成Security配置的教程》:本文主要介绍springboot简单集成Security配置的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,... 目录集成Security安全框架引入依赖编写配置类WebSecurityConfig(自定义资源权限规则

SpringBoot中封装Cors自动配置方式

《SpringBoot中封装Cors自动配置方式》:本文主要介绍SpringBoot中封装Cors自动配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录SpringBoot封装Cors自动配置背景实现步骤1. 创建 GlobalCorsProperties

Spring Boot结成MyBatis-Plus最全配置指南

《SpringBoot结成MyBatis-Plus最全配置指南》本文主要介绍了SpringBoot结成MyBatis-Plus最全配置指南,包括依赖引入、配置数据源、Mapper扫描、基本CRUD操... 目录前言详细操作一.创建项目并引入相关依赖二.配置数据源信息三.编写相关代码查zsRArly询数据库数

SpringBoot配置Ollama实现本地部署DeepSeek

《SpringBoot配置Ollama实现本地部署DeepSeek》本文主要介绍了在本地环境中使用Ollama配置DeepSeek模型,并在IntelliJIDEA中创建一个Sprin... 目录前言详细步骤一、本地配置DeepSeek二、SpringBoot项目调用本地DeepSeek前言随着人工智能技

Java异常架构Exception(异常)详解

《Java异常架构Exception(异常)详解》:本文主要介绍Java异常架构Exception(异常),具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1. Exception 类的概述Exception的分类2. 受检异常(Checked Exception)

如何自定义Nginx JSON日志格式配置

《如何自定义NginxJSON日志格式配置》Nginx作为最流行的Web服务器之一,其灵活的日志配置能力允许我们根据需求定制日志格式,本文将详细介绍如何配置Nginx以JSON格式记录访问日志,这种... 目录前言为什么选择jsON格式日志?配置步骤详解1. 安装Nginx服务2. 自定义JSON日志格式各