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

news/2024/4/18 14:51:59/文章来源:https://blog.csdn.net/weixin_51079220/article/details/129202563

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  203.创建链路聚合接口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.luyixian.cn/news_show_73817.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ros下用kinectv2运行orbslam2

目录 前提 创建工作空间 orbslam2源码配置、测试&#xff1a; 配置usb_cam ROS功能包 配置kinect 前提 vim 、 cmake 、 git 、 gcc 、 g 这些一般都装了 主要是Pangolin 、 OpenCV 、 Eigen的安装 18.04建议Pangolin0.5 创建工作空间 我们在主目录下创建一个catkin_…

Node 10.0.8.6:9003 is unknown to cluster

解决方案解决方案一解决方案一 ① 概念介绍 公网ip&#xff1a;就是任意两台连接了互联网的电脑可以互相ping ip,能够通的ip 内网ip&#xff1a;只是在内网中使用无法与外网连接的ip ②问题背景 在腾讯云上搭建的一个redis集群&#xff0c;集群启动后 可以看到启动节点…

TX Text Control .NET Server for ASP.NET 31.0 SP2 CRK

用于 ASP.NET 31.0 SP2 的 TX 文本控件 .NET 服务器 用于 ASP.NET 的 TX 文本控件 .NET 服务器 TX Text Control Server for ASP.NET 是用于 Web 应用程序或服务的服务器端组件。它是一个完全可编程的 ASP.NET 文字处理器引擎&#xff0c;提供了广泛的文字处理功能。使用 TX Te…

C++中的内存管理

文章目录前言1.C中内存空间的划分2.C内存管理方式1.对内置类型的处理2.对自定义类型的处理3.new和delete实现原理4.定位new3.总结1. malloc/free和new/delete的区别2. 内存泄漏前言 C中的内存空间划分和C语言是很像的&#xff0c;基本上区别不大。但是因C中&#xff0c;引入了…

davis2016评估教程

DAVIS 2016是VOS任务中的一个经典的benchmark&#xff0c;但是一些VOT的算法有时候也可以预测mask&#xff0c;所以也会在上面测一测性能&#xff0c;本次就随手记录一下自己评测的过程&#xff0c;有需要的小伙伴可以往下看。 DAVIS 2016数据集官方项目网站&#xff1a;https:…

TCP四次挥手

TCP 四次挥手过程是怎样的&#xff1f; TCP 断开连接是通过四次挥手方式。 双方都可以主动断开连接&#xff0c;断开连接后主机中的「资源」将被释放&#xff0c;四次挥手的过程如下图&#xff1a; 客户端打算关闭连接&#xff0c;此时会发送一个 TCP 首部 FIN 标志位被置为 1…

node报错

