手工负载分担模式链路聚合实验
如下所示,LSW1和LSW2通过以太链路分别都连接VLAN10和VLAN20的网络,且LSW1和LSW2之间有较大的数据流量;
用户希望LSW1和LSW2之间能够提供较大的链路带宽来使相同VLAN间互相通信。同时用户也希望能够提供一定的冗余度,保证数据传输和链路的可靠性;
配置
LSW1
[SwitchA]interface Eth-Trunk 1
[SwitchA-Eth-Trunk1]mode manual load-balance
[SwitchA-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/3
[SwitchA]vlan batch 10 20
[SwitchA] int etherent 0/0/4
[SwitchA-Ethernet0/0/4] port link-type trunk
[SwitchA-Ethernet0/0/4]port trunk allow-pass vlan 10
[SwitchA] int etherent 0/0/5
SwitchA-Ethernet0/0/5] port link-type trunk
[SwitchA-Ethernet0/0/5]port trunk allow-pass vlan 20
[SwitchA]interface Eth-Trunk 1
[SwitchA-Eth-Trunk1]port link-type trunk
[SwitchA-Eth-Trunk1]port trunk allow-pass vlan 10 20 (eth-trunk 口允许vlan10,vlan20 通过)
[SwitchA-Eth-Trunk1]load-balance src-dst-mac (配置eth-trunk 链路负载分担)
LSW2
[SwitchB]interface Eth-Trunk 1
[SwitchB-Eth-Trunk1]mode manual load-balance
[SwitchB-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/3
[SwitchB]vlan batch 10 20
[SwitchB] int etherent 0/0/4
[SwitchB-Ethernet0/0/4] port link-type trunk
[SwitchB-Ethernet0/0/4]port trunk allow-pass vlan 10
[SwitchB] int etherent 0/0/5
SwitchB-Ethernet0/0/5] port link-type trunk
[SwitchB-Ethernet0/0/5]port trunk allow-pass vlan 20
[SwitchB]interface Eth-Trunk 1
[SwitchB-Eth-Trunk1]port link-type trunk
[SwitchB-Eth-Trunk1]port trunk allow-pass vlan 10 20 (eth-trunk 口允许vlan10,vlan20 通过)
[SwitchB-Eth-Trunk1]load-balance src-dst-mac (配置eth-trunk 链路负载分担)
查看eth-trunk接口成员信息
截屏2024-08-17 下午4.33.03.pngLACP模式的链路聚合实验
两台交换机之间共有3条链路,其中有2条活动链路,一条备份链路,当活动链路出现故障时,剩余的备份链路可以替代故障链路,保证数据的可靠传输;
截屏2024-08-17 下午10.26.06.png配置
SwitchA配置
[Huawei]interface Eth-Trunk 1
[Huawei-Eth-Trunk1]mode lacp-static (LACP静态模式)
//成员接口加入eth-trunk聚合口
[Huawei]interface Ethernet 0/0/1
[Huawei-Ethernet0/0/1] eth-trunk 1
[Huawei]interface Ethernet 0/0/2
[Huawei-Ethernet0/0/2] eth-trunk 1
[Huawei]interface Ethernet 0/0/3
[Huawei-Ethernet0/0/3] eth-trunk 1
//设置设置系统优先级,使SwitchA成为LACP主动端
[Huawei]lacp priority 100
//配置接口优先级,确定活动链路
[Huawei-Ethernet0/0/1]lacp priority 80
[Huawei-Ethernet0/0/2]lacp priority 80
//配置活动接口上限阀值为2
[Huawei-Eth-Trunk1]max active-linknumber 2 (配置活动接口上限阈值为2)
SwitchB配置
[Huawei]interface Eth-Trunk 1
[Huawei-Eth-Trunk1]mode lacp-static (LACP静态模式)
//成员接口加入eth-trunk聚合口
[Huawei]interface Ethernet 0/0/1
[Huawei-Ethernet0/0/1] eth-trunk 1
[Huawei]interface Ethernet 0/0/2
[Huawei-Ethernet0/0/2] eth-trunk 1
[Huawei]interface Ethernet 0/0/3
[Huawei-Ethernet0/0/3] eth-trunk 1
实验结果
在交换机SwitchA上,有2条链路被Selected,剩余一条链路充当备份链路;
截屏2024-08-17 下午10.44.19.png
网友评论