Bonding

Welcome to the new interface bonding guide. This may be of special interest for Realtek switch users. Feel free to add your knowledge here.

This guide targets kernel 6.18 and the latest snapshot targets, specifically the Realtek switch targets.

When bonding ports, the ports should be removed from and the new bond device used in:

  • their parent bridge
  • VLAN tagging

Example configuration:

config device 'switch'
        option name 'switch'
        option type 'bridge'
        option macaddr 'A:B:C:D:E:F'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'lan5'
        list ports 'lan6'
#       list ports 'lan7'
#       list ports 'lan8'
        list ports 'bond-0'


config bridge-vlan 'lan_vlan'
        option device 'switch'
        option vlan '1'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'
        list ports 'lan4:u*'
        list ports 'lan5:u*'
        list ports 'lan6:u*'
#        list ports 'lan7:u*'
#        list ports 'lan8:u*'
        list ports 'bond-0:u*'

config device
        option name 'switch.1'
        option macaddr 'A:B:C:D:E:F'

config interface '0'
        option proto 'bonding'
        option bonding_policy '802.3ad'
        list slaves 'lan7'
        list slaves 'lan8'
        option xmit_hash_policy 'layer3+4'
        option lacp_rate 'fast' # LACPDUs
        option monitor_interval '100' #miimon
  • lan7 & lan8 are removed from the bridge switch
  • lan7 & lan8 are removed from the VLAN lan-vlan
  • A bond named 0 and given the device name bond-0 is created
  • bond-0 is added to the bridge switch
  • bond-0 is added to the VLAN lan-vlan
  • bond-0 settings are applied:
    • proto must be bonding
    • bonding-policy should generally be 802.3ad where hardware offload is desired
    • xmit-hash-policy appears to work best with layer3+4
      • calculates link index by hashing header IP address and port values
      • allows 802.3ad to be selected, other values may fallback to round-robin
    • lacp_rate set to fast, sends LACP packets every second, therefore detects failover after at most 1 second. Default is to send every 30 seconds.
    • monitor_interval set to 100 monitors link status every 100ms to detect link state changes.
  • If you are running MLAG/VPC then you may also wish to update the `ad_select` policy:
    • ad_select set to bandwidth chooses aggregators to prioritise throughput, reselects aggregator when:
      • A port is added to or removed from the bond;
      • Any port's link state changes;
      • Any port's 802.3ad association state changes;
      • The bond's administrative state changes to up.
    • ad_select set to stable (default) only changes links when the active ports are down or not available.

Settings should be identical at both ends of the bonds (except the lan port selection which can vary at each end).

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2026/06/09 14:38
  • by stephen