配置手工负载分担模式链路聚合示例
组网需求
如图3-21所示,SwitchA和SwitchB通过以太链路分别都连接VLAN10和VLAN20的网络,且SwitchA和SwitchB之间有较大的数据流量。
用户希望SwitchA和SwitchB之间能够提供较大的链路带宽来使相同VLAN间互相通信。同时用户也希望能够提供一定的冗余度,保证数据传输和链路的可靠性。
配置思路
采用如下的思路配置负载分担链路聚合:
创建Eth-Trunk接口并加入成员接口,实现增加链路带宽。
创建VLAN并将接口加入VLAN。
配置负载分担方式,实现流量在Eth-Trunk各成员接口间的负载分担,增加可靠性。
操作步骤
- 在SwitchA和SwitchB上创建Eth-Trunk接口并加入成员接口,配置手动负载分担模式。
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] interface eth-trunk 1 [*SwitchA-Eth-Trunk1] mode manual load-balance [*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 [*SwitchA-Eth-Trunk1] commit [~SwitchA-Eth-Trunk1] quit
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] interface eth-trunk 1 [*SwitchB-Eth-Trunk1] mode manual load-balance [*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/1 to 1/0/3 [*SwitchB-Eth-Trunk1] commit [~SwitchB-Eth-Trunk1] quit
- 创建VLAN并将接口加入VLAN。
# 创建VLAN10和VLAN20并分别加入接口。SwitchB的配置与SwitchA类似,不再赘述。
[~SwitchA] vlan batch 10 20 [*SwitchA] interface 10ge 1/0/4 [*SwitchA-10GE1/0/4] port link-type trunk [*SwitchA-10GE1/0/4] port trunk allow-pass vlan 10 [*SwitchA-10GE1/0/4] quit [*SwitchA] interface 10ge 1/0/5 [*SwitchA-10GE1/0/5] port link-type trunk [*SwitchA-10GE1/0/5] port trunk allow-pass vlan 20 [*SwitchA-10GE1/0/5] quit [*SwitchA] commit
# 配置Eth-Trunk1接口允许VLAN10和VLAN20通过。SwitchB的配置与SwitchA类似,不再赘述。
[~SwitchA] interface eth-trunk 1 [~SwitchA-Eth-Trunk1] port link-type trunk [*SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20 [*SwitchA-Eth-Trunk1] commit [~SwitchA-Eth-Trunk1] quit
- 配置Eth-Trunk1的负载分担方式。SwitchB的配置与SwitchA类似,不再赘述。
[~SwitchA] load-balance profile a [*SwitchA-load-balance-profile-a] l2 dst-mac [*SwitchA-load-balance-profile-a] commit [~SwitchA-load-balance-profile-a] quit
- 验证配置结果
在任意视图下执行display eth-trunk 1命令,检查Eth-Trunk是否创建成功,及成员接口是否正确加入。
[~SwitchA] display eth-trunk 1 Eth-Trunk1's state information is: Working Mode: Normal Hash Arithmetic: profile a Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 32 Operating Status: up Number of Up Ports in Trunk: 3 -------------------------------------------------------------------------------- PortName Status Weight 10GE1/0/1 Up 1 10GE1/0/2 Up 1 10GE1/0/3 Up 1
从以上信息看出Eth-Trunk 1中包含3个成员接口10GE1/0/1、10GE1/0/2和10GE1/0/3,成员接口的状态都为Up。Eth-Trunk 1的“Operating Status”为up。
配置文件
SwitchA的配置文件
# sysname SwitchA # load-balance profile a l2 dst-mac # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # interface 10GE1/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/5 port link-type trunk port trunk allow-pass vlan 20 # return
SwitchB的配置文件
# sysname SwitchB # load-balance profile a l2 dst-mac # vlan batch 10 20 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 10 20 # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/2 eth-trunk 1 # interface 10GE1/0/3 eth-trunk 1 # interface 10GE1/0/4 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE1/0/5 port link-type trunk port trunk allow-pass vlan 20 # return