Eth-trunk :LACP模式链路聚合实战

news2025/7/14 10:49:58

Eth-trunk : LACP模式链路聚合实战

需求描述

  • PC1和PC3数据vlan10 ,网段为192.168.10.0 /24
  • PC2和PC4数据vlan20 ,网段为192.168.20.0 /24
  • 确保设备之间互联互通,使用最大互联带宽并没有环路
  • 确保相同网段的PC可以互通
  • 判断交换机之间的每个端口的角色和状态

拓扑图

在这里插入图片描述

配置思路

  • 配置终端设备
    • 配置PC机的IP地址参数
  • 配置网络设备
    • 先初始化
    • 创建vlan
    • 将接口加入vlan并设置端口模式access
    • eth-trunk
      • 创建eth-trunk的端口
      • 设置eth-trunk模式
      • 添加接口成员
      • 设备端口trunk并允许所有vlan通过

配置命令

二层交换机配置 s3 s4 s5 s6

  • s3
 1. S3交换机的初始配置

    <Huawei>u  t  m       \\关闭信息干扰

    <Huawei>system-view   \\进入系统视图

    [Huawei]sysname  S3     \\设置交换机的名字为S3
2. S3创建vlan 10 20

    [S3]vlan  batch  10  20    \\创建vlan 10  20
