What it does
A link aggregation group (LAG) bundles parallel links into one, and the Link Aggregation Control Protocol (LACP) lets both ends agree on which links belong to it. Two questions come up whenever a bundle misbehaves: which member is this flow on, and what are the two ends telling each other? The page answers both, in two modes:
- Which link. For a Linux bond, the member that carries one flow, worked out with the driver's own transmit hash: every intermediate value, the member the flow uses when each other member goes down, and, if you ask, how a run of flows spreads over the members. For the same number of members it shows the split Cisco documents for its Catalyst 6500/6000 hash, which is why 2, 4 and 8 members share traffic evenly and 3, 5, 6 and 7 do not.
- State flags. The actor and partner state octets of a LACPDU (the LACP data unit), or the flags a show command prints, read bit by bit from LACP_Activity to Expired, with the timers that follow and a verdict for the pair. Huawei's PortState can be typed as
display eth-trunkprints it, or the whole output pasted, and then every member row is read.
Everything is computed in your browser.
Why only the Linux hash is computed
How a bundle spreads frames is left to each implementation. IEEE 802.1AX's own management module says that a description of the distribution algorithm "could include information about the distribution algorithm in use" and that "The contents are vendor specific" (IEEE8023-LAG-MIB, dot3adAggDescription). A member can be computed only where an implementation publishes its hash completely, and one does: the Linux bonding driver, whose HOWTO gives each policy as a formula and whose source, bond_main.c, fixes every detail. MikroTik's RouterOS bonding describes the same policy names in words and points to the Linux documentation (MikroTik, Bonding).
The switch vendors document which fields go into the hash, not the function, so the page names them and computes nothing for them:
- Cisco. On the Catalyst 6500/6000, "The Cisco-proprietary hash algorithm computes a value in the range 0 to 7", and the document gives how many of those values each port accepts, not the hash (Cisco, document 12023). The Catalyst 9300 guide lists the load-balance methods, with "The default is src-mac", and says the switch reduces "part of the binary pattern that is formed from the addresses in the frame to a numerical value" (Cisco, Configuring EtherChannels, IOS XE 17.18).
- Juniper. The hash uses packet fields "as well as on some internal values like source port ID and source device ID" (Juniper, Hashing Algorithms for LAG and ECMP), which no reader of a packet can know.
- Arista. "Hashing algorithm inputs varies by switch platform" (Arista EOS, Port Channels and LACP).
- HPE Aruba. AOS-CX offers l2-src-dst, l3-src-dst and l4-src-dst without describing the function (AOS-CX 10.16, LACP configuration settings).
- Extreme. Switch Engine names xor, crc-16 and crc-32 as hash algorithms, not how the fields are laid out for them (Switch Engine 33.7.1 Command References, configure sharing address-based custom).
- Huawei. The S5700 and S6700 command reference lists the
load-balancemodesdst-ip,dst-mac,src-ip,src-mac,src-dst-ip,src-dst-macandenhanced profile, says "The default load balancing mode is src-dst-ip", and that "Load balancing is valid only for outgoing traffic; therefore, the load balancing modes for the interfaces at both ends of the link can be different". Once a mode is set, "the hash factors used to calculate the outbound interface vary according to the packet type and device model": Layer 2 packets fall back to the source and destination MAC addresses; the S5736-S uses src-dst-ip with the TCP or UDP source and destination ports "regardless of whether you configure this parameter", and supports one load balancing mode for the whole switch; and on the S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S6730-H, S6730S-H, S6730-S and S6730S-S, whichever of the six basic modes is configured, "packets are load balanced based on physical-layer source port numbers in the packets". The function itself is not given, so nothing is computed for Huawei; "You can run the display eth-trunk load-balance command to check the hash factors used when the outbound interface is calculated" (Huawei, Link Aggregation Commands, V200R025C00, read in a browser: the site refuses automated reads). - MikroTik switch chips. A bond offloaded to the switch chip hashes there, and the manual gives no formula for it.
To ask a switch itself, Cisco's document 12023 shows the Catalyst 6500's test etherchannel load-balance interface port-channel command, which answers with the port a given pair of addresses would use.
Which link: the inputs
- Transmit hash policy: the HOWTO's
xmit_hash_policyvalueslayer2(the default),layer2+3,layer3+4andvlan+srcmac. The form shows only the fields the policy reads. - Processor byte order: little-endian (the default) or big-endian, for
layer2+3andlayer3+4. A 32-bit value takes four bytes: a big-endian processor stores its most significant byte at the lowest address, a little-endian one its least significant. Of the Linux architectures Debian lists, amd64, arm64, ppc64el, riscv64 and loong64 are little-endian, and s390x, ppc64, mips and sparc64 are big-endian (Debian Wiki, ArchitectureSpecificsMemo, read in a browser: the site refuses automated reads). The article Big-endian and little-endian explains byte order at length; how it changes this hash is in the rules below. - Members that can transmit: 2 to 8, numbered from 0.
- Source and destination MAC (
layer2,layer2+3;vlan+srcmacreads only the source), in colon, hyphen or Cisco dot notation. - Source and destination IP address, IPv4 or IPv6, of the same family (every policy but
vlan+srcmac; forlayer2they only set the EtherType). - Protocol, source port and destination port (
layer3+4): TCP or UDP, ports 0 to 65535. - VLAN ID and priority (
vlan+srcmac): a VLAN ID from 1 to 4094, or blank for an untagged frame, and a priority from 0 to 7; the IEEE 802.1 MIBs do not permit 0 and 4095 as VLAN identifiers and give priorities as 0 to 7 (IEEE8021-TC-MIB, IEEE8021VlanIndex and IEEE8021PriorityValue). - Spread (optional): one field the policy reads, varied upward from the value typed, over 1 to 4096 flows.
Which link: the rules
The HOWTO's formulas, with the details its source fixes:
layer2: hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
layer2+3: hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
hash = hash XOR source IP XOR destination IP
hash = hash XOR (hash RSHIFT 16)
hash = hash XOR (hash RSHIFT 8)
layer3+4: hash = source port, destination port (as in the header)
hash = hash XOR source IP XOR destination IP
hash = hash XOR (hash RSHIFT 16)
hash = hash XOR (hash RSHIFT 8)
hash = hash RSHIFT 1
vlan+srcmac: hash = (vlan ID) XOR (source MAC vendor) XOR (source MAC dev)
and in every case the hash "is reduced modulo slave count" (Linux bonding HOWTO, xmit_hash_policy).
- The packet type ID is the frame's EtherType as a number: the driver XORs
be16_to_cpu(ep->h_proto)(bond_eth_hash), so 0x0800 for IPv4 and 0x86DD for IPv6 (IANA, IEEE 802 Numbers). - IPv6 addresses are "first hashed using ipv6_addr_hash" (HOWTO), the XOR of the address's four 32-bit words (include/net/ipv6.h).
- The processor's byte order. The driver XORs the addresses as
flow_get_u32_dstandflow_get_u32_srcreturn them, the raw 32 bits stored in the packet, and copies the ports withmemcpyfrom a structure that holds the source port first (include/net/flow_dissector.h). A big-endian processor reads those bytes most significant first, which is the HOWTO's formula as written; a little-endian processor reads them the other way round and gets a different hash. Which fields count, the two folds, the shift and the modulo are the same.layer2andvlan+srcmacread single bytes, or build their numbers byte by byte, so the byte order does not change them. The page shows the two words as the chosen processor reads them. Byte order changes the member only when the member count is not a power of two. The two folds ofbond_ip_hash(hash ^= (hash >> 16); hash ^= (hash >> 8);) leave in the lowest byte the XOR of the word's four bytes, which reversing them does not change, and a modulo by 2, 4 or 8 reads only bits from that byte, after the shift oflayer3+4too. Run on this engine on 2026-11-08 for 4,000 random flows (random IPv4 addresses, MAC addresses and ports) underlayer2+3andlayer3+4with every member count from 2 to 8, the two orders chose the same member in all 24,000 cases with 2, 4 or 8 members, and a different one in 23,031 of the 32,000 cases with 3, 5, 6 or 7. The Example's flow shows both: with 2 or 4 members it uses member 0 or 2 on either processor; with 5 members, member 2 on a little-endian processor and member 4 on a big-endian one. The golden vectors pin both cases. - The lowest bit.
layer3+4drops it at the end, the source's comment says "to deal with the common even ports pattern" (bond_ip_hash), so two ports that differ only in their last bit usually land on the same member. - The VLAN.
vlan+srcmacXORsskb_vlan_tag_get(skb), which is the tag's whole tag control information,vlan_tci(include/linux/if_vlan.h), so the priority bits count as well as the VLAN ID; an untagged frame counts as 0. The page takes the drop eligible indicator as 0. - Which member. The members that can transmit (in 802.3ad mode, those of the active aggregator) are listed in the order they joined the bond (bond_update_slave_arr), and the driver takes
slaves->arr[hash % count](bond_xmit_3ad_xor_slave_get). When a member goes down the list is rebuilt without it and the modulo runs over one member fewer, so the page shows, for each member in turn, where the flow goes if that one fails: often a flow moves although its own member stayed up. - Ports.
layer3+4reads the ports of unfragmented TCP and UDP; "For fragmented TCP or UDP packets and all other IPv4 and IPv6 protocol traffic, the source and destination port information is omitted" (HOWTO). The page reads TCP and UDP only.
Cisco's split. For the member count chosen, the page also shows the table document 12023 gives for the Catalyst 6500/6000, "the ratios of the values that each port accepts": 4:4 for two ports, 3:3:2 for three, 2:2:2:2 for four, 2:2:2:1:1 for five, 2:2:1:1:1:1 for six, 2:1:1:1:1:1:1 for seven and one value each for eight. Hence "you can only achieve perfect load balancing, even with random addresses, if you have two, four, or eight ports". The page shows each share of the 8 values as a percentage; it is the documented table, not a computation of Cisco's hash.
The spread. With a spread, the page computes the member of every flow in the run and counts them per member. It calls the spread even when no member carries more than one flow more than another, and it lists the members of the first 16 flows, which shows patterns such as the pairs layer3+4 makes of consecutive source ports.
Each end hashes only what it sends. "Slave selection for outgoing traffic is done according to the transmit hash policy" (HOWTO): the switch picks the member for the traffic coming back with its own hash, which the page does not compute.
State flags: the inputs
- How the values are written:
- Octet: as the LACPDU carries it, in hexadecimal with
0x(0x3D, the form of the State column in Cisco'sshow lacp neighbor, whose expected value Cisco gives as 0x3D, document 220367), in decimal (61, as Linux printsport statein /proc/net/bonding, bond_procfs.c) or in binary with0b. A bare3Dis refused, so it is never read as decimal. - SNMP BITS:
dot3adAggPortActorOperStateordot3adAggPortPartnerOperStateas SNMP returns them, one octet in hexadecimal (with or without0x) or eight binary digits with0b. - Extreme flags: Switch Engine's eight positions in the order of its legend, "A-Activity, T-Timeout, G-Aggregation, S-Synchronization C-Collecting, D-Distributing, F-Defaulted, E-Expired", a hyphen for a bit not set, as in its sample
A-GSCD--(Switch Engine 33.7.1 Command References, show lacp member-port). - Arista letters: EOS's legend "A = Active, P = Passive; S=ShortTimeout, L=LongTimeout; G = Aggregable, I = Individual; s+=InSync, s-=OutOfSync; C = Collecting, X = state machine expired, D = Distributing, d = default neighbor state", as in its sample
ALGs+CD(Arista EOS). One of each pair is required, C, X, D and d are optional, each letter once, in any order. - Huawei PortState: the PortState column of
display eth-trunk, "eight bits, such as 10111100", printed from Bit 1 to Bit 8 (Huawei, Link Aggregation Commands, V200R025C00, read in a browser: the site refuses automated reads). Type the actor's and the partner's PortState, or paste the whole output: the page reads every member row of its Local table (port, Status, PortType, PortPri, PortNo, PortKey, PortState, Weight) and of its Partner table (port, system priority, system ID, PortPri, PortNo, PortKey, PortState, under a header row that also begins with ActorPortName), pairs them by port name, shows the header lines it recognizes (LAG ID, WorkingMode, Hash arithmetic, System Priority, System ID) as printed, and reads in detail the member you choose, the first by default. Rows are recognized by their shape, so the header words may differ.display eth-trunkwithout a number lists every trunk, each opened by a line such asEth-Trunk10's state information is:; the page reads the first trunk with member rows, shows its name and says that others were left unread.
- Octet: as the LACPDU carries it, in hexadecimal with
- Actor: the state of the end whose output you are reading.
- Partner (optional): the partner's state as that end reports it, which is what it last received, or its defaults when Defaulted is set.
Juniper's show lacp interfaces prints the flags as words (Activity, Timeout, Aggr, Syn, Col, Dist, Def, Exp); read them off and type the octet, or compare them with the page's bit list.
State flags: the rules
The bits. IEEE 802.1AX itself is offered through the IEEE GET Program behind an IEEE account (IEEE SA, 802.1AX-2020), and was not read. Its published MIB module gives the order: "The first bit corresponds to bit 0 of the Actor_State (LACP_Activity), the second bit corresponds to bit 1 (Short_Timeout), the third bit corresponds to bit 2 (Aggregation)", and so on to "bit 7 (Expired)" (IEEE8023-LAG-MIB, dot3adAggPortActorAdminState). The Linux driver gives the same bits their place in the octet, from LACP_STATE_LACP_ACTIVITY 0x1 to LACP_STATE_EXPIRED 0x80 (include/uapi/linux/if_bonding.h), so bit 0 is the octet's lowest bit: 0x3D is Activity, Aggregation, Synchronization, Collecting and Distributing.
The SNMP form. The MIB declares the state as BITS, and SNMP sends a BITS value with "all the named bits ... commencing with the first bit and proceeding to the last bit, ... placed in bits 8 (high order bit) to 1 (low order bit) of the first octet" (RFC 3417, section 8). LACP_Activity is the first named bit, so SNMP shows the octet bit-reversed: 0x3D on the wire reads 0xBC through SNMP. The page shows every state in both forms.
Huawei's PortState. Huawei numbers the eight characters Bit 1 to Bit 8 from the left. Its table describes Bit 1 as "Whether the member interface is an Actor. This bit has a fixed value 1", Bit 2 as the timeout (1 short, 0 long; "By default, an Eth-Trunk member interface uses the long timeout interval (90s)"), Bit 3 as allowing the member interface to be aggregated, Bit 4 as being "added to the link aggregation group (LAG)", Bits 5 and 6 as being able to receive and to send LACPDUs, Bit 7 as LACPDUs carrying default parameter values, and Bit 8 as the actor's receive state machine being in the Expired state. Those are the MIB's bits 0 (LACP_Activity) to 7 (Expired), written lowest first, which is the reverse of the octet in binary: 10111100 as printed is 0b00111101, 0x3D, Cisco's expected value, and the same eight digits as the SNMP BITS value 0xBC written in binary. The page labels each bit with both numbers (Bit 1 · bit 0) and gives every state in Huawei's form too. Huawei words Bits 5 and 6 in terms of LACPDUs where the MIB names Collecting and Distributing; the page keeps the MIB's names and Juniper's meanings below. The Status column has Huawei's own words: "Selected: A member interface in Selected state is active", Unselect an inactive one, and ForceFwd one that "can forward Layer 2 traffic". In Huawei's example, Eth-Trunk10 has three members: GigabitEthernet0/0/2 and 0/0/3 are Selected with 10111100 on both ends (0x3D, bundled), and GigabitEthernet0/0/4 is Unselect with 10100000 here and 10110000 from the partner (0x05 and 0x0D: this end out of sync, the partner in sync but neither collecting nor distributing).
What each bit means, from Juniper's show lacp interfaces (Juniper):
| Bit | Name | Set | Clear |
|---|---|---|---|
| 0 | LACP_Activity | Active: takes part "regardless of the partner's control value" | Passive: "not transmitting LAC PDUs unless its partner's control value is Active" |
| 1 | LACP_Timeout | Short (fast) timeout | Long (slow) timeout |
| 2 | Aggregation | Can aggregate | "operate only as an individual link" |
| 3 | Synchronization | "allocated to the correct link aggregation group", with a compatible aggregator and an identity "consistent with the system ID and operational key information transmitted" | "not in the right aggregation" |
| 4 | Collecting | Collection of incoming frames enabled | Not enabled |
| 5 | Distributing | Distribution of outgoing frames enabled | "currently disabled" |
| 6 | Defaulted | Using "the default operational partner information, administratively configured for the partner" | Partner information "received in an LACP PDU" |
| 7 | Expired | The receive machine is in the Expired state | Not expired |
The timers. "In a fast timeout, PDUs are sent every second and in a slow timeout, PDUs are sent every 30 seconds. LACP timeout occurs when 3 consecutive PDUs are missed", 3 seconds or 90 seconds (Juniper, as above); Cisco's lacp rate gives "the fast rate, once every 1 second" and the normal rate "every 30 seconds" (Cisco, Command Reference, IOS XE 17.18); Extreme's LACP timeout is "either 90 seconds, long, or 3 seconds, short", long by default (configure sharing lacp timeout). The Timeout bit is a request to the partner: Linux's lacp_rate is the "rate in which we'll ask our link partner to transmit LACPDU packets", slow (30 seconds) by default (HOWTO). In the driver an end sends fast while its partner's Timeout bit is set and slow otherwise, and times its partner out by its own bit; when neither end is active there is no periodic transmission at all (ad_periodic_machine and ad_rx_machine, bond_3ad.c, whose constants are AD_FAST_PERIODIC_TIME 1, AD_SLOW_PERIODIC_TIME 30 and three times each for the timeouts). Huawei's lacp timeout: with fast the interval in which an Eth-Trunk must receive LACPDUs is 3 seconds and "If fast is specified, the remote device sends an LACPDU every 1 second"; slow, the default, is 90 seconds and every 30 seconds; a user-defined value runs from 3 to 90 seconds; the setting "takes effect on all its member interfaces", and "The timeout interval on the two ends can be different. To facilitate maintenance, you are advised to set the same timeout interval at both ends" (Huawei, as above). The page shows how often each end sends and after how long each gives up on the other.
The verdict. The pair is bundled when both ends are aggregatable, in sync, collecting and distributing, neither is Defaulted or Expired, and at least one is active. With only the actor's state, the verdict is about that end. The findings, in order:
- Both passive: "If both links are in passive mode, they won't exchange LACP packets, and the aggregated link won't be established" (Juniper, Aggregated Ethernet LACP); Cisco: a passive port "cannot form an EtherChannel with another port that is also in the passive mode".
- Expired (this end, or reported by the partner): no LACPDU arrived before the timer for the Current state ran out once; "If no LACP PDU is received before the timer for the Current state expires a second time, the state machine enters the Defaulted state" (Juniper). While Expired, the Linux driver sets its partner's Timeout to short, so it sends every second.
- Defaulted (this end, or reported by the partner): no LACPDU received in time; the partner values beside it are defaults, not what the far end said.
- Individual: Aggregation clear on either end.
- Out of sync: the link is not in the right aggregation. Ports form one aggregation when they have "the same actor system ID, actor key, partner system ID, and partner key" (HPE Aruba, ArubaOS 8.11, LACP), so a member cabled to another switch, or to a port of another group there, shows a partner system ID or key that differs from the other members': compare them in the show command's partner columns.
- In sync but not collecting and distributing: still being attached to the aggregator, or waiting for the partner (Juniper's mux states say which).
- Different timeouts: each end sends at the rate the other asks for, so a silent failure is noticed after a different time in each direction.
What it refuses, and why
- Which link: a policy other than the four (encap2+3 and encap3+4 can read a tunnel's inner headers, which the page does not take); a byte order other than little or big; fewer than 2 or more than 8 members; a missing field the policy reads; a malformed MAC (six octets, one separator throughout, or Cisco dot notation); an IP address with an octet over 255, a leading zero, a prefix length or a zone; addresses of two families; a protocol other than TCP or UDP; a port outside 0 to 65535; a VLAN ID of 0 or 4095 or outside 1 to 4094; a priority outside 0 to 7, or a priority on an untagged frame; a spread over a field the policy does not read (it would move nothing), of more than 4096 flows, or that runs past the field's last value. Fields the policy does not read are not read at all, so a stale value there does not stop the page.
- State flags: a value that is not one octet (over 255, more than two hexadecimal digits or eight binary digits); bare hexadecimal without
0x; eight characters of 0 and 1 in the octet form, which are either a Huawei PortState typed under the wrong format or binary without its0b(the message names both); an SNMP value of more than one octet; an Extreme string that is not eight positions of the right letter or a hyphen; Arista letters with a pair missing, a letter twice or a character Arista does not print; a Huawei PortState that is not eight characters of 0 and 1; a pasted output beside typed values; a pasted output with no member rows, with a line that starts like a Local or a Partner row but does not read as one, with two rows for one port in the same table, or with a Partner row whose port the Local table does not list; a chosen port the Local table does not list. - Every field is at most 64 characters, except a pasted output: at most 8,192 characters and 96 lines that are not blank, a line longer than 200 characters being no row and not read. A pasted output is read only in Huawei's format.
Worked examples
The course LAN Switch Operations and Maintenance, chapter 2.2, bundles two cables, ports 47 and 48, and its vendor slides configure the LACP fast rate; it gives no flows or addresses for the bundle. So the Examples are:
- Which link: a two-member bond, as the course's lab bundles two cables, carrying the first flow of the Learn article's lab, a backup stream from 192.0.2.10, TCP port 50001, to 198.51.100.20, TCP port 873, with
layer3+4on a little-endian processor. The ports read as 0x690351c3, the two addresses as 0x0a0200c0 and 0x146433c6; after the XOR and the folds the hash is 0x3b89385a, even, so member 0 carries it. Over the next 64 source ports the two members take 32 flows each, in pairs (0, 1, 1, 0, 0, 1, 1, 0 ...), because the last shift drops the lowest bit. - The Learn lab's reading: the same flow on four members and a big-endian processor gives 0x62d3e15a and member 2, the value the lab works by hand.
- layer2 to one router: with every flow addressed to the router's MAC,
layer2gives 0x0000080b (0x01 XOR 0x0a XOR 0x0800) and member 3 of 4 for all of them; varying the destination MAC over 256 values instead spreads them 64 per member. - IPv6 over three members: 2001:db8::10, TCP port 443, to 2001:db8:1::20; the next 300 destination ports from 51000 land 118, 91 and 91 on the three members, not an even third each. Cisco's documented split for three ports is uneven too: 3:3:2 of its 8 values, 37.5 %, 37.5 % and 25 %.
- State flags: 0x3F on both ends: active, short timeout, aggregatable, in sync, collecting and distributing; bundled, each end sending every second and giving up after 3 seconds. 0x3D on both is the same with the slow rate, Cisco's expected value. 68 and 0, as /proc/net/bonding prints them, are a passive Linux bond that has heard nothing facing a partner state of 0, the driver's default: both passive, Defaulted, out of sync.
A-GSCD--(Extreme),ALGs+CD(Arista), 0xBC (SNMP) and10111100(Huawei) are all 0x3D. - Huawei display eth-trunk: the sample pastes the example of Huawei's command reference, verbatim. GigabitEthernet0/0/2, Selected (as is 0/0/3), reads 10111100 on both ends: 0x3D, bundled, each end sending every 30 seconds. Choosing GigabitEthernet0/0/4, Unselect, reads 10100000 and 10110000: 0x05 and 0x0D, not bundled, with this end out of sync and the partner not yet collecting and distributing.
What it does not do
It does not talk to any switch or server: the values are yours. It does not compute any vendor's hash but the Linux driver's, nor the switch's choice for the traffic coming back, nor the encap policies, fragments or protocols other than TCP and UDP under layer3+4. It does not decode a whole LACPDU, only the two state octets (the system IDs, keys and port numbers of a pasted Huawei output are shown as printed, not checked), and it does not simulate the LACP state machines. To watch flows move between members as you fail one, use the hashing lab in the Link aggregation and LACP article.
Share results
Under the verdict, Share results builds a link to this page, only when you press it, that carries the mode and its fields as typed, after the #: mode (link or state) always; in link mode policy, order (little or big) and members, then only the fields the policy reads, when typed (srcmac, dstmac, srcip, dstip, protocol, srcport, dstport, vlan, priority), and spread and count when a spread is on; in state mode format, actor, and partner when typed, or, in Huawei's format with an output pasted, display (the output, its lines kept) and port when one is chosen, in place of actor and partner. Fields the policy does not read, and the other mode's, are not carried. In link mode the popover adds a caution: MAC and IP addresses and ports can describe hosts on a private network, so read them before you send the link. With a pasted output it adds one of its own: the output names the switches' system IDs (MAC addresses) and interfaces.
RFC 3986 (section 3.5, read 2026-11-08) has the fragment "separated from the rest of the URI prior to a dereference", so these values are not sent to the server when the link is opened; they stay in the address bar and the history of whoever opens it, and anyone who has the link can read them.
- How long. A link carries at most 16,384 characters, the bound the site uses for every value after the
#; a pasted output of up to 8,192 characters fits, and the other fields are far shorter. - Opening a link. The mode and its fields are set as typing would set them (in link mode, a field the policy does not read keeps its value, and a missing spread turns the spread off), and the page computes. A link with an unknown mode, policy, order, protocol, format or spread field, a field of the other mode or one the policy does not read, a missing required field, a count without a spread or the other way round, a
displayorportoutside Huawei's format, adisplaybeside anactoror apartner, aportwithout adisplay, or a value on two lines (displayexcepted) is ignored. Accepted or not, the values then leave the page's own address at once, without a request, so a reload, a bookmark or the page's own Share button carries nothing you did not choose to share.
Provenance
The engine is fixed bit arithmetic with no clock, no network and no randomness. Its golden vectors (set lacp-hash-and-state-reader-golden-2026-11-08b) pin every policy on both byte orders for 2 to 8 members, the Learn lab's six flows, IPv6 (with a dotted IPv4 tail), the three MAC notations, ports and addresses at their limits, the VLAN policy with and without a priority, nine spreads (up to 4096 flows), every one of the 256 state octets as an actor, 24 actor and partner pairs, the SNMP, Extreme and Arista forms, the Examples and samples, the sentences that carry the rules, and the refusals. Every expected value was derived by a separate Python implementation, not by running this engine: the hash from the driver's code with the addresses and ports read by struct.unpack in the processor's byte order, the states from the MIB's bit order and RFC 3417's rule. Its big-endian results agree with the Learn lab's own vectors, including the hash it works by hand. The second set adds Huawei's PortState: every octet again as a PortState, the example of Huawei's command reference with each member chosen, outputs with Windows line ends, blank lines and tabs, rows without headers, a ForceFwd row and a 10GE port, every refusal of a pasted output and its bounds; their expected values come from a second Python model that reads a PortState as the string reversed and splits the rows on whitespace. The Learn lab's little-endian results, which its byte-order switch now offers, agree with this engine flow by flow.
API
The same engine answers /api/v1/lacp-hash-and-state-reader on the site's HTTP API; the contract is on the API page, which also says whether this site serves the API.
- Request. A JSON object. Which link:
{"mode": "link", "policy": "layer3+4", "byteOrder": "little", "members": 2, "srcIp": "192.0.2.10", "dstIp": "198.51.100.20", "protocol": "tcp", "srcPort": 50001, "dstPort": 873, "spread": {"field": "srcPort", "count": 64}};policy(layer2by default),byteOrder(littleby default),protocol(tcpby default),vlan,priorityandspreadare optional, andsrcMacanddstMacare needed bylayer2andlayer2+3(srcMacalone byvlan+srcmac). State flags:{"mode": "state", "format": "octet", "actor": "0x3F", "partner": "0x3F"};format(octetby default) andpartnerare optional. In Huawei's format,displaymay carry the wholedisplay eth-trunkoutput instead ofactorandpartner, withportnaming the member read in detail. - Response, which link.
mode,policy,policyDefault,byteOrder,byteOrderMatters,members,family,etherType,used,formula,steps(eachidandvalue),hash,hashDecimal,member,ifDown(for each member going down, the member the flow then uses),ciscoValues,ciscoEven,spread(field,count,from,to,counts,min,max,even,first, or null) andnotes. - Response, state flags.
mode,format,formatDefault,actorandpartner(eachoctet,hex,decimal,binary,snmp,extreme,huaweiandbits, eight ofbit,name,mask,setandtext;partnernull when not given),huawei(null unless an output was pasted; elselagId,workingMode,hashArithmetic,systemPriority,systemId, each null when not printed,members, eachport,status,statusText,portType,portPri,portNo,portKey,weight,portState,hex,partnerandverdict, thenportandportDefault),timers(actorTimeout,partnerTimeout,actorSends,partnerSends,periodic),status(bundled,bundled-this-endornot-bundled),verdictText,findings(eachid,levelandtext) andnotes. - Errors. HTTP 400,
invalid_input, with the engine's message, for example"3D" looks hexadecimal: write it with 0x in front (0x3D), so it is not read as decimal..
Sources
- The Linux kernel, Linux Ethernet Bonding Driver HOWTO (read 2026-11-08): xmit_hash_policy, lacp_active and lacp_rate
- The Linux kernel source, drivers/net/bonding/bond_main.c (torvalds/linux master, read 2026-11-08): the hash functions and the choice of member; with bond_3ad.c, bond_procfs.c, include/net/flow_dissector.h, net/core/flow_dissector.c, include/net/ipv6.h, include/linux/if_vlan.h and include/uapi/linux/if_bonding.h
- Cisco, Understand EtherChannel Load Balance and Redundancy on Catalyst Switches, document 12023 (updated 30 November 2023; read 2026-11-08 through WebFetch, as cisco.com refused a direct download)
- Cisco, Configuring EtherChannels, Layer 2 Configuration Guide, IOS XE 17.18.x (Catalyst 9300) and the Command Reference, Layer 2/3 Commands (read 2026-11-08 through WebFetch)
- Cisco, Troubleshoot EtherChannels on Catalyst 9000 Switches, document 220367 (updated 8 August 2024, French edition; read 2026-11-08 through WebFetch)
- IEEE 802.1 Working Group, IEEE8023-LAG-MIB, the Link Aggregation MIB module for IEEE 802.1AX-2020 (read 2026-11-08) and IEEE8021-TC-MIB (read 2026-11-08)
- IEEE SA, IEEE 802.1AX-2020, Link Aggregation (read 2026-11-08): Active Standard, offered through the IEEE GET Program; its text was not read
- RFC 3417, Transport Mappings for the Simple Network Management Protocol (SNMP) (read 2026-11-08): section 8
- Juniper Networks, show lacp interfaces, Aggregated Ethernet LACP for Switches and Hashing Algorithms for LAG and ECMP (read 2026-11-08)
- Extreme Networks, Switch Engine v33.7.1 Command References (read 2026-11-08): configure sharing, show lacp member-port, configure sharing lacp timeout
- Arista Networks, EOS 4.37.0F User Manual, Port Channels and LACP (read 2026-11-08 through WebFetch)
- HPE Aruba Networking, ArubaOS 8.11 LACP and AOS-CX 10.16, LACP configuration settings (read 2026-11-08 through WebFetch)
- MikroTik, RouterOS 7.24 manual, Bonding (read 2026-11-08)
- Huawei, S5700 and S6700 V200R025C00 Command Reference, Link Aggregation Commands (read in a browser on 2026-11-08: the site refuses automated reads): display eth-trunk and load-balance
- Debian Wiki, ArchitectureSpecificsMemo (read in a browser on 2026-11-08: the site refuses automated reads): the summary table's endian column
- IANA, IEEE 802 Numbers (read 2026-11-08): EtherTypes 0800, 86DD and 8809
- RFC 9542 (section 2.1.4), RFC 5737 and RFC 3849 (read 2026-11-08): the documentation addresses of the Examples
- RFC 3986, Uniform Resource Identifier (URI): Generic Syntax (read 2026-11-08): section 3.5, the fragment, which carries a Share results link's values