Huawei Eth-Trunk: LACP Link Aggregation Setup - 夜莺博客

Huawei Eth-Trunk: LACP Link Aggregation Setup

Huawei calls link aggregation Eth-Trunk, and the configuration shape is distinctly VRP: the trunk interface is created first, member ports are attached with eth-trunk or trunkport, and the whole bundle is then configured like a normal Ethernet interface. The two things that decide whether it works are mode (manual versus LACP) and the requirement that member ports be identical. This guide walks through a production-shaped configuration on S-series and CloudEngine switches, plus the verification and troubleshooting commands that explain why a member never becomes selected.

Manual versus LACP mode

  • Manual mode (mode manual) – no negotiation; all up members forward. Simple, but a misconfigured peer can black-hole traffic because nothing validates the far end.
  • LACP mode (mode lacp-static) – members negotiate; only ports that reach the Selected state carry traffic. This is the default recommendation for switch-to-switch and switch-to-server trunks.

Building the trunk

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 10
[SwitchA-Eth-Trunk10] mode lacp-static
[SwitchA-Eth-Trunk10] load-balance src-dst-ip
[SwitchA-Eth-Trunk10] max active-linknumber 2
[SwitchA-Eth-Trunk10] quit

[SwitchA] interface gigabitethernet 0/0/1
[SwitchA-GigabitEthernet0/0/1] eth-trunk 10
[SwitchA-GigabitEthernet0/0/1] quit
[SwitchA] interface gigabitethernet 0/0/2
[SwitchA-GigabitEthernet0/0/2] eth-trunk 10
[SwitchA-GigabitEthernet0/0/2] quit

[SwitchA] interface eth-trunk 10
[SwitchA-Eth-Trunk10] port link-type trunk
[SwitchA-Eth-Trunk10] port trunk allow-pass vlan 10 20
[SwitchA-Eth-Trunk10] quit

On CloudEngine devices the same trunk is built with member ports added inline: interface eth-trunk 10 followed by trunkport 10ge 1/0/5, remembered with commit. Everything L2-related (link type, allowed VLANs, STP settings) is configured on the Eth-Trunk, never on the members.

Member port rules

Ports joining one Eth-Trunk must match in speed, duplex, flow control, and in whether they are L2 or L3; the trunk's mode must also match on both ends. A port that belongs to an Eth-Trunk cannot be configured with most individual L2/L3 commands – VRP rejects the command rather than silently ignoring it. Never add two ports of the same switch that are directly cabled to each other into the same trunk; VRP blocks it, and the workaround (splitting the trunk) is also the fix.

Verification

[SwitchA] display eth-trunk 10
Eth-Trunk10's state information is:
WorkingMode: LACP        Hash arithmetic: According to IP
Least Active-linknumber: 1     Max Active-linknumber: 16
Operate status: up             Number Of Up Port In Trunk: 2
ActorPortName   Status   PortType  PortPri PortNo PortKey PortState
GigabitEthernet0/0/1  Selected  1GE    32768  1      10      10111100
GigabitEthernet0/0/2  Selected  1GE    32768  2      10      10111100

[SwitchA] display trunkmember
[SwitchA] display eth-trunk 10 verbose

Members show Selected, Unselected or Standby. Unselected usually means a member-attribute mismatch, an LACP key mismatch, or the port has been pushed out by max active-linknumber; Standby is what you get when the maximum active links is lower than the number of members, which is the standard 1:N redundancy pattern.

Load balancing and the stacking case

[SwitchA-Eth-Trunk10] load-balance src-dst-ip
[SwitchA-Eth-Trunk10] load-balance enhanced profile 1

Default hashing is often packet-based or L2-based; for server or uplink trunks with a few large flows, choose an L3/L4-aware algorithm (for example src-dst-ip or an enhanced profile that includes TCP/UDP ports) so that traffic is not pinned to one member. On stacked switches, an Eth-Trunk that spans members is a stack Eth-Trunk (or inter-device Eth-Trunk on CloudEngine); enabling local-first forwarding keeps intra-stack traffic off the stack cables.

Troubleshooting

  • display eth-trunk 10 shows the negotiation state per member; a member stuck Unselected with the peer showing Selected indicates a one-sided configuration.
  • Check that LACP system priority and port priority are not hiding an unwanted port selection order.
  • If the trunk is up but throughput is poor, check the hash algorithm before blaming the links.

Related reading: Huawei stack split and MAD, iStack versus CSS stacking, and the vendor-neutral comparison in Linux bonding 802.3ad.

原文链接:https://support.huawei.com/enterprise/en/doc/EDOC1000178167/493f7e15/example-for-configuring-stack-eth-trunks