
Link Aggregation Deep Dive, Part 3: Two Keys and Nobody Gets Elected
Why every LACP port carries an admin key and an oper key, when the two differ, and how both ends of a bundle pick the same active links without ever holding an election. Plus a lab where Cisco followed the rule and Arista didn't.
A few weeks after Part 1 went up, Ben Erickson left a comment with two questions about things my earlier posts had skimmed past, and this part exists because of them. The first was about keys. Every LACPDU carries a key for each port, every show lacp prints both an admin key and an oper key, and Ben wanted to know why there are two and when they ever differ. The second came with a scenario attached, and it’s good enough that I built a lab around it.
say SW1:ge-0/0/0[127],ge-0/0/1[127],ge-0/0/2[0] connect to SW2:ge-0/0/0[127],ge-0/0/1[0],ge-0/0/2[127] respectively (the numbers in brackets indicate the port priority) in a LAG and the LAG supports a maximum of 2 interfaces. If SW1 is elected the Primary, it will select ge-0/0/0 and ge-0/0/2. If SW2 is elected the primary, it will select ge-0/0/0 and ge-0/0/1. If Primary/Backup roles did not exist, then both switches would pick different interfaces for the LAG.
Three links, room for two, and each switch would rather keep a different pair. Part 1 covered all of this in two sentences, one about operational keys and one about the better system priority winning control. Both sentences were true, and neither one would help you read a show lacp output at 2 a.m. So this part slows down and goes through the whole thing, starting with what’s in the frame.
Reading an LACPDU
I captured this one between two Arista cEOS 4.36.1F switches in my lab and decoded it with tcpdump (trimmed, with the zero padding cut).
20:34:24.589198 aa:c1:ab:09:78:cd > 01:80:c2:00:00:02, ethertype Slow Protocols (0x8809), length 124: LACPv1, length 110
Actor Information TLV (0x01), length 20
System 00:1c:73:b3:23:e5, System Priority 100, Key 1, Port 1, Port Priority 127
State Flags [Activity, Aggregation, Synchronization, Collecting, Distributing]
Partner Information TLV (0x02), length 20
System 00:1c:73:7a:0c:7a, System Priority 32768, Key 1, Port 1, Port Priority 127
State Flags [Activity, Aggregation, Synchronization, Collecting, Distributing]
Collector Information TLV (0x03), length 16
Max Delay 0
Terminator TLV (0x00), length 0
0x0000: 0180 c200 0002 aac1 ab09 78cd 8809 0101 ..........x.....
0x0010: 0114 0064 001c 73b3 23e5 0001 007f 0001 ...d..s.#.......
0x0020: 3d00 0000 0214 8000 001c 737a 0c7a 0001 =.........sz.z..
0x0030: 007f 0001 3d00 0000 0310 0000 0000 0000 ....=...........LACP rides the Slow Protocols EtherType, 0x8809, to the reserved multicast address 01:80:C2:00:00:02, the same address and EtherType that LACP shares with OAM and the Marker protocol. The byte after the EtherType is the subtype (01 for LACP), and the next is the version (01). The frame is 124 bytes here and 128 with the FCS, which is no accident. Versions of the standard through 802.1AX-2008 forced the LACPDU to a fixed 128 byte frame, and current versions still pad to that length because some older implementations only accept it. Every LACPDU ends in 50 bytes of zeros, sent once a second or once every 30 seconds, forever.
Everything interesting lives in two 20 byte blocks that share one layout.
| Bytes here | Field | Value |
|---|---|---|
0064 | System Priority | 100 |
001c 73b3 23e5 | System (a MAC address) | 00:1c:73:b3:23:e5 |
0001 | Key | 1 |
007f | Port Priority | 127 |
0001 | Port Number | 1 |
3d | State | 0x3d, eight flags |
00 0000 | Reserved |
The Actor block is the sender describing itself. The Partner block is the sender repeating back what it believes about the other end, keys and priorities and state included. Each side compares the partner block it receives against its own actor block, which is how two switches confirm they agree without any acknowledgment message. Every LACPDU carries both systems’ priorities, both MACs, both keys, and both port priorities. After one exchange, each switch has every number the other one will sort by.
The state byte is where you diagnose a bundle.
| Bit | Mask | Flag | Set means |
|---|---|---|---|
| 1 | 0x01 | Activity | Active LACP (clear is passive) |
| 2 | 0x02 | Timeout | Fast rate, 1 second PDUs |
| 3 | 0x04 | Aggregation | This link can be part of a bundle (clear means it can only run alone) |
| 4 | 0x08 | Synchronization | This link is in the right aggregation, matching the system ID and key I’m sending |
| 5 | 0x10 | Collecting | Accepting frames from this link |
| 6 | 0x20 | Distributing | Sending frames on this link |
| 7 | 0x40 | Defaulted | I’ve heard nothing from you, so I’m using configured defaults for your side |
| 8 | 0x80 | Expired | My receive timer ran out |
So 0x3d is a healthy member on slow timers, Activity, Aggregation, Synchronization, Collecting, Distributing, with the Timeout bit clear. Arista prints the same thing as ALGs+CD in show lacp, and Cisco prints the raw byte as 0x3D in show lacp internal. The standard says flat out that receivers ignore the Defaulted and Expired bits, and that they’re there for whoever is troubleshooting… which is the most honest sentence in the whole clause.
Two keys, and only one of them goes on the wire
Look at the key field again. The actor block has one key slot, so whatever your show lacp prints, only one of those two values ever leaves the box. 802.1AX clause 6.3.5 requires two keys on every port, and on every aggregator too. In the standard’s words, “The operational Key is the Key that is currently in active use for the purposes of forming aggregations,” while “The administrative Key allows manipulation of Key values by management.” The oper key goes in the LACPDU. The admin key is the handle you configure, and it’s your statement that a set of ports could aggregate together. The oper key is the system’s statement that, right now, given everything it knows about its own hardware and links, those ports can.
Keys are also strictly local. A key means something only to the system that assigned it, so the two ends of a bundle never have to agree on a value. A bundle forms from links that land on one partner system and that the partner gave a common oper key, whatever that number is on its side. I tested it. I moved one end of a link into Port-Channel2, so that port advertised key 2 against key 1 on the other side, and it bundled anyway. One vendor’s box advertising key 0x8001 while the other end advertises 0x0001 is legal.
When do admin and oper differ? The standard lists the cases right in 6.3.5. The first is an admin change the hardware hasn’t caught up with yet, where you changed the config and the port hasn’t acted on it. The second is a change in the link itself. Auto-negotiation landed on a different speed or duplex, so the port’s real capability changed underneath your config, and the standard calls it “permissible (and appropriate)” for the oper key to follow. Either end of the link may make that kind of change whenever it needs to (6.7.2). The third is hardware that can’t aggregate every combination of ports.
The standard’s example of that third case, in 6.7.2, is a box with four ports, A through D. It can run all four as one bundle, or A+B and C+D as two bundles, or four links on their own, but its hardware can’t do A+C with B+D. An admin key can’t express “these four, but only in these particular pairs,” so the system re-keys ports on the fly to steer the protocol into a combination its hardware can build. Informative Annex C works through the same idea at length, under the title “LACP standby link selection and dynamic Key management.”
Only one side may re-key this way, the one with the better System ID, which is the first hint at Ben’s second question. The other side “shall not attempt to modify operational Key values for this purpose.” The standard explains why in a note. If both sides could do it, “this could be a non-converging process, as a change by one participant can cause the other participant to make a change, which in turn causes the first participant to make a change—and so on, ad infinitum.”
What the boxes do
Ben couldn’t get a straight answer on when the two differ, and I can see why. In practice the two keys almost always match, and some implementations don’t bother keeping them separate at all.
On Arista, the key is the channel-group number. In my lab, admin and oper matched on every member in every state I could produce (0x0001 for Port-Channel1), bundled, standby, stuck in negotiation, deadlocked, defaulted. EOS gives you no knob for the key itself. I tried to force a split by setting one member to speed 10g while its siblings stayed at 1G, the auto-negotiation case the standard describes. EOS didn’t re-key anything. It kept the 10G link, pulled both 1G links out with the reason wrong speed for aggregate, and stopped sending LACPDUs on them entirely. EOS refuses the mismatch outright, which is a reasonable way to handle it… it’s just a different mechanism from the one the standard wrote down.
Linux takes a third road. The bonding driver builds the speed and duplex straight into the key, five bits of speed code and a duplex bit under a user settable field, so a 10G port and a 1G port in the same bond get different keys and land in different aggregators. But it writes those bits into the admin key and then copies admin to oper, so on Linux the two never differ either. The kernel follows the standard’s intent, a key that reflects what the link can do, and skips the distinction completely.
Cisco’s command reference describes both keys as values LACP “automatically generates,” with the admin key reflecting “port physical characteristics (for example, data rate and duplex capability) and configuration restrictions that you establish.” Its show lacp internal sample shows them equal. Its show etherchannel detail sample on the same page has one member at Admin Key 0x0 and Oper Key 0x1, with no explanation, and that’s the closest Cisco gets to documenting a split. A Cat9kv running IOS-XE 17.18.2 in my lab kept both at 0x1 on every member that was up, bundled, hot-standby or suspended. The only mismatch I saw was a port stuck down after boot, Admin 0x1 and Oper 0x0, which is a port with no operational key because it isn’t operating. When members’ speeds disagreed, IOS suspended the odd one as incompatible instead of giving it a new key. The one vendor screen I found with a real split is from Allied Telesis, whose LACP guide says the admin key “is a value you can set, but the port key is calculated by the system” and then shows Admin Key ..... 1 next to Port Key ..... 2 on the same port.
So, Ben, the short version. Two keys exist because the standard separates what you configured from what the port can do right now, and only the second one is ever sent. On Arista, Cisco and Linux, in my lab and in almost every vendor example I found, you won’t see them differ, because the vendor folded capability into the key or refused to bundle the mismatch.
The place the split does real work is multi-chassis. The 802.1 editor’s report on DRNI, the standardized multi-chassis scheme that nearly everyone ignored in favor of the System ID spoofing from Part 2, describes changing the actor’s oper key when the link between the two chassis fails, so the pair stops looking like one system to the device below. The same slides say the mechanism “already exists,” meaning the separate admin and oper key objects that had been in the standard since 802.3ad.
Nobody gets elected
Now the scenario. In LACP the lower number is better, so SW1 ranks its link on port 2 first (priority 0), then port 0 (127, lower port number than port 1), while SW2 ranks port 1 first and then port 0. Ben’s arithmetic is right. SW1’s preference is ports 0 and 2, SW2’s is ports 0 and 1, and if each switch followed its own list you’d get one shared link and two links that only one switch wants.
Ben framed the fix as electing a Primary, and that’s the word plenty of vendor docs use for multi-chassis pairs, so it’s a fair word to reach for. vPC does hold an election between its two peers, with a role priority to steer it. Spanning tree holds one too, for the root bridge. LACP doesn’t. The LACPDU has no role field and no Primary message. If SW2 ever objected the way the peasant does to Arthur in Holy Grail, “Well, I didn’t vote for you,” Arthur’s answer is the LACP answer, too. “You don’t vote for kings.” The crown goes to whichever switch has the lower System ID.
What decides it is clause 6.7.1, which is normative for any system that can’t run every link at once. Each system builds a System Aggregation Priority out of its system priority (2 bytes) followed by its MAC (6 bytes), and “the System with the numerically lower value of System Aggregation Priority has the higher priority.”
Aggregation Ports shall be selected for aggregation by each System based upon the Port Aggregation Priority assigned by the System with the higher System Aggregation Priority
Each System does its own selection. But every system ranks the links using the better system’s port priorities. Remember that every LACPDU carries both sides’ priorities and port numbers. Both switches already have the same numbers, so they sort the list identically and land on the same answer without telling each other anything. The losing switch’s port priorities don’t enter into it at all. The links that don’t make the cut go to standby, and on the wire the tell is the Synchronization bit, cleared on those links.
The standard even includes Ben’s scenario as a worked example. Annex C.6 has two systems, each limited to two links, cabled with opposite port numbering at each end, and it says plainly what happens without the rule. “System A and System B might have both selected their own Aggregation Ports 1 and 2 as the active links, and there would be no communication.”
Cisco’s documentation tracks the standard almost word for word. “First the system with a numerically lower system priority and system ID is placed in charge of the decision,” then “that system decides which ports are active and which are hot standby, based on its values for port priority and port number,” and “the port priority and port number values for the other system are not used.” Juniper says the same thing from the other direction. “Port priorities on the other device (the noncontrolling end of the link) are ignored.”
In Ben’s scenario, with default system priorities, the switch with the lower MAC controls. Give SW1 a system priority of 100 and SW1 controls, the active links are ports 0 and 2, and SW2 goes along because it’s sorting by SW1’s numbers too.
If you hang servers off switches, check the host side. Linux’s default ad_actor_sys_prio is 65535, the worst possible value. A Linux bond with default settings loses that comparison to almost any switch ever built, so the switch’s port priorities decide which of the host’s links go standby, whatever the server team configured… which they’ll find out about from a ticket.
Then I tried it in the lab
I built Ben’s topology on my lab server twice, once with two Cisco Catalyst 9000v switches (Cat9kv, IOS-XE 17.18.2) and once with two Arista cEOS 4.36.1F switches. Three links in one port-channel, his port priorities, link A at 127/127, link B at 127/0, link C at 0/127, and a cap of two active links. In both labs sw2 had the lower MAC, so with default system priorities it should control, and the standard predicts A+B.
Cisco follows clause 6.7.1
On the Cat9kv, lacp max-bundle 2 did what the standard says. With sw2 in control the bundle was A+B, with the third link in hot-standby (H) on both ends. With lacp system-priority 100 on sw1 it was A+C. I ran 36 bring-ups across the two controllers, staggered in every order, one link at a time, and all three at the same instant, and both ends agreed on the controller’s pair every time.
Order doesn’t matter on IOS-XE because it preempts by default. Here sw2 is in control and I brought up C, then A, then B, about 40 seconds apart. The output is sw1’s show etherchannel summary row after each step, then the log lines from the last one.
[04:36:19Z] no shutdown Gi1/0/3 on both
--- sw1 [04:37:01Z]
1 Po1(SU) LACP Gi1/0/1(D) Gi1/0/2(D)
Gi1/0/3(P)
[04:37:06Z] no shutdown Gi1/0/1 on both
--- sw1 [04:37:49Z]
1 Po1(SU) LACP Gi1/0/1(P) Gi1/0/2(D)
Gi1/0/3(P)
[04:37:54Z] no shutdown Gi1/0/2 on both
--- sw1 [04:38:37Z]
1 Po1(SU) LACP Gi1/0/1(P) Gi1/0/2(P)
Gi1/0/3(H)
--- sw1 logging
*Nov 28 04:37:58.164: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/2, changed state to up
*Nov 28 04:38:00.189: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to down
*Nov 28 04:38:03.956: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to upC bundled alone and A joined it. Two seconds after B’s link came up, IOS pulled C back to hot-standby to make room, and the port-channel stayed up through the swap. sw2 showed the same pair.
Capping only one switch didn’t change the answer. With the cap on sw1 and sw2 in control I still got A+B, and sw1 held its own favorite port, C at priority 0, in hot-standby because sw2’s list said so. That’s Ben’s model with the System ID in charge, the way he first framed it.
Changing lacp system-priority on a live bundle re-selects right away, but it isn’t hitless. About 23 seconds after I set it on sw1, both switches dropped Port-channel1 for about 2 seconds and brought it back as A+C.
Arista lets the cap decide
The cEOS links were Et1, Et2 and Et3. EOS caps a bundle with port-channel max-links, and it doesn’t have Cisco’s lacp max-bundle.
The first bring-up gave me B+C.
sw1# show port-channel 1 detail all-ports
Port Channel Port-Channel1 (Fallback State: Unconfigured):
Minimum links: unconfigured
Maximum links: 2
Minimum speed: unconfigured
Current weight/Max weight: 2/16
Active Ports:
Port Time Became Active Protocol Mode Weight State
------------ --------------------- ------------ ---------- ---------- -----
Ethernet2 20:15:14 LACP Active 1 Rx,Tx
Ethernet3 20:15:14 LACP Active 1 Rx,Tx
Configured, but inactive ports:
Port Time Became Inactive Reason
--------------- -------------------------- -----------------
Ethernet1 Always exceeds max linksFlapping links in different orders showed the pattern. In every order I tried, max-links alone ignored port priority and system priority. Whichever two links come up first win, and the third sits out with exceeds max links. Bring them up in the order 3, 2, 1 and you get B+C. Bring them up 1, 3, 2 and you get A+C. Giving sw1 lacp system-priority 100, which I confirmed in the captured LACPDUs, changed nothing.
It got worse. In seven runs where all three links came up at the same instant on both switches, the two sides picked different pairs every time. sw1 chose B+C, sw2 chose A+C, and only link C carried traffic. That’s the Annex C.6 failure, minus one lucky overlap. It sat that way for more than 80 seconds without recovering, and the same split came back on every simultaneous bring-up with either switch as controller.
EOS has a second knob, port-channel member priority preemptive, which its help text describes as “Enforce member port priority for same speed port-channels.” With that on both switches, EOS finally used port priorities… each switch’s own. sw1 wanted C then A, sw2 wanted B then A, and neither gave way.
--- sw1 [20:22:37Z]
LACP System-identifier: 0064,00-1c-73-b3-23-e5
Et1 Bundled | 8000,00-1c-73-7a-0c-7a 1 ALGs+CD 0x0001 127
Et2 Standby | 8000,00-1c-73-7a-0c-7a 2 ALGs- 0x0001 127
Et3 In Negotiation | 8000,00-1c-73-7a-0c-7a 3 ALGs+ 0x0001 0
--- sw2 [20:22:37Z]
LACP System-identifier: 8000,00-1c-73-7a-0c-7a
Et1 Bundled | 0064,00-1c-73-b3-23-e5 1 ALGs+CD 0x0001 127
Et2 In Negotiation | 0064,00-1c-73-b3-23-e5 2 ALGs+ 0x0001 0
Et3 Standby | 0064,00-1c-73-b3-23-e5 3 ALGs- 0x0001 127The output above is show lacp internal on each switch, trimmed to the member rows, with sw1 holding system priority 100. The Sys-id column is the partner’s, which is why sw2 shows the 0064. One active link out of a cap of two, and two links deadlocked in opposite states, in all three bring-up orders I tried, and it stayed that way when I handed control to sw1. On the wire (this capture is from a later run with the cap on sw2 only, where link C sat in the same standoff), sw1 sends state 0x0d on link C, in sync, meaning “I’ve selected this link, I’m waiting for you.” sw2 answers with 0x05, out of sync, meaning “this link is standby for me,” and neither side moves.
Actor Information TLV (0x01), length 20
System 00:1c:73:b3:23:e5, System Priority 100, Key 1, Port 3, Port Priority 0
State Flags [Activity, Aggregation, Synchronization]
Partner Information TLV (0x02), length 20
System 00:1c:73:7a:0c:7a, System Priority 32768, Key 1, Port 3, Port Priority 127
State Flags [Activity, Aggregation]The only way I got a clean two link bundle with priorities honored was to put the cap and the preemption on one switch only. Cap sw1 and you get A+C, every time, even with sw2 holding the better System ID. Cap sw2 and you get A+B, every time, even with sw1 holding it. Those are Ben’s two answers exactly. On this EOS build his model holds, with one change of cast. The switch that decides is whichever one enforces the cap. The System ID comparison the standard makes normative, the one the Cat9kv followed in every run, didn’t come into play once.
A few caveats, because these are virtual switches. I can’t promise a 9300 or a 7050 behaves the same with real hardware. Arista’s manual says that with preemption enabled, “the switch considers the ports in a descending order of priority,” and it doesn’t say whose priority, and the feature notice that might explain it is behind a login, of course. With preemption on both ends, a two-sided cap on EOS 4.36.1F never reached two links in any order I tried. Without preemption, which two you get depends on which links came up first, and if they all come up at once you may get only one.
The knobs this explains
Capping the bundle. Cisco’s lacp max-bundle sets the number of active members, and everything past it goes hot-standby, shown as H in show etherchannel summary, and it preempts, so a better link that comes up later takes its slot back. On Catalyst that also covers a hardware limit you don’t configure, since only eight LACP links can be active at once and up to eight more wait in hot-standby. Arista’s version is port-channel max-links, with the caveats from the last section. Whichever box you’re on, give both ends the same port priority ordering, so it doesn’t matter whose list wins or whether the vendor follows the standard’s rule at all.
Steering which links win. lacp system-priority decides which switch’s port priorities count, and it’s global on Cisco, one value per box. lacp port-priority then orders the links on that switch. Setting port priorities on the losing switch does nothing on a box that follows the standard, which is a fun one to discover after an hour of tuning the wrong end.
Refusing to run short. min-links takes the whole bundle down when fewer than N members are up. Cisco, Arista, Juniper (minimum-links) and Linux (min_links) all have it, and none of it is in 802.1AX. It’s for designs where a half strength bundle is worse than no bundle, like a pair of uplinks where routing should shift traffic to the other path once one bundle loses capacity.
What happens when the other end stays silent. The standard’s answer is gentler than most people assume. A port that hears no LACPDUs goes to the Defaulted state and fills in the partner’s values from configured defaults, and with the standard defaults that port comes up on its own as a single working link (the 802.1AX-2020 revision drafts renamed these from “Individual” to “Solitary” links). Vendors mostly made that more cautious. NX-OS defaults to lacp suspend-individual, which suspends the port, and Part 1 covered how that breaks PXE booting servers. Arista’s port-channel lacp fallback and Juniper’s force-up exist to get back roughly the behavior the standard allowed in the first place. Linux has historically let one interface go active without a partner, and kernel 7.2 (August 2026) added lacp_strict, which holds the bond’s carrier down until enough members have a real LACP partner.
The small numbers that become MAC addresses. Plenty of boxes never let you type a System ID or a virtual MAC. They build one from a small number you pick, and that number gets copied from one deployment to the next along with the rest of the config. I got bitten by this on Palo Alto. PAN-OS builds the virtual MACs for an active/passive pair from the HA Group ID, and two separate firewall pairs on the same Group ID brought their aggregate interfaces up with the same MAC. The switch saw that MAC arriving on two different bundles and flapped it back and forth between them.
Palo isn’t alone. Cisco vPC builds its system MAC from the domain ID, so two vPC pairs wired back to back on the same domain ID present the same partner System ID, and the double-sided vPC suspends. Cumulus wants a different clagd-sys-mac for every MLAG pair in the network. Juniper SRX chassis clusters derive their reth MACs from the cluster ID and FortiGate clusters derive theirs from the HA group ID, and both vendors document the collision when two clusters share a broadcast domain. Track these IDs the way you already track VLANs and ASNs.
On the Cat9kv the switch with the better System ID made the call, as the standard says. On the EOS build the switch holding the cap made it, whichever one the standard had put in charge. If you’ve run max-links on real Arista hardware, or you’ve got a link aggregation question you’ve never gotten a straight answer on, leave it in the comments. The last one turned into a whole post.
No vendor had a hand in this post and nobody paid for it. The opinions here are mine, and so are any errors. For more, please read my full disclaimer.
New posts in your inbox when they publish, including new parts of Link Aggregation Deep Dive.



Comments