Link Aggregation on RT-N66U with Version 1.28 by shibby

Discussion in 'Tomato Firmware' started by jbesclapez, May 10, 2013.

  1. jbesclapez

    jbesclapez Networkin' Nut Member

    Hi there,
    Nice update on your website: it looks new now :)
    I have a question :
    I have a NAS with 2 network cards and i wanted to know if i can aggregated them on my routeur T-N66U with Version 1.28 by shibby.
    I am new to that and never did it before so if you have any info on how to do it, please answer.
  2. jbesclapez

    jbesclapez Networkin' Nut Member

  3. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    I would take the lack of response as a "no" if I were you.
  4. Monk E. Boy

    Monk E. Boy Network Guru Member

    First question is what make/model is the NAS, and second question is are you absolutely positive the NAS supports link aggregation? Both sides must support aggregation, if only one does it's not going to work.

    While I've setup aggregated links on switches and routers before, I've never done it in Tomato so I'm not sure if it's even possible - but it's definitely not possible if the client device lacks support.
  5. pharma

    pharma Network Guru Member

    Most likely possible (but depending on hardware) ... my Asus P9X79 Deluxe MB has Dual Lan Gigabyte controllers (Intel 82579V and Realtek PCIe GBE) onboard which I have setup as a "Static Aggregation Link" with my RT-N66U using Toastman's latest firmware. The Intel driver software will give you the opportunity to "Team" multiple adapters for increased throughput or fault tolerance, depending on your needs and is very easy to setup.

    Below are the different types of "Teams" I can chose:

  6. Monk E. Boy

    Monk E. Boy Network Guru Member

    It may display a 2Gb connection, but without some configuration on the other side of the link (router side) I doubt you'll see >1Gb of throughput.

    You would likely need to configure the bonding driver, and I'd be a little surprised if the required kernel support is in busybox (but it'd be great if it was):

    But I've never played with link aggregation under Linux before.
  7. pharma

    pharma Network Guru Member

    You're probably right regarding "Static Link Aggregation" requiring a "router" configuration change .... a self test Team feature indicated that port aggregation is required on the switch (or router).

    Static Link Aggregation Self-Test Message
    The team type requires port aggregation on the switch, but the switch is not configured for port aggregation.
    Change the team type to AFT or ALB, or reconfigure the switch.

    I did change the Team to ALB (Automatic Load Balancing) and the self-test indicated:

    Automatic Load Balancing Self-Test Message
    No problems detected with the switch configuration for the current team settings.

    Both methods indicate a 2 Gbps link to the router, but ALB (at least for now) doesn't seem to indicate any router changes are necessary.

    Without changes to Tomato firmware I think the best chance anyone can do is for increased throughput using 2 network adapters (that support Teaming) is to use "Automatic Load Balancing".

    Edit: Even though it's possible, I don't think "Teaming" Intel & Realtek adapters results in the fastest scenario (possibly inmature drivers/software). Running the Intel controller alone seems to give as good performance for what I do on a daily basis (multiple torrents, downloads, surfing, etc...), and my throughput needs have never remotely approached the 1Gbps adapter capacity.
  8. Jau-Ling Chou

    Jau-Ling Chou Networkin' Nut Member

  9. waeking

    waeking Addicted to LI Member

    Old thread. But just wondering on what the turn out? I just picked up a qnap ts-431 that has two gigabit ports and can to "teams". Very interested in this.
  10. Oxidant

    Oxidant New Member Member

    I have made link aggregation working on AC66U and Shibby Tomato 132 release.
    Based on this:

    Shibby Tomato is missing bonding.ko module
    You have to enable /jffs and save
    bonding.ko module there.
    After it create script and call it
    Add to init script start /jffs/scripts/LinkAgg

    here is LinkAgg text
    #Link module bonding.ko to Linux core
    insmod /jffs/bonding.ko

    MODEL="$(nvram get productid)"
    if [ "$MODEL" = "RT-N66U" ] ; then
    robocfg vlan 1 ports "1 2 8t"
    robocfg vlan 3 ports "3 8t"
    robocfg vlan 4 ports "4 8t"
    # 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

    # Insert bonding module and set parameters (802.3ad, 100ms MII link monitoring, LACPDUs every 1 sec)
    modprobe bonding

    # 802.3ad mode
    echo 802.3ad > /sys/class/net/bond0/bonding/mode

    # LACPDUs every 1 sec
    echo fast > /sys/class/net/bond0/bonding/lacp_rate

    # Bring up bond0
    ip link set bond0 up

    # 100msec MII link monitoring
    echo 100 > /sys/class/net/bond0/bonding/miimon

    # enslave vlans to bond0
    echo +vlan3 > /sys/class/net/bond0/bonding/slaves
    echo +vlan4 > /sys/class/net/bond0/bonding/slaves

    # 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

    On Synology NAS you have to enable bonding, choose 802.3 AD, 2 patch-cords has to be connected to router ports 3 and 4

    May be you will have to play with Jumboframes - it has to be the same size, on router and NAS.
    ip link set dev eth0 mtu 9000

    Also, main condition is to turn on STP (Spanning Tree Protocol) at LAN subnet, found occasionally on the pae ~100 of the same thread below.

    I wrote to shibby last year, but he ignored it. Actually, link aggregation do not makes a lot of sense finally.

    Attached Files:

    Last edited: Jan 31, 2016
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice