a) SoC is connected to 3 GbE-lanes:
- eth0 (lan0-lan3) connected to port 5
- eth1 (wan) - SoC-connection not visible to switch configuration
- eth2 (lan4) connected to port 6
As eth1 should be used for up to 1GbE WAN-connection one could use eth0 and eth2 to bond/aggregate traffic.
I do not expect the benefit to be utmost high, but hey, it should be better than just separating traffic via VLANs.
Reason to do so for me is to connect a smart switch to get higher connection speeds.
b) Existing package kmod-bonding:
Kernel supports bonding (existing /lib/modules/4.4.119-[…]/bonding.ko)
Searching google for ““kmod-bonding” openwrt” there is only a couple of entries:
- https://forum.lede-project.org/t/bonding-802-3ad/6236 (summary)
So it seems to me no one ever had an openwrt device capable of using that
First try was to just use rc.local to echo necessary commands:
ifconfig bond0 down echo 802.3ad > /sys/devices/virtual/net/bond0/bonding/mode echo fast > /sys/devices/virtual/net/bond0/bonding/lacp_rate echo layer3+4 > /sys/devices/virtual/net/bond0/bonding/xmit_hash_policy ifconfig bond0 up echo +eth0 > /sys/devices/virtual/net/bond0/bonding/slaves echo +eth2 > /sys/devices/virtual/net/bond0/bonding/slaves
reboot -> syslog:
2018-04-17T02:43:17+02:00 info kernel: [ 32.219033] bond0: Setting LACP rate to fast (1) 2018-04-17T02:43:17+02:00 info kernel: [ 32.219325] bond0: Setting xmit hash policy to layer3+4 (1) 2018-04-17T02:43:17+02:00 info kernel: [ 32.229780] 8021q: adding VLAN 0 to HW filter on device bond0 2018-04-17T02:43:17+02:00 info kernel: [ 32.231708] bond0: Adding slave eth0 2018-04-17T02:43:17+02:00 err kernel: [ 32.231717] bond0: Error: Device is in use and cannot be enslaved 2018-04-17T02:43:17+02:00 err kernel: [ 32.237849] bond0: option slaves: unable to set because the bond device is up 2018-04-17T02:53:28+02:00 info kernel: [ 30.138315] bond0: Adding slave eth2 2018-04-17T02:53:28+02:00 err kernel: [ 30.138326] bond0: eth2 is up - this may be due to an out of date ifenslave 2018-04-17T02:53:28+02:00 info kernel: [ 30.162580] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready 2018-04-17T02:53:28+02:00 info kernel: [ 30.162592] 8021q: adding VLAN 0 to HW filter on device bond0
So it seems ifenslave might be necessary in order to get this working, but infenslave is not available in openwrt/turris repo - do I need to build it myself?