链路聚合实验(华为)

 思科设备参考:链路聚合实验(思科)

一,技术简介

网络设备的链路聚合技术(Link Aggregation)是一种将多个物理链路捆绑在一起,形成一个逻辑链路的技术。这样做可以增加带宽、提高可靠性和实现负载均衡。

二,实验目的

让两台交换机的g0/0/2和g0/0/3接口形成聚合链路

三,配置命令

以下方案任选其一

方案一

静态配置模式(手工负载分担)

Switch1

<Huawei>system-view

[Huawei]undo info-center enable

[Huawei]int Eth-Trunk 3                                               进入Eth-Trunk 3接口视图

[Huawei-Eth-Trunk3]mode manual load-balance        设置工作模式为手动负载均衡

[Huawei-Eth-Trunk3]trunkport g0/0/2                          将物理接口g0/0/2添加到Eth-Trunk 3中

[Huawei-Eth-Trunk3]trunkport g0/0/3

[Huawei-Eth-Trunk3]port link-type trunk                      设置Eth-Trunk 3接口类型为trunk

[Huawei-Eth-Trunk3]port trunk allow-pass vlan all

[Huawei-Eth-Trunk3]quit

[Huawei]display eth-trunk 3                                          显示Eth-Trunk 3的状态和配置信息

Switch2

 <Huawei>system-view                                                进入Eth-Trunk 3接口视图

[Huawei]undo info-center enable

[Huawei]int Eth-Trunk 3

[Huawei-Eth-Trunk3]mode manual load-balance         设置工作模式为手动负载均衡

[Huawei-Eth-Trunk3]trunkport g0/0/2                           将物理接口g0/0/2添加到Eth-Trunk 3中

[Huawei-Eth-Trunk3]trunkport g0/0/3

[Huawei-Eth-Trunk3]port link-type trunk

[Huawei-Eth-Trunk3]port trunk allow-pass vlan all        设置Eth-Trunk 3接口类型为trunk

[Huawei-Eth-Trunk3]quit

[Huawei]display eth-trunk 3                                           显示Eth-Trunk 3的状态和配置信息

方案二

动态配置模式(LACP)

Switch1

<Huawei>system-view

[Huawei]undo info-center enable                禁用信息中心的日志功能

[Huawei]int Eth-Trunk 3                               进入Eth-Trunk 3的逻辑接口视图

[Huawei-Eth-Trunk3]mode lacp-static         设置Eth-Trunk 3的工作模式为LACP静态模式

[Huawei-Eth-Trunk3]trunkport g0/0/2          将物理接口添加到Eth-Trunk 3中作为成员

[Huawei-Eth-Trunk3]trunkport g0/0/3

[Huawei-Eth-Trunk3]port link-type trunk                   将Eth-Trunk 3的链路类型设置为trunk

[Huawei-Eth-Trunk3]port trunk allow-pass vlan all

[Huawei-Eth-Trunk3]max active-linknumber 2          最多同时活动的链路数量2(默认8)

[Huawei-Eth-Trunk3]lacp preempt enable                启用LACP抢占功能

[Huawei-Eth-Trunk3]quit

[Huawei]display eth-trunk

Switch2

<Huawei>system-view

[Huawei]undo info-center enable               禁用信息中心的日志功能

[Huawei]int Eth-Trunk 3                              进入Eth-Trunk 3的逻辑接口视图

[Huawei-Eth-Trunk3]mode lacp-static        设置Eth-Trunk 3的工作模式为LACP静态模式

[Huawei-Eth-Trunk3]trunkport g0/0/2         将物理接口添加到Eth-Trunk 3中作为成员

[Huawei-Eth-Trunk3]trunkport g0/0/3

[Huawei-Eth-Trunk3]port link-type trunk                   将Eth-Trunk 3的链路类型设置为trunk

[Huawei-Eth-Trunk3]port trunk allow-pass vlan all

[Huawei-Eth-Trunk3]max active-linknumber 2          最多同时活动的链路数量(默认8)

[Huawei-Eth-Trunk3]lacp preempt enable                 启用LACP抢占功能

[Huawei]lacp priority 100        设置系统的LACP优先级,小的成为主动端 (默认32768)

[Huawei]display eth-trunk        显示所有Eth-Trunk接口的状态和配置信息

参数解释:

Local: 本地信息                          Partner: 对端信息

UNSELECT 为备份端口             Selected 为活动端口

Svstem Prioritv:32768   系统的优先级

System ID:4clf-cc4e-5   系统的mac地址

MAX Active-linknumber:8    最大的活动链路数是8条

Number of Up Port In Trunk:2   目前有几条活动链路

四,配置结果

PC1连续  ping  PC2,在这期间断掉聚合链路的其中任意一条。

PC>ping 192.168.10.2 -t

持续丢包(30多秒)后恢复

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值