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!

Hi,
I just got a Synology 713+ and I'm intrested too on try this feature, having some spare time during the holidays ;)
 
Hi,
please could you provide the steps to get DS412+ working with linkagg provided by Kad?
Thanks

Ok, step by step
1)Configure SSH access to asus router (administration page if I remember well)
2)login to router using e.g. putty and create some place for your script.
Temporarilly i prefer to do:

ssh admin@IP_ASUS
cd /tmp
mkdir lacp

2)use winscp/scp/whatever to copy LinkAgg to your router
scp /yourDirectory/LinkAgg admin@IP_ASUS:/tmp/lacp/LinkAgg
If you use Windows, use WinSCP, it is simple and you don't have to run any commands like this above
3)again login to router using SSH and make it executable
chmod u+x /tmp/lacp/LinkAgg
4)connect Ethernet cables
5)on Synology create bond ("Network")
it will say that is unsuccesfull
4)create bond using ssh on router
LinkAgg 3 4

It schould work, as I said, I had to remove bond and then "it works"... (probably it doesnt really, but I had no time to test)

P.S. News maybe more useful for Synology users than asus, but if LACP is enabled, then hibernation does not work:(
 
Last edited:
Bonding with 802.3ad and dd-wrt

Hello KAD

Firstly, I would like to say thank you, and good job with your LinkAgg script. Secondly apologize for posting about dd-wrt in the AsusWRT-Merlin section of the SmallNetBuilder forum.

I have been following this thread, and decided to give 802.3ad bonding a try with my Asus RT-AC66U but with current builds of dd-wrt instead of AsusWRT Merlin. I'm so close to getting the bond working, but not close enough. Can you please take a look at my settings, status of bond0, ifconfig and provide your feedback or any thoughts you might have?

Personally I think its has to do with the ifenslave version i'm using, and the fact that dd-wrt uses the new 3.x linux kernel. (I have a ticket request already submitted at svn.dd-wrt.com for an update.)

Anyways thanks in advanced, I look forward to your expertise on the matter.

Gratitude,

Robert aka Mrengles ;)

Step 1.
I update and install ifenslave with ipkg.


Code:
ipkg update
ipkg -force-depends install http://downloads.openwrt.org/snapshots/trunk/brcm47xx/packages/ifenslave_3.10.24-1_brcm47xx.ipk

Step 2.
Create the vlans at ssh/telnet command line.


Code:
nvram set vlan1ports="1 2 8*"
nvram set vlan2ports="0 8u"
nvram set vlan3ports="3 8t"
nvram set vlan4ports="4 8t"
nvram set port5vlans="1 2 3 4 16"
nvram set port0vlans="2"
nvram set port1vlans="1"
nvram set port2vlans="1"
nvram set port3vlans="3"
nvram set port4vlans="4"
nvram set vlan1hwname=et0
nvram set vlan2hwname=et0
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0

Step 3.
Create salves and bond0 by adding this to dd-wrt startup script.


Code:
ifconfig vlan1 up
ifconfig vlan2 up
ifconfig vlan3 up
ifconfig vlan4 up
insmod bonding.ko mode=802.3ad miimon=100 lacp_rate=fast
ifconfig bond0 up
ifenslave bond0 vlan3 vlan4
brctl addif br0 bond0

Step 4.
Allow new vlans and bond0 access to router with iptables startup script.


Code:
iptables -I INPUT 1 -i bond0 -j ACCEPT
iptables -I INPUT 1 -i vlan3 -j ACCEPT
iptables -I INPUT 1 -i vlan4 -j ACCEPT

Step 5.
Commit nvram reboot the RT-AC66U so all the new changes take effect.


Code:
nvram commit
reboot

Once the router comes backup, all the vlans, salves, and bond0 seem to be working from looking at the logs, but neither my 802.3ad compatible switch, or Mac Pro with dual ethernet will see the bond. Any ideas? Am I doing something wrong?

Below you will find the output of bond0 and ifconfig.

Code:
[COLOR="Purple"]root@Gateway:~# ifconfig[/COLOR]
bond0 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
TX packets:922 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:0 (0.0 B) TX bytes:95705 (93.4 KiB) 

