华为交换机配置链路聚合(手工模式链路聚合和lacp模式聚合)

您所在的位置:网站首页 查看交换机配置代码 华为交换机配置链路聚合(手工模式链路聚合和lacp模式聚合)

华为交换机配置链路聚合(手工模式链路聚合和lacp模式聚合)

2024-07-12 20:35:51| 来源: 网络整理| 查看: 265

华为交换机配置链路聚合

链路聚合(Eth-Trunk),是将多个物理接口捆绑为一个逻辑接口,实现增加链路带宽、提高可靠性、提供负载分担的目的。

链路聚合两种模式:手工负载分担模式(默认模式,默认负载均衡方式src-dst-ip),LACP模式(推荐)。

一,手工模式下,Eth-Trunk的建立、成员接口的加入由手工配置,没有LACP的参与。手工模式下所有活动链路都参与数据的转发,平均分担流量。如果某条活动链路发生故障,链路聚合组会自动在剩余的活动链路中平均分担流量。

当需要在两个直连设备之间提供一个较大的链路带宽,而其中一端或两端设备都不支持LACP协议时,可以配置手工模式链路聚合。 在这里插入图片描述

SW1

[SW1]interface Eth-Trunk 1 [SW1-Eth-Trunk1]mode manual load-balance //选择为手动负载分担,缺省即为手工模式,可不配置

[SW1-Eth-Trunk1]load-balance ? //查看可配置的模式,缺省为src-dst-ip, dst-ip According to destination IP hash arithmetic dst-mac According to destination MAC hash arithmetic src-dst-ip According to source/destination IP hash arithmetic //缺省的配置 src-dst-mac According to source/destination MAC hash arithmetic src-ip According to source IP hash arithmetic src-mac According to source MAC hash arithmetic

[SW1-Eth-Trunk1]load-balance src-dst-ip //此处使用src-dst-ip

[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2 //把GE0/0/1到GE0/0/2加入

配置Eth-Trunk 1为trunk模式,并放通vlan 10 和20 [SW1]interface Eth-Trunk 1 [SW1-Eth-Trunk1]port link-type trunk [SW1-Eth-Trunk1]port trunk allow-pass vlan 10 20

SW2 [SW2]interface Eth-Trunk 1 [SW2-Eth-Trunk1]mode manual load-balance

[SW2-Eth-Trunk1]load-balance src-dst-ip

[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2

配置Eth-Trunk 1为trunk并放通vlan10和20 [SW2]interface Eth-Trunk 1 [SW2-Eth-Trunk1]port link-type trunk [SW2-Eth-Trunk1]port trunk allow-pass vlan 10 20

使用命令display eth-trunk 1查看 在这里插入图片描述

**===============================================================**

二,LACP模式 当需要在两个直连设备间提供一个较大的链路带宽并且设备都支持LACP协议时,建议使用LACP模式。 LACP模式不仅可以实现增加带宽、提高可靠性、负载分担的目的,而且可以提高Eth-Trunk的容错性、提供备份功能。 在LACP模式下,部分链路是活动链路,所有活动链路均参与数据转发。如果某条活动链路故障,链路聚合组自动在非活动链路中选择一条链路作为活动链路,来参与数据转发。

如下图SW1和SW2各自的GE0/0/1、GE0/0/2、GE0/0/3加入链路聚合中,GE0/0/3作为备份链路。 在这里插入图片描述 配置过程

SW1

[SW1]interface Eth-Trunk 2 //创建eth-trunk 2聚合口 [SW1-Eth-Trunk2]mode lacp-static //配置模式为lacp静态模式 [SW1-Eth-Trunk2]trunkport GigabitEthernet 0/0/1 to 0/0/3 //把GE0/0/1 到GE0/0/3加入到聚合组

在SW1上配置系统优先级为100,使其成为LACP主动端 [SW1]lacp priority 100

在SW1上配置活动接口上限阈值为2 [SW1]interface Eth-Trunk 2 [SW1-Eth-Trunk2]max active-linknumber 2

在SW1进入物理接口配置接口优先级,确定活动链路,此处只配置GE1和GE2口,GE3口保持默认值32768。 [SW1]interface GigabitEthernet 0/0/1 [SW1-GigabitEthernet0/0/1]lacp priority 100 [SW1]interface GigabitEthernet 0/0/2 [SW1-GigabitEthernet0/0/2]lacp priority 100

配置Eth-Trunk2接口为trunk,并允许VLAN10和VLAN20通过(vlan配置过程省略) [SW1]interface Eth-Trunk 2 [SW1-Eth-Trunk2]port link-type trunk [SW1-Eth-Trunk2]port trunk allow-pass vlan 10 20

SW2

[SW2]interface Eth-Trunk 2 [SW2-Eth-Trunk2]mode lacp-static //配置模式为lacp静态模式

分别把GE0/0/1、GE0/0/2、GE0/0/3加入到聚合口(此处采用的另一种方法,不是批量加入了)

[SW2]interface GigabitEthernet 0/0/1 [SW2-GigabitEthernet0/0/1]eth-trunk 2

[SW2]interface GigabitEthernet 0/0/2 [SW2-GigabitEthernet0/0/2]eth-trunk 2

[SW2]interface GigabitEthernet 0/0/3 [SW2-GigabitEthernet0/0/3]eth-trunk 2

SW2上优先级保持默认,在SW2上配置活动接口上限阈值为2 [SW2]interface Eth-Trunk 2 [SW2-Eth-Trunk2]max active-linknumber 2

配置Eth-Trunk2接口为trunk,并允许VLAN10和VLAN20通过(vlan配置过程省略) [SW2]interface Eth-Trunk 2 [SW2-Eth-Trunk2]port link-type trunk [SW2-Eth-Trunk2]port trunk allow-pass vlan 10 20

使用命令display eth-trunk 2分别在SW1和SW2上查看接口情况 SW1上查看在这里插入图片描述

SW2在这里插入图片描述

把SW1的GE0/0/1口shutdown, [SW1]interface GigabitEthernet 0/0/1 [SW1-GigabitEthernet0/0/1]shutdown

再次查看聚合口情况,GE0/0/3已切换为选中状态了。 在这里插入图片描述

三,交换机和其它设备常用的链路聚合采用的模式 1,和服务器互联时, 服务器和接入设备的链路聚合模式要匹配。当服务器选择静态链接聚合方式,对应接入设备应该选择手工模式;当服务器选择IEEE 802.3ad动态链接聚合方式,对应接入设备应该选择LACP模式。 2,和堆叠设备互联时, 交换机与堆叠系统通过链路聚合互联,同时使能Eth-Trunk接口流量本地优先转发功能,在保证数据流量可靠传输的同时可以减小堆叠设备之间的带宽承载压力,提高了流量转发效率。



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