brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: lacp-rate: fast makes a netplan 802.3ad bond check its partner every second

Netplan
~/tips/tip-netplan-bond-lacp-rate-fast

lacp-rate: fast

Only used in 802.3ad mode, lacp-rate chooses between a slow 30 second and a fast one second LACP interval.

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

More Netplan tips – to: 192.168.3.0/24 hidden: true link-local: [] wakeonlan: true ls -l /etc/netplan/ All Netplan tips (21) All topics

Link