br0 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:10088 errors:0 dropped:49 overruns:0 frame:0 
TX packets:9615 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:778302 (760.0 KiB) TX bytes:3974103 (3.7 MiB) 

br0:0 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 

eth0 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:5298 errors:0 dropped:0 overruns:0 frame:0 
TX packets:3530 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000 
RX bytes:1041916 (1017.4 KiB) TX bytes:451642 (441.0 KiB) 
Interrupt:4 Base address:0x2000 

eth1 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:10001 errors:0 dropped:0 overruns:0 frame:434 
TX packets:10354 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000 
RX bytes:902551 (881.3 KiB) TX bytes:4119204 (3.9 MiB) 
Interrupt:3 Base address:0x8000 

eth2 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B4 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 
Interrupt:5 Base address:0x8000 

imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
UP RUNNING NOARP MTU:1500 Metric:1 
RX packets:1304 errors:0 dropped:0 overruns:0 frame:0 
TX packets:1304 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:30 
RX bytes:704282 (687.7 KiB) TX bytes:704282 (687.7 KiB) 

lo Link encap:Local Loopback 
inet addr:127.0.0.1 Mask:255.0.0.0 
UP LOOPBACK RUNNING MULTICAST MTU:65536 Metric:1 
RX packets:2 errors:0 dropped:0 overruns:0 frame:0 
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:360 (360.0 B) TX bytes:360 (360.0 B) 

vlan1 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
TX packets:875 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:0 (0.0 B) TX bytes:89461 (87.3 KiB) 

vlan2 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B1 
inet addr:66.176.xxx.xxx Bcast:66.176.xxx.xxx Mask:255.255.254.0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:5298 errors:0 dropped:0 overruns:0 frame:0 
TX packets:1733 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000 
RX bytes:925360 (903.6 KiB) TX bytes:252356 (246.4 KiB) 

vlan3 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
TX packets:896 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:0 (0.0 B) TX bytes:92481 (90.3 KiB) 

vlan4 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B0 
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:0 
RX bytes:0 (0.0 B) TX bytes:3224 (3.1 KiB) 

wl0.1 Link encap:Ethernet HWaddr 74:D0:1A:2B:3C:B3 
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 
RX packets:0 errors:0 dropped:0 overruns:0 frame:434 
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0 
collisions:0 txqueuelen:1000 
RX bytes:0 (0.0 B) TX bytes:29435 (28.7 KiB)

Code:
[COLOR="Purple"]root@Gateway:~# cat /proc/net/bonding/bond0[/COLOR]
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) 

Bonding Mode: IEEE 802.3ad Dynamic link aggregation 
Transmit Hash Policy: layer2 (0) 
MII Status: up 
MII Polling Interval (ms): 100 
Up Delay (ms): 0 
Down Delay (ms): 0 

802.3ad info 
LACP rate: fast 
Min links: 0 
Aggregator selection policy (ad_select): stable 
Active Aggregator Info: 
Aggregator ID: 1 
Number of ports: 1 
Actor Key: 5 
Partner Key: 1 
Partner Mac Address: 00:00:00:00:00:00 

Slave Interface: vlan3 
MII Status: up 
[COLOR="DarkOliveGreen"]Speed: 10 Mbps [/COLOR]
Duplex: full 
Link Failure Count: 0 
Permanent HW addr: 74:D0:1A:2B:3C:B0 
Aggregator ID: 1 
Slave queue ID: 0 

Slave Interface: vlan4 
MII Status: up 
[COLOR="DarkOliveGreen"]Speed: 10 Mbps [/COLOR]
Duplex: full 
Link Failure Count: 0 
Permanent HW addr: 74:D0:1A:2B:3C:B0 
Aggregator ID: 2 
Slave queue ID: 0

Did you notice the speed of the slave interfaces being 10 Mbps? From the looks of it, you guys with AsusWRT Merlin installed the output doesn't even show this particular information. I assume its should be 1 Gbps or 1000 Mbps, but that might not even be my problem.... It just looked wrong to me.

