首页 > 编程知识 正文

华为交换机端口聚合实例,华为中兴交换机做端口聚合

时间:2023-05-03 07:21:12 阅读:177343 作者:2576

华为交换机配置链路聚合

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

链路聚合有两种模式:手动负载平衡模式(默认模式、默认负载平衡方法src-dst-ip )和LACP模式(推荐)。

另一方面,在手动模式下,Eth-Trunk的建立、成员接口的加入被手动配置,没有LACP的加入。 在手动模式下,所有活动链路都参与数据传输并平均分担流量。 如果活动链路出现故障,链路聚合组将自动在剩馀的活动链路上平均分配流量。

如果两个直接连接的设备之间需要提供较大的链路带宽,并且一个或两个设备不支持LACP协议,则可以配置手动模式链路聚合。

SW1

[ sw1 ]接口eth-trunk 1

[ sw1-eth-trunk1]选择modemanualload-balance//作为手动负载分担,缺省为手动模式,无需配置

[SW1-Eth-Trunk1]load-balance? //查看可配置模式时,默认为src-dst-ip。

dst-ipaccordingtodestinationiphasharithmetic

dst-macaccordingtodestinationmachasharithmetic

src-dst-ipaccordingtosource/destinationiphasharithmetic//默认配置

src-dst-macaccordingtosource/destinationmachasharithmetic

src-ipaccordingtosourceiphasharithmetic

src-macaccordingtosourcemachasharithmetic

[ sw1-eth-trunk1]加载平衡src-dst-IP此处使用src-dst-IP

[ sw1-eth-trunk1]装入trunkportgigabitethernet0/0/1to0/0/2//ge0/0/1至GE0/0/2

将Eth-Trunk 1设置为trunk模式,并连接到vlan 10和20

[ sw1 ]接口eth-trunk 1

[ sw1-eth-trunk1]端口链接- type trunk

[ sw1-eth-trunk1] porttrunkallow-pass VLAN 1020 SW 2

[ sw2 ]接口eth-trunk 1

[ sw2-eth-trunk1] modemanualload-balance

[ sw2-eth-trunk1]加载平衡src-dst-IP

[ sw2-eth-trunk1] trunkportgigabitethernet0/0/1to0/0/2

将Eth-Trunk 1设置为trunk,并连接到vlan10和20

[ sw2 ]接口eth-trunk 1

[ sw2-eth-trunk1]端口链接- type trunk

[ sw2-eth-trunk1] porttrunkallow-pass VLAN 1020

使用display eth-trunk 1命令显示

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

二,LACP模式

如果两个直接连接的设备之间需要提供较大的链路带宽,并且所有设备都支持LACP协议,则建议使用LACP模式。

LACP模式不仅可以增加带宽、提高可靠性和平衡负载,还可以提高以太网容错能力和提供备份功能。

在LACP模式下,某些链路是活动链路,所有活动链路都参与数据传输。 如果活动链路出现故障,链路聚合组会自动选择非活动链路上的链路作为活动链路,以参与数据传输。

在下面的图中,GE0/0/1、GE0/0/2和GE0/0/3分别加入链路聚合,GE0/0/3作为备用链路。

配置过程SW1

[ sw1 ] interface eth-trunk2//eth-trunk 2创建聚合端口

[ sw1-eth-trunk2]模型ACP-static//配置模式为lacp静态模式

[ sw1-eth-trunk2]将trunkportgigabitethernet0/0/1to0/0/3//ge0/0/1到GE0/0/3添加到聚合组

在SW1中将系统优先级设置为100,并将其设置为LACP主动端

[SW1]lacp priority 100

在SW1中将活动接口的上限阈值设置为2

[ sw1 ]接口eth-trunk 2

[ sw1-eth-trunk2] max active-link number 2

在SW1中访问物理接口以设置接口优先级并确定活动链路。 此处仅设置GE1和GE2端口,并将GE3端口保留为默认值32768。

[ sw1 ] interfacegigabitethernet0/0/1

[ sw1 -千兆以太网0/0/1 ] lacppriority 100

[ sw1 ] interfacegigabitethernet0/0/2

[ sw1 -千兆以太网0/0/2 ] lacppriority 100

将Eth-Trunk2接口配置为trunk,以便vlan10和VLAN20通过。 省略VLAN配置过程

[ sw1 ]接口eth-trunk 2

[ sw1-eth-trunk2]端口链接- type trunk

[ sw1-eth-trunk2] porttrunkallow-pass VLAN 1020

SW2

[ sw2 ]接口eth-trunk 2

[ sw2-eth-trunk2]模型ACP-static//配置模式为lacp静态模式

分别将GE0/0/1、GE0/0/2、GE0/0/3加入聚合端口(此处采用的另一种方法不是一次性加入) )。

[ sw2 ] interfacegigabitethernet0/0/1

[ sw2 -千兆以太网0/0/1 ] eth-trunk 2

[ sw2 ] interfacegigabitethernet0/0/2

[ sw2 -千兆以太网0/0/2 ] eth-trunk 2

[ sw2 ] interfacegigabitethernet0/0/3

[ sw2 -千兆以太网0/0/3 ] eth-trunk 2

SW2上的优先级保留默认值,SW2上的活动接口上限阈值设置为2

[ sw2 ]接口eth-trunk 2

[ sw2-eth-trunk2] max active-link number 2

将Eth-Trunk2接口配置为trunk,以便vlan10和VLAN20通过。 省略VLAN配置过程

[ sw2 ]接口eth-trunk 2

[ sw2-eth-trunk2]端口链接- type trunk

[ sw2-eth-trunk2] porttrunkallow-pass VLAN 1020

使用命令display eth-trunk 2检查SW1和SW2上的接口状态

用SW1看

SW2

将SW1的GE0/0/1口shutdown,

[ sw1 ] interfacegigabitethernet0/0/1

[ sw1 -千兆以太网0/0/1 ] shut down

再次观察聚合口的状况,GE0/0/3切换到了选择状态。

第三种是交换机和其他设备常用的链路聚合模型

1、与服务器相互连接时,

服务器和访问设备的链路聚合模式必须匹配。 如果服务选择静态链路聚合方式,则对应的接入设备必须选择手动模式;如果服务器选择IEEE 802.3ad动态链路聚合方式,则对应的接入设备必须选择LACP模式。

2 )与堆叠设备连接时,

交换机和堆叠系统通过链路聚合互连,同时启用以太网中继接口流量的本地优先级转发功能,减少堆叠设备之间的带宽负载,确保数据流量的可靠传输

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。