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:
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
switchlan-vlan0 and given the device name bond-0 is createdswitchlan-vlanproto must be bondingbonding-policy should generally be 802.3ad where hardware offload is desiredxmit-hash-policy appears to work best with layer3+4 802.3ad to be selected, other values may fallback to round-robinlacp_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.ad_select set to bandwidth chooses aggregators to prioritise throughput, reselects aggregator when: 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).