Anyways... Thanks for looking at, and reading this super long! I eagerly await your comments. :)

Again,

Robert (Mrengles)

PS. I have changes the MAC address a tad for obvious security reasons.
 
Last edited:
yeah, newer driver different version of ifenslave could explain the extra entries you have in cat /proc/net/bonding/bond0

speed only listed as 10Mbps - could be an error in mii-tools or ethtool
bonding driver requires at least one of those 2 (mii-tools or ethtool) to be compiled in the kernel for retrieving linkspeed, duplex settings, etc ...

also Number of ports: 1

you need at least 2 ports, which you actually have, but for some reason the driver is only recognizing 1 slave

some other thoughts
output from one of the synology users early in this thread also only showed 1 port, so it could be some sort of incompatibility similiar to the synology users here

also nvram set, commit etc
I'm not sure what order nvram will set everything up
some of these cmds need to be done in a specific order for them to work correctly, you might try to run everything manually first to see if it works, if it does, then you just need to work out timings

also you can try using the sysfs driver instead of ifenslave, to see if you have any success there

this post discusses/shows set up using sysfs driver
http://forums.smallnetbuilder.com/showpost.php?p=84969&postcount=25
LinkAgg script also uses sysfs driver, so those are a few places to look for examples

of coarse to check the sysfs driver directly
look at those echo cmd's and just cat the same file

even with ifenslave it might be worth checking the sysfs driver and compare those results to output of cat /proc/net/bonding/bond0
if there's some difference in the output, it might lead to the actual problem
 
yeah, newer driver different version of ifenslave could explain the extra entries you have in cat /proc/net/bonding/bond0

speed only listed as 10Mbps - could be an error in mii-tools or ethtool
bonding driver requires at least one of those 2 (mii-tools or ethtool) to be compiled in the kernel for retrieving linkspeed, duplex settings, etc ...

also Number of ports: 1

you need at least 2 ports, which you actually have, but for some reason the driver is only recognizing 1 slave

some other thoughts
output from one of the synology users early in this thread also only showed 1 port, so it could be some sort of incompatibility similiar to the synology users here

also nvram set, commit etc
I'm not sure what order nvram will set everything up
some of these cmds need to be done in a specific order for them to work correctly, you might try to run everything manually first to see if it works, if it does, then you just need to work out timings

also you can try using the sysfs driver instead of ifenslave, to see if you have any success there

this post discusses/shows set up using sysfs driver
http://forums.smallnetbuilder.com/showpost.php?p=84969&postcount=25
LinkAgg script also uses sysfs driver, so those are a few places to look for examples

of coarse to check the sysfs driver directly
look at those echo cmd's and just cat the same file

even with ifenslave it might be worth checking the sysfs driver and compare those results to output of cat /proc/net/bonding/bond0
if there's some difference in the output, it might lead to the actual problem

Thanks KAD your a super hero!

I'll get working on this tomorrow, tonight I have a New Years Party to attend. Be safe, have fun, and Thanks again!

I'll let you know if I have any success.

Gratitude,

Robert (Mrengles)
 
just another something I noticed


slave 1
Aggregator ID: 1

slave 2
Aggregator ID: 2

they should be the same
ie 2 slaves aggregated into the same bond
this shows the bonding driver thinks slave 2 is part of a different bond
 
as an unexpected bonus
on my desktop, internet pages open so fast, it's like opening a cached page
and while I only pay for 25MB cable connection
my download speeds have increased to about 35 MB


Quick question.

My Modem technicolor tc8305c from Comcast has built in x4 1Gbps lan ports. If i bond my AC68U router to my modem, do you think i too will get some bandwidth increase? Is it even worth doing it?

Thanks.
 
Last edited:
KAD

My settings now looks like this with your recommended changes:

Setup vlans with ssh/telnet command prompt.
Code:
nvram set vlan1ports="1 2 8*"
nvram set vlan2ports="0 8u"
nvram set vlan3ports="3 8t"
nvram set vlan4ports="4 8t"
nvram set port5vlans="1 2 3 4 16"
nvram set port0vlans="2"
nvram set port1vlans="1"
nvram set port2vlans="1"
nvram set port3vlans="3"
nvram set port4vlans="4"
nvram set vlan1hwname=et0
nvram set vlan2hwname=et0
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0

