OpenWrt Forum Archive

Topic: Aggregation link

The content of this topic has been archived on 13 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I have one questions that I will be very glade to listen advises. And because I never done this... will be very appreciated.

1- It is possible to do LACP (802.3ad Link Aggregation Control Protocol - http://en.wikipedia.org/wiki/Link_aggregation), in OpenWRT?

You may think why? And the answer is: For the network load to be balanced across more links, and because of bandwidth limitations.
I will need to combine two physical Ethernet links or ports, into one logical link via channel bonding. Of course this solution required manual configuration and identical equipment on both sides of the aggregation, and I mentioned identical I mean that both support 802.3ad.

Regards,
Craig Davids

It would be possible if you have two or more separate phy interface (t.e. NICs, eth0, eth1, etc). For example, if you are running OpenWrt on a x86 machine with several NICs - in this case, it would be the same as on any other linux distro - using ifenslave, miitools, etc.

In the case when you have a wireless router, you typically have only one phy interface - eth0, which is the interface which is used by the kernel and the cpu to address a multiport manageable switch. If the device has a dedicated switch controller, like TP-Link 1043ND (RTL8366rb) eth0 will address the kernel interpretation of your switch controller. In both cases, eth0 typically is combining all phy ethernet ports. The only thing I find applicable is, if we have a patch to the switch controller's driver (ex. RTL8366rb) that makes possible to configure the switch registres and set them in a mode to combine phy ports in link aggregation virtual ports  - like port-channel (etherchannels in Cisco). However, in order to do that, the switch controller should have such capabilities.

I was also interesed in that before (and I am still interested), but since there is no driver support for this feature, I do not think it would be possible if we have just one phy interface.

Maybe somebody else will share some experience too.

Hi,

First thanks for the tips... always learning...

On the RB450G, that is what I have know, it looks like this:

+-----------+        +-----------+
  |              | eth1  |               |
  |              +-------+---------5+-Eth1 (WAN)
  |              |         |               |
  |  AR7161 |         | AR8316   +-4+-Eth3
  |              | eth0  |               +-3+-Eth4
  |              +------+0----------+-2+-Eth5
  |              |         |               +-1+-Eth2
+-----------+        +-----------+

What you mean is that it is only possible to do link aggregation between eth1 and eth0, right?
Between eth2 and eth5 is not possible?

Regards,
Craig Davids

(Last edited by craigdavids on 27 Jan 2012, 16:34)

Hi,

Is there someone with a RouterBoard Mikrotik, or other (that have success on this), that can tell me if it can bond (aggregate) to ethernet links... eth1 and eth0 I already know that is possible, but with eth2 and eth3, like I have in the picture above??

Advises and experiences, even different ones will be very appreciated.

Regards,
Craig Davids

Hi again,

I have not tried this, but would be quite interested to see what the results are. Bonding on its own, I would think would have originated with ethernet. It would work well in the case of using an ethernet card with a WiFi card, or using 2 ethernet cards.

But bonding between 2 different WiFi cards, for example ath0 and ath1 or wl0 to wl1??
I think we would need to make sure that they are on different channels and the signals don't interfere with each other. Is possible to occur physical interference (since physically they are so close on the node)??

Can someone advise me in this matter.

Regards,
Craig Davids

Hello,
You  did not say you are using Mikrotik routerbord (in the first comment) - in this case we have a little different architecture than the common one  with the wireless routers.
Talking about bonding between two separate wireless cards (wifi devices - radios) would be possible - try either the generic linux way - here is a clean and brief explanation: http://www.linuxhorizon.ro/bonding.html
or if using the Mikrotik fimrware something like this http://wiki.mikrotik.com/wiki/Manual:Interface/Bonding

Well, it would me also handy someone else to share some stiff if a driver support for some of the sw controllers found in most of the wireless routers (supported by openwrt) would be released.

Hi,

I'm following this link http://www.linuxhorizon.ro/bonding.html , and I have already install ifenslave and mii-tools and also kmod-bonding, and I'm using backfire 10.03.1 final.

When I do this: modprobe bonding mode=0 miimon=100 - it says "modprobe: not found" why? what I'm missing... can someone help me.

And I think because of this all other commands do not work, like:
ifconfig bond0 192.168.55.55 up    # to set ethX interfaces as slave the bond0 must have an ip.
ifenslave bond0 eth0    # putting the eth0 interface in the slave mod for bond0
ifenslave bond0 eth1   
Also /etc/modprobe.conf do not exist but in /etc/modules.d/40-bonding exists.

All advises will be appreciated.

Regards
Craig Davids

Hi,

Instead of using modprobe I also tried "insmod bonding.ko" , but I think modprobe loads the modules that a module depends on, "insmod" does not.

When I do this: insmod bonding.ko it says:
bonding: Unknown symbol ndisc_build_skb
bonding: Unknown symbol in6_dev_finish_destroy
bonding: Unknown symbol ndisk_sed_skb
bonding: Unknown symbol register_inet6addr_notifier
bonding: Unknown symbol unregister_inet6addr_notifier
insmod: can't insert /lib/modules/2.6.32.25/bonding.ko: unknown symbol in modules, or unknown parameter

I was searching in the forum and seems I not the first to meet this problem, but the different was i DO NOT modified  the linux bonding driver like this post  - https://forum.openwrt.org/viewtopic.php?id=20731 -

I do not understand why this appears.
Please help.

Regards,
Craig Davids

(Last edited by craigdavids on 1 Feb 2012, 18:51)

Hello to all,

@craigdavids: I'm following this post with attention because you are speaking about a thing that is really interesting.
I have also installed packages ifenslave, mii-tools, kmod-bonding and I think this are the modules that we need to make LACP work on Openwrt, and I'm also using backfire 10.03.1 final version.

I have already done this in normal Debian box, without openwrt, and I only need to install the 3 packages (ifenslave, mii-tools, kmod-bonding) and after that I do (IN DEBIAN BOX WHITEOUT OPENWRT INSTALLED):
#modprobe bonding mode=0 miimon=100
#ifconfig bond0 x.x.x.x up 
#ifenslave bond0 eth0
#ifenslave bond0 eth1
And all goes OK.

I have tried this in my backfire 10.03.1 final version, and modprobe do not exist so we really have to use insmod. After install the 3 packages bellow I do:
#insmod /lib/modules/2.6.32.25/bonding.ko and the same message appears:
onding: Unknown symbol ndisc_build_skb
bonding: Unknown symbol in6_dev_finish_destroy
bonding: Unknown symbol ndisk_sed_skb
bonding: Unknown symbol register_inet6addr_notifier
bonding: Unknown symbol unregister_inet6addr_notifier
insmod: can't insert /lib/modules/2.6.32.25/bonding.ko: unknown symbol in modules, or unknown parameter

When I do: #lsmod | grep bonding , the module do not appears loaded.

I'm not understanding if this is a openwrt Backfire problem or what... my linux knowledge are limited and unfortunately Google searches do not give results regarding this problem, and more strange is that in the forum no one ever speak about this...

Help, comments, advises, will be very appreciated.

Thanks in advanced,
Best Regards,
CMarco

You need to load ipv6 as well as it seems.

Hello,

Thanks a lot jow... seems right.

Best Regards,
CMarco

Hello,

A little guide:
So it is important to install 4 packages: ifenslave, mii-tools, kmod-bonding and kmod-ipv6. The Channel Bonding Driver is v3.5.0.
After this do:
#insmod /lib/modules/2.6.32.25/bonding.ko mode=0 miimon=100 - is important to define 'mode' and 'miimon' or this message appears:
"bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details."

#ifconfig bond0 x.x.x.x netmask y.y.y.y up - the IP maybe also 0.0.0.0 if working with VLAN's...
#ifenslave bond0 eth0
#ifenslave bond0 eth1

O course having ipv6 enabled if you are not utilizing may leads to over head in DNS lookups and additional load place on your dns severs, since looks up will go 'AAAA' records (ipv6) first than 'A' records (ipv4). And if you have a domain search list this will add additional latency as well. This is particular important for low latency applications. And because of that the bonding driver in, for example, RHEL 5.3 and prior do not have a dependency on ipv6...

Best Regards,
CMarco

(Last edited by CMarco on 2 Feb 2012, 13:10)

The bonding driver gains a dependency on IPv6 whenever the kernel is built with IPv6 support.
RHEL is probably "immune" to that because it uses an rather old kernel.

Hi,

Thanks very much jow and CMarco for the tips...
I will test this in my wireless router with backfire 10.03.1 final and I will try to bound wired interfaces, and also bonding between two or more separate wireless cards (wifi devices - radios). later I will say something about it...

@dir2cas:"The only thing I find applicable is, if we have a patch to the switch controller's driver (ex. RTL8366rb) that makes possible to configure the switch registres and set them in a mode to combine phy ports in link aggregation virtual ports  - like port-channel (etherchannels in Cisco). However, in order to do that, the switch controller should have such capabilities.
I was also interesed in that before (and I am still interested), but since there is no driver support for this feature, I do not think it would be possible if we have just one phy interface.
Well, it would me also handy someone else to share some stiff if a driver support for some of the sw controllers found in most of the wireless routers (supported by openwrt) would be released." - This will not be forgotten...at least by me.

Regards,
Craig Davids

(Last edited by craigdavids on 2 Feb 2012, 13:42)

jow wrote:

The bonding driver gains a dependency on IPv6 whenever the kernel is built with IPv6 support.
RHEL is probably "immune" to that because it uses an rather old kernel.

Yes, but probably ipv6 support have to be built into the image.
I decided to do an experiment.
Just tried to install it and it is throwing unknown symbol messages in the log.

[root@Core-Sf:~]# opkg install kmod-ipv6                      
Installing kmod-ipv6 (2.6.32.27-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/kmod-ipv6_2.6.32.27-1_ar71xx.ipk.
Configuring kmod-ipv6.
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_inner_extract_output
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __ipv6_addr_type
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_user_policy
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_lookup
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __xfrm_lookup
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __xfrm_decode_session
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_state_check_expire
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __xfrm_policy_check
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __xfrm_state_destroy
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol inet6_lookup
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_policy_unregister_afinfo
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol secure_tcpv6_sequence_number
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol ipv6_skip_exthdr
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol flow_cache_genid
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __secpath_destroy
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol inet6_hash_connect
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __xfrm_route_forward
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_input
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol ipv6_ext_hdr
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __inet6_lookup_established
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol __inet6_hash
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_state_unregister_afinfo
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_dst_ifdown
Feb  3 21:34:11 Core-Sf kernel: rm_bundle_ok
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_state_lookup_byaddr
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol inet6_lookup_listener
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_policy_register_afinfo
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_output
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol xfrm_state_register_afinfo
Feb  3 21:34:11 Core-Sf kernel: ipv6: Unknown symbol secpath_dup

Of course none of the modules could be loaded. Probably there some other stuff that should be installed first or as I said the image should has ipv6 support built in.
Any suggestions?

Hi,

yes, ipv6 support have to be built into the image. If you do not have ipv6 support built in, you do not need to load that module, this 3 modules ifenslave, mii-tools, kmod-bonding are enough.
If you had an IPv6 enabled kernel with IPv6 support enabled by default you load kmod-ipv6. Now, we have an IPv6 enabled kernel, but the interfaces are IPv6 disabled by default.

Regardless of whether IPv6 is by default enabled or disabled, we can enable or disable IPv6 interfaces at runtime by modifying the «disable_ipv6» parameter as follows:
# echo 0 > /proc/sys/net/ipv6/conf/interface/disable_ipv6

Hope this helps,
Regards,
Craig Davids

I am trying to bond two 3g USB modems. Installed the following packages: ifenslave, kmod-bonding, mii-tool, kmod-ipv6 in Attitude Adjustment 12.09-beta2 with kernel 3.3.8 on TP-Link TL-WR1043N/ND. Executing the commands in SSH returns errors. Also, inserting the commands in /etc/rc.local has not worked. I am a newbie and will really appreciate if someone can post a guide on how to aggregate two 3g interfaces. Thank you.

root@OpenWrt:~# route -n
Kernel IP routing table
Destination      Gateway           Genmask                Flags   Metric   Ref    Use  Iface
0.0.0.0             10.0.226.97      0.0.0.0                   UG       10        0        0     3g-wan1
0.0.0.0             10.0.226.100    0.0.0.0                   UG       20        0        0     3g-wan2
10.0.226.97     0.0.0.0              255.255.255.255    UH        0         0        0     3g-wan1
10.0.226.100   0.0.0.0              255.255.255.255    UH        0         0        0     3g-wan2
192.168.3.0     0.0.0.0              255.255.255.0        U          0         0        0     br-lan



/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.3.1'

config switch
        option name 'rtl8366rb'
        option reset '1'
        option enable_vlan '1'
        option enable_vlan4k '1'

config switch_vlan
        option device 'rtl8366rb'
        option vlan '1'
        option ports '2 3 4 5t'

config switch_vlan
        option device 'rtl8366rb'
        option vlan '2'
        option ports '0 5t'

config switch_vlan
        option device 'rtl8366rb'
        option vlan '3'
        option ports '1 5t'

config interface 'wan1'
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'false'
        option proto '3g'
        option device '/dev/ttyUSB0'
        option service 'evdo'
        option username 'vwireless@ptcl.com'
        option password 'ptcl'
        option metric '10'

config interface 'wan2'
        option _orig_ifname 'eth0.3'
        option _orig_bridge 'false'
        option proto '3g'
        option device '/dev/ttyUSB4'
        option service 'evdo'
        option username 'vwireless@ptcl.com'
        option password 'ptcl'
        option metric '20'

(Last edited by owrt on 6 Nov 2012, 00:09)

The discussion might have continued from here.