What's new

Working Link Aggregation Config RT-AC66U

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

KAD

Regular Contributor
Hi all first post, woot :)

I'm no developer, but I thought I'd share
I've got Link Aggregation working :D

Link Aggregation Wiki Page

Please follow the wiki for the most up to date information
The below is for reference only, is now largely outdated

To use Link Aggregation on RT-AC66U you'll need the following.
1.asuswrt-merlin installed
2.JFFS enabled
3.entware installed
-- entware package ifenslave installed
4.Step 4 is now outdated. starting with firmware version Asuswrt-Merlin 3.0.0.4.374.33 Beta 3 bonding.ko is included in firmware
Script below has been edited to use bonding.ko included in the firmware

old bonding.ko for those who need it http://www.mediafire.com/download/y36nzbntfbk8c25/bonding.ko
(compiled from source at Merlin's Git Repo)

5.set up your services-start script as follows
Note - below example uses port 3 & 4 of switch using 802.3ad (LACP)
LACP will require either a switch or PC that can be configured for LACP
other bonding modes should be possible

Code:
# Remove ports 3 and 4 from VLAN 1
et robowr 0x05 0x81 0x01
et robowr 0x05 0x83 0x0D06
et robowr 0x05 0x80 0x0000
et robowr 0x05 0x80 0x0080
# Create VLAN 3 with port 3 untagged and port 8 tagged
et robowr 0x05 0x81 0x03
et robowr 0x05 0x83 0x1108
et robowr 0x05 0x80 0x0000
et robowr 0x05 0x80 0x0080
# Set port 3's default VLAN to 3
et robowr 0x34 0x16 0x03
# Create VLAN 4 with port 4 untagged and port 8 tagged
et robowr 0x05 0x81 0x04
et robowr 0x05 0x83 0x2110
et robowr 0x05 0x80 0x0000
et robowr 0x05 0x80 0x0080
# Set port 4's default VLAN to 4
et robowr 0x34 0x18 0x04
# Create the interfaces
vconfig add eth0 3
vconfig add eth0 4
# Bring up vlans
ifconfig vlan3 up
ifconfig vlan4 up
# Insert bonding module and set parameters
insmod /lib/modules/2.6.22.19/kernel/drivers/net/bonding/bonding.ko mode=4 miimon=100 lacp_rate=1
# Bring up bond0
ifconfig bond0 up
# enslave vlans to bond0
ifenslave bond0 vlan3 vlan4
# Bridge the bond0 allowing AP access
brctl addif br0 bond0
# We allow these VLANs to access the AP
iptables -I INPUT 1 -i vlan3 -j ACCEPT
iptables -I INPUT 1 -i vlan4 -j ACCEPT
iptables -I INPUT 1 -i bond0 -j ACCEPT
6. To check the status of the bond
log into telnet/ssh
Code:
cat /proc/net/bonding/bond0
credits to RMerlin for the great firmware and to those, who posted before me
particularly these 2 post were very useful
http://forums.smallnetbuilder.com/showthread.php?p=54237
http://forums.smallnetbuilder.com/showthread.php?t=12281

KAD
 
Last edited:
should this be possible
I have an netgear GS105E switch behind my modem and before my router.
This is due my digicorder needs a wan IP and my previous router wasn't able to do this if I didn't disable DHCP.

modem -> switch -> router > tv,pc,etc
###### -> digicorder

Could I enable Link Aggregation on the Wan between switch and router?
So I split wan connection to router in two, would this be possible and better?
 
@bmn1

No this is not the same as Dual Wan

this has nothing to do with Wan

this is LAN Switch control/Management

use 2 LAN ethernet ports as if they were one
achieves higher bandwidth availability
and failover protection
 
@krabs

unfortunately, a quick look at netgear website
shows that netgear GS105E does not support LACP (mode 4)
but it might be possible to use a different bonding mode
http://www.linuxhorizon.ro/bonding.html
take a read and see of one of the bonding modes would acheive what you want to do


besides that if I understand you correctly, basically you want to do exactly what I did

modem -> Router --LACP,2 ether net cables Here --> Switch

I'm using an HP 1910-8G

edit: closer read,
not sure what you want is possible
might be, but it would be a bit more complex to set up
and your switch doesn't support LACP, so not sure what other bonding modes it would accept
 
Last edited:
It's great, KAD! I've added ifenslave just for a small chance it might be interesting to someone. Thank you for ifenslave usage example.

Eric, looks like bonding.ko is working. Is it time to add it to kernel konfig? And, BTW, we still don't have a separate archive with modules for asuswrt-merlin.
 
Last edited:
If you can give me the required kernel option, I could ensure that the bonding module gets included in the firmware.
 
@RMerlin

yeah, once home, I'll give you the exact options I used

in target.mak & in the makefile
 
I think you're right

in target.mak
I added BONDING=y

but then CONFIG_BONDING & BONDING, has to be used in an if statement of the make file,
I'll check once home, so that there's no guessing
 
But I can't get if there's any benefit of using this. Suppose, you have a NAS with 2 NICs. Each of them is 1GBit. So, if you connect these 2 NICs to your router, you can get 2 GBit bandwidth between your NAS and router. So, your porn can reach your router 2 times faster. Ok, but where will it go from the router? To your PC? Your PC uses only 1 ethernet cable to the router, so the router cannot transmit the data to your PC faster than 1 GBit/sec. What's a big deal if the router is able to get that data with 2 GBit speed but cannot get rid of it faster than 1 GBit?
 
the biggest usefullness of this is multi-users accessing the same NAS or Server

for example think of a 1 lane highway
your data travels on this highway, just like a car driving down the road

but the biggest difference

a second car on the highway, is not allows to start driving until the first car reaches the destination

this is especially true with TCP connections, were its required that confirmation of successfull receiving the packet is required before any new packets are sent

enter LACP or Bonding, windows calls it NIC Teaming
you now have a 2 lane highway, where 2 vehicles can travel at the same time


aka there's no bottle neck when you have multiple users accessing the NAS/Server

as an additional benefit, for any connections that have that much bandwidth the whole way
you see big speed increases

this is how business cheaply, increase there server bandwidth, without reinvesting in 10G hard ware
 
Last edited:
but where will it go from the router? To your PC? Your PC uses only 1 ethernet cable to the router, so the router cannot transmit the data to your PC faster than 1 GBit/sec.

it would require some more configure work and an bond alias file
but you could actually run 2 different bonds
1 bond with 2 ports going to NAS
1 bond with 2 ports going to PC

but this would use all available ports
which, if you don't have any other equipment, I guess that would be ok
 
I'll just enable CONFIG_BONDING in the kernel's config_base, and make sure that the Router makefile copies it to the image target.
 
I'm sure you've already figured this out

but
../asuswrt-merlin/release/src-rt-6.x/target.mak
add BONDING=y
then
../asuswrt-merlin/release/src-rt-6.x/Makefile
under the section define extraKernelConfig
add this at lines 924 - 927
if [ "$(BONDING)" = "y" ]; then \
sed -i "/CONFIG_BONDING/d" $(1); \
echo "CONFIG_BONDING=m" >>$(1); \
fi; \


now just run make clean , then make rt-ac66u
bonding.ko will be located at ../asuswrt-merlin/release/src-rt-6.x/linux/linux-2.6/drivers/net/bonding/bonding.ko

to include in firmware, you can of coarse change the "m" to "y"
 
I'm sure you've already figured this out

but
../asuswrt-merlin/release/src-rt-6.x/target.mak
add BONDING=y
then
../asuswrt-merlin/release/src-rt-6.x/Makefile
under the section define extraKernelConfig
add this at lines 924 - 927
if [ "$(BONDING)" = "y" ]; then \
sed -i "/CONFIG_BONDING/d" $(1); \
echo "CONFIG_BONDING=m" >>$(1); \
fi; \


now just run make clean , then make rt-ac66u
bonding.ko will be located at ../asuswrt-merlin/release/src-rt-6.x/linux/linux-2.6/drivers/net/bonding/bonding.ko

to include in firmware, you can of coarse change the "m" to "y"

Too complicated :)

https://github.com/RMerl/asuswrt-merlin/commit/650525669c3893ca63e20636f5326f10743c35e1

I see no reason not to include it by default in all router models that I support.
 
the biggest usefullness of this is multi-users accessing the same NAS or Server
<snip snip snip>

I would be very interested in hearing your file txfr speeds on your LAN w/ & w/o the link aggregation, if you get a chance and it's convenient.

Thank you for sharing this interesting update (& thanks Merlin for working to try to integrate it!).

Thx guys
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top