Link aggregation with LACP is one of those things where the netplan part is short and the switch part takes the evening. Of the bond parameters, lacp-rate is one I keep an eye on, since it decides how quickly the two sides notice a problem.
network:
version: 2
ethernets:
enp2s0: {}
enp3s0: {}
bonds:
bond0:
interfaces: [enp2s0, enp3s0]
addresses: [192.168.93.2/24]
parameters:
mode: 802.3ad
mii-monitor-interval: 100
lacp-rate: fast
The reference says lacp-rate is slow (every 30 seconds) or fast (every second), and that slow is the default. It is only used in 802.3ad mode, so setting it on an active-backup bond does nothing.
Related parameters from the same page: transmit-hash-policy (layer2, layer3+4, layer2+3, encap2+3 or encap3+4, used by balance-xor, 802.3ad and balance-tlb) and min-links, the minimum number of links that must be up for the bond to be up. The mii-monitor-interval default of 0 disables link checking, and unitless values are milliseconds.
The caveat is that 802.3ad is a negotiation, so the switch ports need LACP configured as well. I’d verify the bond with cat /proc/net/bonding/bond0 after netplan apply.
Further reading: Netplan YAML reference