Best way to configure Bonding in OpenWrt?

Something like this in /etc/rc.local using ip full?

ip link add type bond name bond0
cat "balance-rr" > /sys/class/net/bond0/bonding/mode

ip link set eth0 master bond0
ip link set eth1 master bond0

# until we set up the bond your uci config will reference
# nonexistant bond0 device so now we have it, we'll restart here.

/etc/init.d/network restart 

If the UCI config lists say bond0.1 and bond0.2 as the LAN and WAN devices will this work, and get set up by UCI fine after restarting network?

1 Like