Enable vlans, slaves, bond0 and bridge by adding to dd-wrt startup script.
Code:
ifconfig vlan1 up
ifconfig vlan2 up
ifconfig vlan3 up
ifconfig vlan4 up
insmod bonding
echo 802.3ad > /sys/class/net/bond0/bonding/mode
echo fast > /sys/class/net/bond0/bonding/lacp_rate
ifconfig bond0 up
echo 100 > /sys/class/net/bond0/bonding/miimon
echo +vlan3 > /sys/class/net/bond0/bonding/slaves
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
brctl addif br0 bond0

Allow interfaces below access to gateway by adding to dd-wrt firewall script.
Code:
iptables -I INPUT 1 -i bond0 -j ACCEPT
iptables -I INPUT 1 -i vlan3 -j ACCEPT
iptables -I INPUT 1 -i vlan4 -j ACCEPT

Should the slaves being added to /sys/class/net/bond0/bonding/ have the "+" sign like above or below?

Code:
echo vlan3 > /sys/class/net/bond0/bonding/slaves
echo vlan4 > /sys/class/net/bond0/bonding/slaves

Regardless of how I add the salves with or without the "+" sign... Have the same results with cat /proc/net/bonding/bond0 "bond bond0 has no active aggregator".

Code:
==========================================================
 
 ____  ___    __        ______ _____         ____  _  _ 
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || | 
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_ 
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _| 
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_| 
 
                       DD-WRT v24-sp2
                   http://www.dd-wrt.com
 
==========================================================


