组网需求
如图1所示,RouterA和RouterB通过以太链路分别都连接VLAN10和VLAN20,且RouterA和RouterB之间有较大的数据流量。用户希望RouterA和RouterB之间能够提供较大的链路带宽来使相同VLAN间互相通信。同时用户也希望能够提供一定的冗余度,保证数据传输和链路的可靠性。
配置思路
采用如下的思路配置负载分担链路聚合:
1. 创建Eth-Trunk接口并加入成员接口,实现增加链路带宽。
2. 创建VLAN并将端口加入VLAN。
3. 配置负载分担方式,实现流量在Eth-Trunk各成员接口间的负载分担,增加可靠性。
操作步骤
步骤1 在RouterA创建Eth-Trunk接口并加入成员接口。RouterB配置与RouterA相似,配置过程略。
system-view
[Huawei] sysname RouterA
[RouterA] interface Eth-Trunk1
[RouterA-Eth-Trunk1] trunkport ethernet 1/0/1 to 1/0/3
[RouterA-Eth-Trunk1] quit
步骤2 创建VLAN并将端口加入VLAN。RouterB配置与RouterA相似,配置过程略。
# 创建VLAN10和VLAN20并分别加入接口。
[RouterA] vlan batch 10 20
[RouterA] interface ethernet 1/0/4
[RouterA-Ethernet1/0/4] port link-type trunk
[RouterA-Ethernet1/0/4] port trunk allow-pass vlan 10
[RouterA-Ethernet1/0/4] quit
[RouterA] interface ethernet 1/0/5
[RouterA-Ethernet1/0/5] port link-type trunk
[RouterA-Ethernet1/0/5] port trunk allow-pass vlan 20
[RouterA-Ethernet1/0/5] quit
# 配置Eth-Trunk接口允许VLAN10和VLAN20通过。
[RouterA] interface Eth-Trunk1
[RouterA-Eth-Trunk1] port link-type trunk
[RouterA-Eth-Trunk1] port trunk allow-pass vlan 10 20
步骤3 配置Eth-Trunk1的负载分担方式。RouterB配置与RouterA相似,配置过程略。
[RouterA-Eth-Trunk1] load-balance src-dst-mac
[RouterA-Eth-Trunk1] quit
步骤4 验证配置结果
在任意视图下执行display eth-trunk 1命令,检查Eth-Trunk是否创建成功,及成员接口是否正确加入。
[RouterA] display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Ports In Trunk: 3
--------------------------------------------------------------------------------
PortName Status Weight
Ethernet1/0/1 Up 1
Ethernet1/0/2 Up 1
Ethernet1/0/3 Up 1
从以上信息看出Eth-Trunk 1中包含3个成员接口Ethernet1/0/1、Ethernet1/0/2和Ethernet1/0/3。成员接口的状态都为Up。