3. S3将e0/0/1加入vlan10 并设置链路是access链路

    [S3]int e0/0/1   [\\进入接口0/0](file:///\\\\进入接口0/0)/1

    [S3-Ethernet0/0/1]port link-type access    \\设置链路为接入链路(access链路)

    [S3-Ethernet0/0/1]port default  vlan  10   [\\将接口加入vlan10](\\\\将接口加入vlan10)
4. 创建链路聚合接口eth-trunk 1 并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

    [S3]interface  Eth-Trunk 1        \\[创建链路聚合的端口1](file:///\\\\创建链路聚合的端口1)

    [S3-Eth-Trunk1]mode lacp-static    \\设置链路为动态lacp

    [S3-Eth-Trunk1]trunkport e0/0/3    \\将接口加入到负载模式

    [S3-Eth-Trunk1]trunkport e0/0/4	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

    [S3-Eth-Trunk1]port link-type trunk  \\设置为trunk链路

    [S3-Eth-Trunk1] port  trunk allow-pass vlan all  \\并允许所有vlan通过

    [S3-Eth-Trunk1]display eth-trunk 1		  \\查看 eth-trunk
  • s4
 1. S4交换机的初始配置

    <Huawei>u  t  m       \\关闭信息干扰

    <Huawei>system-view   \\进入系统视图

    [Huawei]sysname  S4     \\设置交换机的名字为S4
2. S4创建vlan 10 20

    [S4]vlan  batch  10  20    \\创建vlan 10  20
3. S4将e0/0/1加入vlan10 并设置链路是access链路

    [S4]int e0/0/1   [\\进入接口0/0](file:///\\\\进入接口0/0)/1

    [S4-Ethernet0/0/1]port link-type access    \\设置链路为接入链路(access链路)

    [S4-Ethernet0/0/1]port default  vlan  20   \\将接口加入vlan20
4. 创建链路聚合接口eth-trunk 1 并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

    [S4]interface  Eth-Trunk 2        \\[创建链路聚合的端口2](file:///\\\\创建链路聚合的端口1)

    [S4-Eth-Trunk2]mode lacp-static    \\设置链路为动态lacp

    [S4-Eth-Trunk2]trunkport e0/0/5    \\将接口加入到负载模式

    [S4-Eth-Trunk2]trunkport e0/0/6	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

    [S4-Eth-Trunk2]port link-type trunk  \\设置为trunk链路

    [S4-Eth-Trunk2] port  trunk allow-pass vlan all  \\并允许所有vlan通过

    [S4-Eth-Trunk2]display eth-trunk 1		  \\查看 eth-trunk
  • s5
 1. S5交换机的初始配置

    <Huawei>u  t  m       \\关闭信息干扰

    <Huawei>system-view   \\进入系统视图

    [Huawei]sysname  S5     \\设置交换机的名字为S5
2. S5创建vlan 10 20

    [S5]vlan  batch  10  20    \\创建vlan 10  20
3. S5将e0/0/1加入vlan10 并设置链路是access链路

    [S5]int e0/0/1   [\\进入接口0/0](file:///\\\\进入接口0/0)/1

    [S5-Ethernet0/0/1]port link-type access    \\设置链路为接入链路(access链路)

    [S5-Ethernet0/0/1]port default  vlan  10   [\\将接口加入vlan10](\\\\将接口加入vlan10)
4. 创建链路聚合接口eth-trunk 1 并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

    [S5]interface  Eth-Trunk 1        \\[创建链路聚合的端口1](file:///\\\\创建链路聚合的端口1)

    [S5-Eth-Trunk1]mode lacp-static    \\设置链路为动态lacp

    [S5-Eth-Trunk1]trunkport e0/0/3    \\将接口加入到负载模式

    [S5-Eth-Trunk1]trunkport e0/0/4	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

    [S5-Eth-Trunk1]port link-type trunk  \\设置为trunk链路

    [S5-Eth-Trunk1] port  trunk allow-pass vlan all  \\并允许所有vlan通过

    [S5-Eth-Trunk1]display eth-trunk 1		  \\查看 eth-trunk
  • s6
 1. S6交换机的初始配置

    <Huawei>u  t  m       \\关闭信息干扰

    <Huawei>system-view   \\进入系统视图

    [Huawei]sysname  S6     \\设置交换机的名字为S6
2. S6创建vlan 10 20

    [S6]vlan  batch  10  20    \\创建vlan 10  20
3. S6将e0/0/1加入vlan10 并设置链路是access链路

    [S6]int e0/0/1   [\\进入接口0/0](file:///\\\\进入接口0/0)/1

    [S6-Ethernet0/0/1]port link-type access    \\设置链路为接入链路(access链路)

    [S6-Ethernet0/0/1]port default  vlan  20   \\将接口加入vlan20
4. 创建链路聚合接口eth-trunk 1 并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

    [S6]interface  Eth-Trunk 2        \\[创建链路聚合的端口2](file:///\\\\创建链路聚合的端口1)

    [S6-Eth-Trunk2]mode lacp-static    \\设置链路为动态lacp

    [S6-Eth-Trunk2]trunkport e0/0/5    \\将接口加入到负载模式

    [S6-Eth-Trunk2]trunkport e0/0/6	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

    [S6-Eth-Trunk2]port link-type trunk  \\设置为trunk链路

    [S6-Eth-Trunk2] port  trunk allow-pass vlan all  \\并允许所有vlan通过

    [S6-Eth-Trunk2]display eth-trunk 1		  \\查看 eth-trunk

三层交换机配置 s1 s2

  • s1
 S1交换机的初始配置

  <Huawei>u  t  m    \\关闭信息干扰
  <Huawei>system-view   \\进入系统视图
  [Huawei]sysname  S1     \\设置交换机的名字为S1
S1创建vlan 10 20
  [S1]vlan  batch  10  20         \\创建vlan 10  20

3.创建链路聚合接口eth-trunk 1 、2并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

  [S1]interface  Eth-Trunk 1        \\[创建链路聚合的端口1](file:///\\\\创建链路聚合的端口1)
  [S1-Eth-Trunk1]mode lacp-static    \\设置链路为动态lacp
  [S1-Eth-Trunk1]trunkport g0/0/3    \\将接口加入到负载模式
  [S1-Eth-Trunk1]trunkport g0/0/4	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)
  [S1-Eth-Trunk1]port link-type trunk  \\设置为trunk链路
  [S1-Eth-Trunk1] port  trunk allow-pass vlan all  \\并允许所有vlan通过
  [S1]interface  Eth-Trunk 2        \\[创建链路聚合的端口2](file:///\\\\创建链路聚合的端口1)
  [S1-Eth-Trunk2]mode lacp-static    \\设置链路为动态lacp
  [S1-Eth-Trunk2]trunkport g0/0/5    \\将接口加入到负载模式
  [S1-Eth-Trunk2]trunkport g0/0/6	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)
  [S1-Eth-Trunk2]port link-type trunk  \\设置为trunk链路
  [S1-Eth-Trunk2] port  trunk allow-pass vlan all  \\并允许所有vlan通过
  [S1]interface  Eth-Trunk 3        \\[创建链路聚合的端口3](file:///\\\\创建链路聚合的端口1)
  [S1-Eth-Trunk3]mode lacp-static    \\设置链路为动态lacp
  [S1-Eth-Trunk3]trunkport g0/0/7    \\将接口加入到负载模式
  [S1-Eth-Trunk3]trunkport g0/0/8	   
  [S1-Eth-Trunk3]trunkport g0/0/9	   

  [S1-Eth-Trunk3]port link-type trunk  \\设置为trunk链路

  [S1-Eth-Trunk3] port  trunk allow-pass vlan all  \\并允许所有vlan通过

  

  [S1]display eth-trunk 1		  \\查看 eth-trunk

  [S1]display eth-trunk 2		  \\查看 eth-trunk

  [S1]display eth-trunk 3		  \\查看 eth-trunk

[S1]display eth-trunk 1 \查看 eth-trunk

在这里插入图片描述

[S1]display eth-trunk 2 \查看 eth-trunk
在这里插入图片描述

  • s2
 <Huawei>u  t  m    \\关闭信息干扰
<Huawei>system-view   \\进入系统视图
[Huawei]sysname  S2     \\设置交换机的名字为S2
S2创建vlan 10 20
[S2]vlan  batch  10  20         \\创建vlan 10  20
创建链路聚合接口eth-trunk 1 、2并将设置模式为lacp、加入成员并设置链路为tunk并允许所有vlan通过

  [S2]interface  Eth-Trunk 1        \\[创建链路聚合的端口1](file:///\\\\创建链路聚合的端口1)

  [S2-Eth-Trunk1]mode lacp-static    \\设置链路为动态lacp

  [S2-Eth-Trunk1]trunkport g0/0/3    \\将接口加入到负载模式

  [S2-Eth-Trunk1]trunkport g0/0/4	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

  [S2-Eth-Trunk1]port link-type trunk  \\设置为trunk链路

  [S2-Eth-Trunk1] port  trunk allow-pass vlan all  \\并允许所有vlan通过

  [S2-Eth-Trunk1]display eth-trunk 1		  \\查看 eth-trunk

  

  

  [S2]interface  Eth-Trunk2        \\[创建链路聚合的端口2](file:///\\\\创建链路聚合的端口1)

  [S2-Eth-Trunk2]mode lacp-static    \\设置链路为动态lacp

  [S2-Eth-Trunk2]trunkport g0/0/5    \\将接口加入到负载模式

  [S2-Eth-Trunk2]trunkport g0/0/6	    [\\将接口加入到负载模式](file:///\\\\将接口加入到负载模式)

  [S2-Eth-Trunk2]port link-type trunk  \\设置为trunk链路

  [S2-Eth-Trunk2] port  trunk allow-pass vlan all  [\\并允许所有vlan通过](\\\\并允许所有vlan通过)

  

  [S2-Eth-Trunk2]display eth-trunk 2		  \\查看 eth-trunk

  

  [S2]interface  Eth-Trunk3        \\[创建链路聚合的端口3](file:///\\\\创建链路聚合的端口1)

  [S2-Eth-Trunk3]mode lacp-static    \\设置链路为动态lacp

  [S2-Eth-Trunk3]trunkport g0/0/7    \\将接口加入到负载模式

  [S2-Eth-Trunk3]trunkport g0/0/8	   
  [S1-Eth-Trunk3]trunkport g0/0/9	

  [S2-Eth-Trunk3]port link-type trunk  \\设置为trunk链路

  [S2-Eth-Trunk3] port  trunk allow-pass vlan all  \\并允许所有vlan通过

  [S2-Eth-Trunk3]display eth-trunk 3		  \\查看 eth-trunk

[S2-Eth-Trunk2]display eth-trunk 2 \查看 eth-trunk
在这里插入图片描述
[S2-Eth-Trunk3]display eth-trunk 3 \查看 eth-trunk

设置最大 链路数,及开启抢占功能

Local:本地信息 Partner:对端信息
Svstem Prioritv:32768 系统的优先级
System ID:4clf-cc4e-5 系统的mac地址
MAX Active-linknumber:8 最大的活动链路数是8条
链路数是可以进行调整的我们可以调整为2条
Number of Up Port In Trunk:0 目前有几条

S2设置他的链路为2:

[S2]display eth-trunk 1		\\查看 eth-trunk

[S2]int  eth-trunk 1		    \\进入eth-trunk1

[S2-Eth-Trunk1]max active-linknumber 2    [\\设置为2](file:///\\\\设置为2)条链路

修改sw2为主设备,默认值是32768 我们可以设置为100

[S2]lacp priority 100		     \\设置默认值为100

[S2]display eth-trunk  1		\\查看 eth-trunk

配置启用抢占模式 S1  S2都需要开启

[S2]display eth-trunk 3		            \\查看 eth-trunk

[S2-Eth-Trunk1]lacp preempt enable   	[\\配置抢占模式](file:///\\\\配置抢占模式)



[S1]display eth-trunk 3	             \\查看 eth-trunk

[S1-Eth-Trunk1]lacp preempt enable   	 [\\配置抢占模式](file:///\\\\配置抢占模式)





Preempt Delay Time:30  当前抢占功能已开启 30秒后抢

[S2]display eth-trunk \查看 eth-trunk
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

总结:

 1、进入eth-trunk 视图
 		interface eth-trunk 1 
 	设置模式
 		mode lacp-static
 	添加链路
 		trunkport g0/0/1
 	设置端口模式
 		port link-type trunk 
 		port trunk allow-pass vlan all
 	设置最大链路数
 		max-active-linknumber 2 
 	开启抢占模式
		 lacp preempt enable 
 设置主设备的优先级
 	默认值是32768 我们可以设置为100
	[S2]lacp priority 100

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/369205.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Spark分布式内存计算框架——离线综合实战】6. 广告投放的地域分布

3.3 广告投放的地域分布 按照产品需求&#xff0c;需要完成如下统计的报表&#xff1a; 从上面的统计报表可以看出&#xff0c;其中包含三个“率”计算&#xff0c;说明如下&#xff1a; 报表字段信息 针对广告投放的地域分布统计&#xff0c;各个指标字段信息说明如下&…

JDBC学习(复习)-面试总结详细

JDBC详细介绍一、JDBC详细介绍二、jdbc面试总结2.1 JDBC操作数据库的步骤 &#xff1f;2.2 JDBC中的Statement 和PreparedStatement&#xff0c;CallableStatement的区别&#xff1f;2.3 JDBC中大数据量的分页解决方法?2.4 说说数据库连接池工作原理和实现方案&#xff1f;2.4…

九方财富冲刺上市:付费用户开始减少,退款金额飙升至4.9亿元

日前&#xff0c;九方财富控股有限公司&#xff08;下称“九方财富”&#xff09;通过港交所上市聆讯&#xff0c;并披露了聆讯后招股书。据贝多财经了解&#xff0c;九方财富最早于2021年8月31日在港交所递表&#xff0c;后在2022年3月、9月分别进行了更新。 据每日经济新闻报…

vue3.0 模板语法

文章目录前言&#xff1a;1. 内容渲染指令1.1 v-text1.2 {{ }}插值表达式1.3 v-html2. 双向绑定指令2.1 v-model2.2 v-model的修饰符3. 属性绑定指令3.1 动态绑定多个属性值3.2 绑定class和style属性4.条件渲染指令4.1 v-if、v-else-if、v-else4.2 v-show4.3 v-if与v-show的区别…

RebbitMQ 消息队列(简单使用)

消息队列介绍 MQ的优势 1.业务解耦&#xff1a;不同系统消费信息互不关联&#xff0c;灵活增减系统数量&#xff0c;修改某个系统其他系统也不影响 2.异步提速&#xff1a;不同系统之间可同时响应&#xff0c;提升并发量 3.削峰填谷&#xff1a;处理消息高峰期&#xff0c;均摊…

《图机器学习》-Graph Neural Network

前言 回顾之前的Node Embedding&#xff1a; 将图中的节点嵌入到d维空间&#xff0c;并确保图中相似的节点能够嵌在一起。 即学习一个编码器ENCENCENC确保图的节点嵌入到embedding space依然能够描述原空间节点之间的相似性。 在Node Embedding中&#xff0c;我们需要设计&…

DEXTUpload .NET增强的上传速度和可靠性

DEXTUpload .NET增强的上传速度和可靠性 DEXTUpload.NET Pro托管在Windows操作系统上的Internet Information Server(IIS)上&#xff0c;服务器端组件基于HTTP协议&#xff0c;支持从web浏览器到web服务器的文件上载。它也可以在ASP.NET服务器应用程序平台开发的任何网站上使用…

记一次攻防演练溯源实例

缘起 在今年的攻防期间&#xff0c;通过安全设备告警分析&#xff0c;需要对某个源攻击IP进行溯源反制&#xff0c;并且需要记录整个溯源过程和提交溯源报告。 开展溯源 研判 在溯源之前&#xff0c;首先应该判断是否真的存在攻击行为&#xff0c;攻击的特征&#xff0c;攻…

Linux学习(7.5)linux目录配置与重点回顾

鸟哥的 Linux 私房菜 -- Linux 的文件权限与目录配置 (vbird.org) 怎么记啊&#xff0c;直接点进去看吧 目录 Linux目录配置的依据--FHS 绝对路径与相对路径 重点回顾 以下内容转载自鸟哥的Linux私房菜 Linux目录配置的依据--FHS 是希望让使用者可以了解到已安装软件通常…

ARouter::Compiler The user has configuration the module name, it was

学习组件化使用的是阿里的ARouter&#xff0c;我是照着案例敲的&#xff0c;在编译的时候报了这么一个错。 我查了好多资料&#xff0c;大部分都是说build.gradle 配置出现了问题&#xff0c;比如没有配置 javaCompileOptions {annotationProcessorOptions {arguments [AROUTE…

shader(光栅化)

1.定义将模型经过mvp得到的标准立方体映射到屏幕。屏幕是像素数组组成&#xff0c;像素是一个颜色均匀的小方块。2.屏幕变换矩阵3.直接采样&#xff08;锯齿严重&#xff09;4.先模糊再采样&#xff08;抗锯齿有好转&#xff09;5.傅里叶变换6.高通滤波&#xff08;图像边界&am…

robot remote server用这个server去远程获取ip

server端配置&#xff1a; 1、安装python环境 2、下载robot remote server 下载地址&#xff1a;https://pypi.python.org/pypi/robotremoteserver/&#xff08;不要用pip下载&#xff0c;把robotremoteserver.py文件下载下来&#xff09; 3、首先创建一个目录E:\rfremote\ &a…

canvas初学2

一、碰撞检测 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta http-equiv"X-UA-Compatible" content"IEedge"><meta name"viewport" content"widthdevice-width,…

Linux下java服务占用cpu过高如何处理

Linux下java服务占用cpu过高如何处理 top命令查看进程信息 top按下shiftp,按cpu使用率排行,可见进程1932占用最高,并且是一个java服务 使用jps命令确认java服务 [rootVM-16-16-centos ~]# jps 1011 Jps 9462 yuan_back-0.0.1-SNAPSHOT.jar 1932 spigot-1.18.jar查找异常进程中…

在windows11上安装openssh服务端并修改端口号

在windows11上安装openssh服务端并修改端口号 目录1.软件下载地址2.修改端口3.启动ssh原文链接&#xff1a;https://blog.csdn.net/qq_62129885/article/details/1268467751.软件下载地址 Release v9.2.0.0p1-Beta PowerShell/Win32-OpenSSH (github.com) https://github.co…

【BBuf的CUDA笔记】八,对比学习OneFlow 和 FasterTransformer 的 Softmax Cuda实现

0x1. OneFlow/FasterTransformer SoftMax CUDA Kernel 实现学习 这篇文章主要学习了oneflow的softmax kernel实现以及Faster Transformer softmax kernel的实现&#xff0c;并以个人的角度分别解析了原理和代码实现&#xff0c;最后对性能做一个对比方便大家直观的感受到onefl…

光伏行业规模“狂飙”至87.41GW,机器视觉检测成保量提质“王牌”?

在产业政策引导和市场需求驱动的双重作用下&#xff0c;我国光伏产业已成为具备国际竞争优势的产业&#xff0c;在制造规模、技术水平和市场份额等方面均位居全球前列。近日&#xff0c;国家能源局公布了2022年光伏新增装机规模&#xff1a;87.41GW&#xff0c;增长率59.27%。行…

一文带你了解MySQL的Server层和引擎层是如何交互的?

对于很多开发小伙伴来说&#xff0c;每天写SQL是必不可少的一项工作。 那不知道大家有没有深入了解过&#xff0c;当我们的一条SQL命令被执行时&#xff0c;MySQL是如何把数据从硬盘/内存中查出来并展示到用户面前的呢&#xff1f; 其实&#xff0c;MySQL也没有大家想象的那么…

DateTimeParseException

前端请求为字符串的时间格式2023-02-16 19:19:51&#xff0c;服务端用LocalDateTime类型接收时报解析异常java.time.format.DateTimeParseException: Text 2023-02-16 19:19:51 could not be parsed at index 10方法一&#xff1a;JsonFormat(shape Shape.STRING, pattern &q…

第四章.神经网络—BP神经网络

第四章.神经网络 4.3 BP神经网络 BP神经网络(误差反向传播算法)是整个人工神经网络体系中的精华&#xff0c;广泛应用于分类识别&#xff0c;逼近&#xff0c;回归&#xff0c;压缩等领域&#xff0c;在实际应用中&#xff0c;大约80%的神经网络模型都采用BP网络或BP网络的变化…