BusyBox v1.21.1 (2013-12-24 10:25:03 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@Gateway:~# [COLOR="Red"]ifconfig[/COLOR]
bond0     Link encap:Ethernet  HWaddr 06:FA:08:F7:DB:5B  
          UP BROADCAST MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br0       Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:421 errors:0 dropped:22 overruns:0 frame:0
          TX packets:290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:52936 (51.6 KiB)  TX bytes:52995 (51.7 KiB)

br0:0     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:562 errors:0 dropped:0 overruns:0 frame:0
          TX packets:407 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:109728 (107.1 KiB)  TX bytes:81623 (79.7 KiB)
          Interrupt:4 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B2  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:294 errors:0 dropped:0 overruns:0 frame:91
          TX packets:355 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:43896 (42.8 KiB)  TX bytes:65126 (63.5 KiB)
          Interrupt:3 Base address:0x8000 

eth2      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B4  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5 Base address:0x8000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1288 (1.2 KiB)  TX bytes:1288 (1.2 KiB)

vlan1     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:114 errors:0 dropped:0 overruns:0 frame:0
          TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:10085 (9.8 KiB)  TX bytes:52189 (50.9 KiB)

vlan2     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B1  
          inet addr:66.176.192.155  Bcast:66.176.193.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:228 errors:0 dropped:0 overruns:0 frame:0
          TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22371 (21.8 KiB)  TX bytes:27806 (27.1 KiB)

vlan3     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:121 errors:0 dropped:23 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:33609 (32.8 KiB)  TX bytes:0 (0.0 B)

vlan4     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:99 errors:0 dropped:23 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:31299 (30.5 KiB)  TX bytes:0 (0.0 B)

root@Gateway:~# [COLOR="Red"]cat /proc/net/bonding/bond0[/COLOR]
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
bond bond0 has no active aggregator

root@Gateway:~# [COLOR="Red"]cat /sys/class/net/bond0/bonding/slaves[/COLOR]
root@Gateway:~# [COLOR="Red"]cat /sys/class/net/bond0/bonding/mode[/COLOR]
802.3ad 4
root@Gateway:~# [COLOR="Red"]cat /sys/class/net/bond0/bonding/lacp_rate[/COLOR]
fast 1
root@Gateway:~# [COLOR="Red"]cat /sys/class/net/bond0/bonding/miimon[/COLOR]
100

After thought... Maybe I should try adding the salves and miimon with echo before I bring up the bond like below?

Code:
ifconfig vlan1 up
ifconfig vlan2 up
ifconfig vlan3 up
ifconfig vlan4 up
insmod bonding
echo 802.3ad > /sys/class/net/bond0/bonding/mode
echo fast > /sys/class/net/bond0/bonding/lacp_rate
echo 100 > /sys/class/net/bond0/bonding/miimon
echo +vlan3 > /sys/class/net/bond0/bonding/slaves
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
ifconfig bond0 up
brctl addif br0 bond0

Thanks again for your help KAD!

Are there any commands I can run from the shell to see if dd-wrt's kernel is compiled with mmi-tool or ethtool?

Gratitude,

Robert (Mrengles)
 
Last edited:
Quick question.

My Modem technicolor tc8305c from Comcast has built in x4 1Gbps lan ports. If i bond my AC68U router to my modem, do you think i too will get some bandwidth increase? Is it even worth doing it?

Thanks.

yes and no

would that help with throughput, possibly

however I doubt that the router supports this

you could use a different bonding mode, which does not require specific support on both end of the link

but the LinkAgg script only supports 802.3ad

so for other bonding modes your on your own for figuring out set up and configuration
 
@Mrengles

I'd be surprised if mii-tools and ethtool are not compiled as part of dd-wrt
and actually from your first post of code

you'll notice you had mii status: up
so it is compliled in there, my point earlier there could be some bug in that newer version, which would explain the 10Mbs reporting

with the new error about no active agregator - that's what it shows when there are no slaves

I'd try to add the slaves again
Code:
echo +vlan3 > /sys/class/net/bond0/bonding/slaves
echo +vlan4 > /sys/class/net/bond0/bonding/slaves

and yes use the + sign in those cmds

you could if you like try

Code:
ifconfig bond0 down
echo +vlan3 > /sys/class/net/bond0/bonding/slaves
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
ifconfig bond0 up
 
Last edited:
KAD

Hope you enjoyed your New Years. I finally recovered from the night of partying and figured to give bonding on the RT-AC66U another go ahead.

For whatever reason. I can't get vlan3 and vlan4 to add to the interface bond0 when using the echo method.

I'v tried both before and after the interface in "UP" or "Down" results are the same.
Code:
sh: Write Error. Permissions Denied.

If I change the order for adding the bond settings and add the vlans first, they are add without issues, but then I can't set the mode=802.3ad or the lacp_rate=fast.

I get the same error
Code:
sh: Write Error. Permissions Denied.

If I load the bonding.ko with settings inline for example:
Code:
insmod bonding.ko mode=802.3ad lacp_rate=fast miimon=100

ifenslave will allow me to add vlan3 and vlan4 to bond0 but shows the aggregator being 1 and 2 like you mentioned above in another post.

I can easily switch over to Merlin and get LACP working ASAP, but that would take all the fun out of making it work with dd-wrt.

:)

-Mrengles
 
Last edited:
yeah, I've seen that error before in testing a while back

it indeed has to do with the order of all those cmd's and what interfaces, are up,down, created, etc ...

anyways, it sounds like you're having better luck with ifenslave
but I dont know why the bonding driver thinks that slave 2 is part of a different bond

when bond0 is up and active with 2 slaves
and you see the one with the wrong aggregotor ID

what does cat /sys/class/net/bond0/bonding/slaves
show
 
yeah, I've seen that error before in testing a while back

it indeed has to do with the order of all those cmd's and what interfaces, are up,down, created, etc ...

anyways, it sounds like you're having better luck with ifenslave
but I dont know why the bonding driver thinks that slave 2 is part of a different bond

when bond0 is up and active with 2 slaves
and you see the one with the wrong aggregotor ID

what does cat /sys/class/net/bond0/bonding/slaves
show

# cat /sys/class/net/bond0/bonding/slaves
vlan3 vlan4

I'm not home right not so I really can't make any changes to the router without loosing my connection, however I want to see if bringing up the bonding driver enables "up" vlan3 and vlan4.

maybe I should try to bring up vlan3 and vlan4 after they are enslaved to bond0?