记录bug:运行 npx -p storybook/cli sb init 时报错gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exegyp info spawn args [gyp info spawn args build/binding.sln,gyp info spawn args /nologo,gyp info spawn args…

prometheus + alterManager + 飞书通知,实现服务宕机监控告警;实测可用

架构设计图 最终效果图 项目准备 xml依赖 <!-- 监控相关 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>io.…

消息队列--Kafka

Kafka简介集群部署配置Kafka测试Kafka1.Kafka简介 数据缓冲队列。同时提高了可扩展性。具有峰值处理能力&#xff0c;使用消息队列能够使关键组件顶住突发的访问压力&#xff0c;而不会因为突发的超负荷的请求而完全崩溃。 Kafka是一个分布式、支持分区的&#xff08;partition…

JAVA 8 新特性 Lamdba表达式

Java8 新特性&#xff1a; 1、Lamdba表达式 2、函数式接口 3、方法引用和构造引用 4、Stream API 5、接口中的默认方法和静态方法 6、新时间日期API 7、Optional 8、其他特性 Java8 优势&#xff1a;速度快、代码更少&#xff08;增加了新的语法 Lambda 表达式&#xff09;、强…

Android 架构 MVC MVP MVVM,这一波你应该了然于心

MVC&#xff0c;MVP和MVVM是软件比较常用的三种软件架构&#xff0c;这三种架构的目的都是分离&#xff0c;避免将过多的逻辑全部堆积在一个类中。在Android中&#xff0c;Activity中既有UI的相关处理逻辑&#xff0c;又有数据获取逻辑&#xff0c;从而导致Activity逻辑复杂不单…

Wireshark抓包

Wireshark 1 抓包时间显示格式 2 界面显示列设置 3 protocol协议解析 4 过滤器 tcp.port&#xff1a;TCP端口tcp.dstport&#xff1a;TCP目的端口tcp.srcport&#xff1a;TCP源端口udp.port&#xff1a;UDP端口udp.dstport&#xff1a;UDP目的端口udp.srcport&#xff1a;UDP…

月薪过3W的软件测试工程师,都是怎么做到的?

对任何职业而言&#xff0c;薪资始终都会是众多追求的重要部分。前几年的软件测试行业还是一个风口&#xff0c;随着不断地转行人员以及毕业的大学生疯狂地涌入软件测试行业&#xff0c;目前软件测试行业“缺口”已经基本饱和。当然&#xff0c;我说的是最基础的功能测试的岗位…

良许也成为砖家啦~

大家好&#xff0c;我是良许。 没错&#xff0c;良许成为砖家啦&#xff0c;绝不是口嗨&#xff0c;有图有真相&#xff01; 有人会说&#xff0c;咦&#xff0c;这明明是严宇啊&#xff0c;跟你良许有啥关系&#xff1f; 额。。老读者应该知道良许的来历—— 鄙人真名严宇&a…

Python-datetime、time包常用功能汇总

目录基础知识时间格式有哪些&#xff1f;Python中的时间格式化时间戳datetimedatedatetimetimedeltatime常用获取今天凌晨字符串&#xff1f;将一个时间格式的字符串转为时间戳将一个时间戳转为指定格式的字符串全部代码参考基础知识 时间格式有哪些&#xff1f; 「格林威治标…

最新OpenMVG编译安装与逐命令运行增量式和全局式SfM教程

openmvg是一个轻便的可以逐步运行的SfM开源库&#xff0c;它同时实现了增量式和全局式两种算法。 说明文档地址&#xff1a;https://openmvg.readthedocs.io/en/latest/ github主页地址&#xff1a;https://github.com/openMVG/openMVG 1 编译安装 openmvg的安装比较简单&…

Windows 11 22H2 中文版、英文版 (x64、ARM64) 下载 (updated Feb 2023)

Windows 11, version 22H2&#xff0c;2023 年 2 月 更新 请访问原文链接&#xff1a;https://sysin.org/blog/windows-11/&#xff0c;查看最新版。原创作品&#xff0c;转载请保留出处。 作者主页&#xff1a;www.sysin.org 全新推出 Windows 11 全新 Windows 体验&#x…

论坛项目小程序和h5登录

项目中安装uview出现npm安装uview 直接报错&#xff1a;创建一个package.json配置文件在进行安装。cmd到项目。初始化一个package.json文件&#xff08;vue项目的配置文件&#xff09; npm init --yes 安装uview项目点击关注进入管页面&#xff0c;需要验证用户是否登录查用户是…

Linux学习(8)Linux文件与目录管理

以下内容转载自鸟哥的Linux私房菜 绝对路径与相对路径 绝对路径&#xff1a;路径的写法『一定由根目录 / 写起』&#xff0c;例如&#xff1a; /usr/share/doc 这个目录。相对路径&#xff1a;路径的写法『不是由 / 写起』&#xff0c;例如由 /usr/share/doc 要到 /usr/share…

Java实现在线沟通功能

文章目录1、介绍 和 特点2、整合SpringBoot2.1、导入依赖2.2、websocket 配置类2.3、消息处理类2.4、启动服务2.5、前端代码&#xff1a;张三2.6、前端代码&#xff1a;李四3、效果4、小结1、介绍 和 特点 t-io是基于JVM的网络编程框架&#xff0c;和netty属同类&#xff0c;所…