配置手工负载分担模式链路聚合示例
组网需求
如图2-12所示,RouterA和RouterB通过以太链路分别都连接VLAN10和VLAN20,且RouterA和RouterB之间有较大的数据流量。
用户希望RouterA和RouterB之间能够提供较大的链路带宽来使相同VLAN间互相通信。同时用户也希望能够提供一定的冗余度,保证数据传输和链路的可靠性。
操作步骤
- 在RouterA创建Eth-Trunk接口并加入成员接口。RouterB的配置与RouterA相似,配置过程略。
<Huawei> 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
- 创建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
- 配置Eth-Trunk1的负载分担方式。RouterB的配置与RouterA相似,配置过程略。
[RouterA] load-balance src-dst-mac
- 验证配置结果
# 在任意视图下执行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。
配置文件
RouterA的配置文件
# sysname RouterA # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 load-balance src-dst-mac # interface Ethernet1/0/1 eth-trunk 1 # interface Ethernet1/0/2 eth-trunk 1 # interface Ethernet1/0/3 eth-trunk 1 # interface Ethernet1/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface Ethernet1/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
RouterB的配置文件
# sysname RouterB # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 load-balance src-dst-mac # interface Ethernet1/0/1 eth-trunk 1 # interface Ethernet1/0/2 eth-trunk 1 # interface Ethernet1/0/3 eth-trunk 1 # interface Ethernet1/0/4 port link-type trunk port trunk allow-pass vlan 20 # interface Ethernet1/0/5 port link-type trunk port trunk allow-pass vlan 10 # return