what about manually editing /sys/class/net/bond0/bonding/slaves with nano, pico or vi?

what exactly does the file /sys/class/net/bond0/bonding/slaves contain?

Code:
+vlan3+vlan4

I could try
Code:
echo "+valn3+vlan4" > /sys/class/net/bond0/bonding/slaves
maybe that would make a difference, who knows...
 
Last edited:
nothing unusual in that

you shouldn't need to bring up vlans
because when you bring up bond0 the bonding driver will bring up all slaves as well

you can confirm with ifconfig or ip link show

edit:
looks like you did an edit above
I'll have to check, I think I remember there being a space between them in my set up
but I'm also not at home, and can't check it till tonight
 
looks like you did an edit above
I'll have to check, I think I remember there being a space between them in my set up
but I'm also not at home, and can't check it till tonight

Yes, made a few quick edits.

I keep reading online, that others getting write errors when adding slaves, have another bond config somewhere already active in the system, like with redhat, gentoo and other distros.. I've looked all over /etc and can't find any other files containing default bond settings.

I'm pretty sure dd-wrt doesn't have default bond settings anyways.
 
Last edited:
... you shouldn't need to bring up vlans... because when you bring up bond0 the bonding driver will bring up all slaves as well.

Maybe thats my problem :confused: Once I get home i'll give it another look. I can't remember off the top-of-my-head if I tried this or not.

In part of my makeshift script the first two commands "UP" vlan3 & 4.
 
@KAD

I've got some good and bad new. Lets start with the good news first, I'm now able to echo > vlan3 & vlan4 into bond0. its was the fact that I have been bringing "up" the vlans priors to launching the bonding module. The below scripts gets everything setup and in place.


# Step 1
#----------
# Setup vlans with ssh/telnet command prompt.

Code:
nvram set vlan2ports="0 8u"
nvram set vlan1ports="1 2 8*"
nvram set vlan3ports="3 8t"
nvram set vlan4ports="4 8t"
nvram set port5vlans="1 2 3 4 16"
nvram set port3vlans="3"
nvram set port1vlans="1"
nvram set port4vlans="4"
nvram set port2vlans="1"
nvram set port0vlans="2"
nvram set vlan2hwname=et0
nvram set vlan1hwname=et0
nvram set vlan3hwname=et0
nvram set vlan4hwname=et0
nvram commit


# Step 2
#----------
# Enable vlans, slaves, bond0 and bridge by adding to dd-wrt startup script.

Code:
insmod /lib/modules/3.10.25/kernel/drivers/net/bonding/bonding.ko
echo 802.3ad > /sys/class/net/bond0/bonding/mode
echo fast > /sys/class/net/bond0/bonding/lacp_rate
ifconfig bond0 up
echo +vlan3 > /sys/class/net/bond0/bonding/slaves
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
echo 100 > /sys/class/net/bond0/bonding/miimon
brctl addif br0 bond0


# Step 3
#----------
# Allow interfaces below access to gateway by adding to dd-wrt firewall script.

Code:
iptables -I INPUT 1 -i bond0 -j ACCEPT
iptables -I INPUT 1 -i vlan3 -j ACCEPT
iptables -I INPUT 1 -i vlan4 -j ACCEPT


# Step 4
#----------
# Save new nvram settings at ssh/telnet command prompt.

Code:
nvram commit
reboot

The bad new, I still see two separate aggregators in the bond, just like when I was using ifenslave.

Code:
==========================================================
 ____  ___    __        ______ _____         ____  _  _ 
 | _ \| _ \   \ \      / /  _ \_   _| __   _|___ \| || | 
 || | || ||____\ \ /\ / /| |_) || |   \ \ / / __) | || |_ 
 ||_| ||_||_____\ V  V / |  _ < | |    \ V / / __/|__   _| 
 |___/|___/      \_/\_/  |_| \_\|_|     \_/ |_____|  |_| 
 
                       DD-WRT v24-sp2
                   http://www.dd-wrt.com
==========================================================


