手动模式
基础配置
配置PC的IP/子网
_____________________________________________________________________________
配置手动聚合组
LSW1
<Huawei>sys #进入配置模式
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en #关闭报文弹窗
Info: Information center is disabled.
[Huawei]sys LSW1 #更改设备名称
[LSW1]int eth-trunk 1 #创建聚合组1
[LSW1-Eth-Trunk1]mode manual load-balance #模式更改为手动模式
[LSW1-Eth-Trunk1]trunk Ethernet 0/0/1 to 0/0/2 #将聚合组1应用到E0/0/1 toE0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
——————————————————————————————————————————
LSW2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW2
[LSW2]un in en
Info: Information center is disabled.
[LSW2]int eth-trunk 1
[LSW2-Eth-Trunk1]mode manual load-balance
[LSW2-Eth-Trunk1]trunk Ethernet 0/0/1 to 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
———————————————————————————————————————————
配置聚合模式为trunk
LSW1
[LSW1-Eth-Trunk1]port link-type trunk #将聚合组1的模式更改为虚拟trunk
[LSW1-Eth-Trunk1]port trunk allow-pass vlan all #放行所有vlan流量通过
LSW2
[LSW2-Eth-Trunk1]port link-type trunk
[LSW2-Eth-Trunk1]port trunk allow-pass vlan all
———————————————————————————————————————————
查看聚合组信息
[LSW2-Eth-Trunk1]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 Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
———————————————————————————————————————————
验证
[LSW1]int e0/0/2
[LSW1-Ethernet0/0/2]shutdown #手动断掉一条链路
PC>ping 192.168.10.2 #再用PC13去pingPC14
Ping 192.168.10.2: 32 data bytes, Press Ctrl_C to break
From 192.168.10.2: bytes=32 seq=1 ttl=128 time=47 ms
From 192.168.10.2: bytes=32 seq=2 ttl=128 time=47 ms
From 192.168.10.2: bytes=32 seq=3 ttl=128 time=46 ms
From 192.168.10.2: bytes=32 seq=4 ttl=128 time=63 ms
From 192.168.10.2: bytes=32 seq=5 ttl=128 time=94 ms
--- 192.168.10.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 46/59/94 ms
———————————————————————————————————————————
LACP模式
基础配置
配置PC的IP/子网
配置聚合组(LACP)
LSW1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys LSW1
[LSW1]int eth-trunk 1
[LSW1-Eth-Trunk1]mode lacp-static #配置聚合模式为lacp
[LSW1-Eth-Trunk1]max bandwidth-affected-linknumber 1 #设置聚合组的最大活动链路为1条
[LSW1-Eth-Trunk1]quit
[LSW1]lacp priority 1 #设置lacp的优先级为1
[LSW1-Eth-Trunk1]trunk Ethernet 0/0/1 to 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
LSW2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys LSW2
[LSW2]un in en
Info: Information center is disabled.
[LSW2]int eth-trunk 1
[LSW2-Eth-Trunk1]mode lacp-static
[LSW2-Eth-Trunk1]max bandwidth-affected-linknumber 1
[LSW2-Eth-Trunk1]trunk Ethernet 0/0/1 to 0/0/2
Info: This operation may take a few seconds. Please wait for a moment...done.
配置聚合模式为trunk
LSW1
[LSW1-Eth-Trunk1]port link-type trunk #将聚合组1的模式更改为虚拟trunk
[LSW1-Eth-Trunk1]port trunk allow-pass vlan all #放行所有vlan流量通过
LSW2
[LSW2-Eth-Trunk1]port link-type trunk
[LSW2-Eth-Trunk1]port trunk allow-pass vlan all
———————————————————————————————————————————
查看聚合组信息
[LSW1-Eth-Trunk1]display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SIP-XOR-DIP #关闭抢占/Hash算法负载分担采用Sip-Dip
System Priority: 1 System ID: 4c1f-ccde-4b90
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/1 Selected 100M 32768 2 289 10111100 1
Ethernet0/0/2 Selected 100M 32768 3 289 10111100 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 4c1f-cc06-0dfb 32768 2 289 10111100
Ethernet0/0/2 32768 4c1f-cc06-0dfb 32768 3 289 10111100
-------------------------------------------------------------------------------
其他命令
[Huawei-Eth-Trunk1]load-balance ? #更改链路聚合的分担模式
dst-ip According to destination IP hash arithmetic
dst-mac According to destination MAC hash arithmetic
src-dst-ip According to source/destination IP hash arithmetic
src-dst-mac According to source/destination MAC hash arithmetic
src-ip According to source IP hash arithmetic
src-mac According to source MAC hash arithmetic
[Huawei-Eth-Trunk1]lacp preempt enable #开启lacp聚合抢占默认是关闭的
[Huawei-Eth-Trunk1]lacp preempt delay 10 #抢占时间为10s,默认为30s