# FreeBSD does not send LACPDU Actor-DISTRIBUTING



## DaveR (Feb 4, 2021)

I have a situation where LACPDU exchanges end with one end announcing DISTRIBUTING while the other stopped at COLLECTING.  Both ends are in COLLECTING/DISTRIBUTING state, but the sequence timing of the LACPDU exchanges seems to be such that:  The one side announces COLLECTING; the other side announces COLLECTING and then announces DISTRIBUTING; and the first side does not announce DISTRIBUTING.  The situation does not clear up until the LACP_Timeout (set to long, 30sec) expires and both ends announce their DISTRIBUTING states.

Here is a summary of the latter portion of the LACPDU exchange between the endponts...
   HOST:     ---> ACTOR(activity/aggregation/sync/collecting)     PARTNER(timeout,aggregation,sync)                         
   SWTICH: ---> PARTNER(activity/aggregation/sync/collecting)   ACTOR(timeout,aggregation,sync,collecting)           
   SWITCH: ---> PARTNER(activity/aggregation/sync/collecting)   ACTOR(timeout,aggregation,sync,collecting,distributing)
At this point, the HOST internally moves to DISTRIBUTING state, but does not send an LACPDU packet announcing so.
After 30 seconds, both endpoints announce their DISTRIBUTING states.

The trouble comes when after going to DISTRIBUTING state, the HOST sends gratuitous-ARPs for an address assigned to the interface-group.
The "SWITCH" end does not forward the G-ARPs unless it sees the HOST's DISTRIBUTING announcement, which won't be until the 30-second LACP_Timeout expiry.  By then the HOST is no longer sending the G-ARPs, and the ARP-Table updates in the network don't happen.

I consulted the LACP specification (IEEE Std 802.1AX-2014), and it does not appear that the HOST side is misbehaving in the above scenario.
According to section "6.4.15 Mux machine", there is no incorrect behavior here. The HOST transitioning into its COLLECTING state is required to send an LACPDU
(actor/partner-info) frame, which it does.  At that time, the "Partner"(SWTICH) state is still not yet in the COLLECTING state.  This means the HOST's LACP state can not go to DISTRIBUTING state and the HOST announces COLLECTING rather than DISTRIBUTING state.

Once the SWITCH announces it is COLLECTING, the HOST transitions to DISTRIBUTING.  If I am following the LACP spec correctly, the protocol definition does not require transition from COLLECTING to DISTRIBUTING to send the LACPDU (actor/partner-info) frame.  And in fact, this is what I am seeing behaviorally from the bsd HOST.

Has anyone else noticed this behavior, or have any pointer to specification requirement I may be missing here?
Thanks!
---Dave.


----------



## DaveR (Mar 2, 2021)

We found it to be something of a corner-case LACP behavior.
Wondering if any others have noticed anything similar?
---Dave.


----------



## DaveR (Mar 3, 2021)

I have also found this paragraph in the LACP specification.
_   6.4.1 LACP Design Elements
      ...
   e) In addition to periodic LACPDU transmissions, the protocol transmits
   LACPDUs when there is a *Need To Transmit (NTT) *something to the Partner;
*i.e., when the Actor’s state changes* or when it is apparent from the  
   Partner’s LACPDUs that the Partner does not know the Actor’s current state._

If this paragraph is the overriding requirement, then the behavior seen above is *a FreeBSD bug*.
Hoping for feedback.


----------



## SirDice (Mar 4, 2021)

DaveR said:


> Hoping for feedback.


There are very few FreeBSD developers on the forums. I think you'll get more/better responses on the freebsd-net mailing list.


----------