BusyBox v1.21.1 (2013-12-24 10:25:03 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@Gateway:~# ifconfig
bond0     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:509 errors:0 dropped:254 overruns:0 frame:0
          TX packets:1617 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:163077 (159.2 KiB)  TX bytes:171118 (167.1 KiB)

br0       Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6388 errors:0 dropped:134 overruns:0 frame:0
          TX packets:5398 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:859549 (839.4 KiB)  TX bytes:2819356 (2.6 MiB)

br0:0     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15819 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3344481 (3.1 MiB)  TX bytes:1120996 (1.0 MiB)
          Interrupt:4 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B2  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5451 errors:0 dropped:0 overruns:0 frame:3104
          TX packets:6516 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:811909 (792.8 KiB)  TX bytes:3020736 (2.8 MiB)
          Interrupt:3 Base address:0x8000 

eth2      Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B4  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:1
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5 Base address:0x8000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:65536  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:822 (822.0 B)  TX bytes:822 (822.0 B)

vlan1     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1466 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1246 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:97239 (94.9 KiB)  TX bytes:254356 (248.3 KiB)

vlan2     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B1  
          inet addr:66.176.192.5  Bcast:66.176.193.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13843 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4246 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2736101 (2.6 MiB)  TX bytes:667086 (651.4 KiB)

vlan3     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:240 errors:0 dropped:29 overruns:0 frame:0
          TX packets:1567 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:78147 (76.3 KiB)  TX bytes:164918 (161.0 KiB)

vlan4     Link encap:Ethernet  HWaddr 74:D0:2B:85:44:B0  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:269 errors:0 dropped:225 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:84930 (82.9 KiB)  TX bytes:6200 (6.0 KiB)

root@Gateway:~# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
	Aggregator ID: 1
	Number of ports: 1
	Actor Key: 5
	Partner Key: 1
	Partner Mac Address: 00:00:00:00:00:00

Slave Interface: vlan3
MII Status: up
Speed: 10 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 74:d0:2b:85:44:b0
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: vlan4
MII Status: up
Speed: 10 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 74:d0:2b:85:44:b0
Aggregator ID: 2
Slave queue ID: 0

root@Gateway:~# cat /sys/class/net/bond0/bonding/slaves
vlan3 vlan4
root@Gateway:~# cat /sys/class/net/bond0/bonding/mode
802.3ad 4
root@Gateway:~# cat /sys/class/net/bond0/bonding/lacp_rate
fast 1
root@Gateway:~# cat /sys/class/net/bond0/bonding/miimon
100

I'm now back to where I started, but without the need for ipkg and can eliminate that ifenslave is the cause of my LACP problem.

-Mrengles

PS. I originally setup entering all of the commands manually, with the same results as with ddwrt's web GUI firewall and startup scripts to automate the process.
 
Last edited:
well all the most recent output looks good

except of corse
Speed: 10 Mbps
Aggregator ID: 1 vs Aggregator ID: 2

I'm still not home yet, but some googling I found a few things

1. Aggregator ID can for forced to different ID numbers if the switch on the other end is not configured correctly
specifically switch should be set to LACP active-active
if it's active-passive, that could cause the problem
my HP gives the options Active or Passive
Passive would be incorrect

2. an error in the bonding driver itself
http://lkml.indiana.edu/hypermail/linux/kernel/0712.3/0115.html

but that discusses a very old version of the bonding driver, the DD-WRT is much newer, and I would have hoped that bug was fixed, long ago
 
Not that it helps much now, but ifenslave is pretty much depreciated. Because DD-WRT provides a newer userland, I would guess you can use the ip link command instead of sysfs (a little easier to remember/type IMO) to set slaves.

Code:
ip link set vlan1 master bond0
ip link set vlan2 master bond0

Asus' copy of iproute2/kernel is too old to support this syntax, unfortunately.
 
Last edited:
it's good to know there's alternate methods

and it certainly can't hurt to try

but from his post above
Code:
root@Gateway:~# cat /sys/class/net/bond0/bonding/slaves
vlan3 vlan4

so both vlan's are already slaves to bond0
but still show different aggregator ID regardless of this
 

Similar threads

Latest 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