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!

for completeness sake i am using an 8 port netgear gs108 v3 gigabit switch to test this. I have two wires from port 3,4 hooked to 1,2 on the switch, the bond gets created no problem. ANything plugged into the router on port 1,2 is not getting connected to the internet, anything connected to the other ports on the switch are not getting IPs/connected to the network. As a side note I cannot seem to be able to get the Synology to bond on the switch either :/

Code:
admin@RT-AC68R:/jffs/scripts# sh LinkAgg -s

--- Bond Errors ---







--- Bond Status ---

Bond Status: bond0 UP
Bridge to WAN Status: Member of br0=bond0
Slave 1 Status: vlan=vlan3 Link=UP Port=3
Slave 2 Status: vlan=vlan4 Link=UP Port=4

admin@RT-AC68R:/jffs/scripts#
 
Last edited:
ok so i managed to get bonding working to an unmanaged switch. however i still run into the problem of all my wired connections dying... any suggestions?

802.3ad will not work with an unmanaged switch. Other aggregation modes do not require switch support, but you will have to read the documentation on how to set those up.
 
LinkAgg -h
Code:
    ----  Link Aggregation Version 1.5 Help  ----
Dynamically enable Link Aggregation using 802.3ad
802.3ad requires a Switch/PC/NAS which...
also supports 802.3ad to function correctly
Usage: /path/to/LinkAgg <port> <port>
Example: /path/to/LinkAgg 3 4
Only 2 ports are currently supported
    --- Special Flags ---
Help: -h or --help
Status: -s or --status
Delete: -d or --delete
Version: -v or --version

and it's also documented on the wiki

generally if one device is set for LinkAgg and the other is not, or does not support it, you will have all sort of odd errors

but I do appreciate you testing the status checker
 
Hi Kad,
since I own a Synology ds412+ I'm planning to switch from official asus fw to merlin's fw for my rt-ac66u to take advantage of linkagg.
Do you know if merlin will implement a webui for 802.3ad?

Thanks
 
Hi Kad,
since I own a Synology ds412+ I'm planning to switch from official asus fw to merlin's fw for my rt-ac66u to take advantage of linkagg.
Do you know if merlin will implement a webui for 802.3ad?

Thanks

Not at this time, as this isn't a priority.
 
Hi Kad,
since I own a Synology ds412+ I'm planning to switch from official asus fw to merlin's fw for my rt-ac66u to take advantage of linkagg.
Do you know if merlin will implement a webui for 802.3ad?

Thanks

no guarantees on any of this, but especially synology devices
many people are having issues with synology
 
So i got a response from Synology that read: "We only support active LCAP, passive will fail" I am not sure how to check what bonding driver is set to use. Also I purchased a netgear gs108t (managed switch) and could get bonding working only if I set the LAG mode to Static rather than LCAP, on the Asus end the bond woulod create but on the switch end it would not show up as Link Up until I switched modes.

The issue with all wired connections dying after setting up LinkAgg still happened :(
 
So i got a response from Synology that read: "We only support active LCAP, passive will fail" I am not sure how to check what bonding driver is set to use. Also I purchased a netgear gs108t (managed switch) and could get bonding working only if I set the LAG mode to Static rather than LCAP, on the Asus end the bond woulod create but on the switch end it would not show up as Link Up until I switched modes.

The issue with all wired connections dying after setting up LinkAgg still happened :(

well at least they are providing some feedback

searching for a good discription of active vs passive LACP I found this
http://www.thomas-krenn.com/en/wiki/Link_Aggregation_and_LACP_basics
Passive LACP: the port prefers not transmitting LACPDUs. The port will only transmit LACPDUs when its counterpart uses active LACP (preference not to speak unless spoken to).
Active LACP: the port prefers to transmit LACPDUs and thereby to speak the protocol, regardless of whether its counterpart uses passive LACP or not (preference to speak regardless).

and here's another refrence on how to set this mode
but general linux is active only
http://pbraun.nethence.com/unix/net/802.3ad_lacp.html

from what I can find you can try to set xmit_hash_policy
options are
0=layer2 — Default setting. This parameter uses the XOR of hardware MAC addresses to generate the hash.
1=layer3+4 — Uses upper layer protocol information (when available) to generate the hash. This allows for traffic to a particular network peer to span multiple slaves, although a single connection will not span multiple slaves.
2=layer2+3 — Uses a combination of layer2 and layer3 protocol information to generate the hash.

for those you who want to try layer3+4
https://www.mediafire.com/?weagi6807xsh8ra

@ebalsumgo
please test, maybe this will work with synology NAS
 
Last edited:
0=layer2 — Default setting. This parameter uses the XOR of hardware MAC addresses to generate the hash.
1=layer3+4 — Uses upper layer protocol information (when available) to generate the hash. This allows for traffic to a particular network peer to span multiple slaves, although a single connection will not span multiple slaves.
2=layer2+3 — Uses a combination of layer2 and layer3 protocol information to generate the hash.

for those you who want to try layer3+4
https://www.mediafire.com/?weagi6807xsh8ra

@ebalsumgo
please test, maybe this will work with synology NAS

From the linux Bonding Driver documentation on layer3+4.
This algorithm is not fully 802.3ad compliant. A single TCP or UDP conversation containing both fragmented and unfragmented packets will see packets striped across two interfaces. This may result in out of order delivery. Most traffic types will not meet this criteria, as TCP rarely fragments traffic, and most UDP traffic is not involved in extended conversations. Other implementations of 802.3ad may or may not tolerate this noncompliance.
layer2 and layer2+3 are 802.3ad compliant.

Also, the 2.6.22 kernel used on the non-ARM devices only layer2 and layer3+4 are implemented. The 2.6.36 kernel used in the ARM routers has all three modes available.
 
also as a side note the Synology is using: Linux 3.2.40 #3810 SMP Sat Nov 9 11:54:42 CST 2013 x86_64 GNU/Linux synology_cedarview_1512+

I just dug around the synology to try and pull out what options they are passing to the bonding kernel driver, straight out of the /etc/sysconfig/network-interfaces/ifcfg-bond0 file: BONDING_OPTS="mode=4 use_carrier=1 miimon=100 updelay=100 lacp_rate=fast"

This is how they go about setting up the bond:
Code:
install_bonding_driver () # $1=bond0 $2=BONDING_OPTS
{
        unset FN_BONDING_MASTERS DN_BONDDEV SKIP_ENSLAVE DEVICE
        FN_BONDING_MASTERS="/sys/class/net/bonding_masters"
        DN_BONDDEV="/sys/class/net/$1/bonding"
        [ ! -f ${FN_BONDING_MASTERS} ] && ( insmod /lib/modules/bonding.ko || return 1 )
        echo "+$1" > ${FN_BONDING_MASTERS}

        /sbin/ip link set dev $1 down

        # add the bits to setup driver parameters here
        for arg in $2 ; do
                key=${arg%%=*};
                value=${arg##*=};
                echo $value > ${DN_BONDDEV}/$key
        done

        /sbin/ip link set dev $1 up
        for device in `grep -l "^MASTER=$1" /etc/sysconfig/network-scripts/ifcfg-*` ; do
                SKIP_ENSLAVE=0
                DEVICE=`basename ${device} | cut -d '-' -f 2`
                for slv_dev in `cat ${DN_BONDDEV}/slaves`
                do
                        if [ "${slv_dev}" = "${DEVICE}" ]; then
                                SKIP_ENSLAVE=1
                                break
                        fi
                done

                if [ "${SKIP_ENSLAVE}" -eq 0 ]; then
                        /sbin/ip link set dev ${DEVICE} down
                        echo "+${DEVICE}" > ${DN_BONDDEV}/slaves 2>/dev/null
                        /sbin/ip link set dev ${DEVICE} up
                fi
        done
        /sbin/ip link set dev $1 up
        return 0
}

As well as the bond destruction:
Code:
unset_bonding_driver () # $1=bond0
{
        unset FN_BONDING_MASTERS DN_BONDDEV REVERSE_SLAVES
        FN_BONDING_MASTERS="/sys/class/net/bonding_masters"
        DN_BONDDEV="/sys/class/net/$1/bonding"
        REVERSE_SLAVES=""
        [ ! -f ${FN_BONDING_MASTERS} ] && return 0

        for slv_dev in `cat ${DN_BONDDEV}/slaves`
        do
                /sbin/ip link set dev ${slv_dev} down
        done
        /sbin/ip link set dev $1 down
        echo "-$1" > ${FN_BONDING_MASTERS}
}
 
Last edited:
yeah, I saw the notes regarding, not fully compliant

anybody else have an idea?

from the most recent post
use_carrier=1
from https://www.kernel.org/doc/Documentation/networking/bonding.txt

use_carrier

Specifies whether or not miimon should use MII or ETHTOOL
ioctls vs. netif_carrier_ok() to determine the link
status. The MII or ETHTOOL ioctls are less efficient and
utilize a deprecated calling sequence within the kernel. The
netif_carrier_ok() relies on the device driver to maintain its
state with netif_carrier_on/off; at this writing, most, but
not all, device drivers support this facility.

If bonding insists that the link is up when it should not be,
it may be that your network device driver does not support
netif_carrier_on/off. The default state for netif_carrier is
"carrier on," so if a driver does not support netif_carrier,
it will appear as if the link is always up. In this case,
setting use_carrier to 0 will cause bonding to revert to the
MII / ETHTOOL ioctl method to determine the link state.

A value of 1 enables the use of netif_carrier_ok(), a value of
0 will use the deprecated MII / ETHTOOL ioctls. The default
value is 1.

synology is forcing value 1, which should be default, but I wonder what would happen if 0 is set on synology side ??

or maybe
@ebalsumgo maybe you should enable LinkAgg then
cat /proc/net/bonding/bond0

which should look something like this
Code:
rt@RT-AC66U:/# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.1.3 (June 13, 2007)

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
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2
        Actor Key: 5
        Partner Key: 1
        Partner Mac Address: d0:7e:28:1d:b3:41

Slave Interface: vlan3
MII Status: up
Link Failure Count: 0
Permanent HW addr: 60:a4:4c:20:10:90
Aggregator ID: 1

Slave Interface: vlan4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 60:a4:4c:20:10:90
Aggregator ID: 1
rt@RT-AC66U:/#

you could send that output to synology and ask for their thoughts on why it doesn't work
 
Last edited:
Anyway thanks,
I'll give it a try with the latest Synology DSM.

Just a heads up - I managed to get it working now. Problem for me was the WD SMP box I was using wouldn't see the shares on my DS412+ after successfully creating the bonding.

Last week WD updated to version 2.something on the SMP box and now it works great!

Also confirmed working with my XBMC box (Pivos XIOS M3).
 
glad it's working

I guess you're one of the few lucky ones, with functional LinkAgg and Synology

still puzzled why so many issues with synology NAS
 
It is strange now. I have rt-ac66u + Synology DS412+ with latest firmware, I downloaded LinkAgg 1.5 script and tried to create bonding on synology and asus. When I created bonding on Synology, it said that cannot create it with success (but connection was working on one link probably). So I run LinkAgg - I lost connection from my laptop (on wifi) to Synology, but from asus I could ping NAS.... I have removed LinkAgg, tried few times to create lacp,and... I have strange situation - Synology says that bonding works, I have no bonding on asus (LinkAgg -s says bond is deleted), I can connect using wifi and local... Strange..:)
 
It is strange now. I have rt-ac66u + Synology DS412+ with latest firmware, I downloaded LinkAgg 1.5 script and tried to create bonding on synology and asus. When I created bonding on Synology, it said that cannot create it with success (but connection was working on one link probably). So I run LinkAgg - I lost connection from my laptop (on wifi) to Synology, but from asus I could ping NAS.... I have removed LinkAgg, tried few times to create lacp,and... I have strange situation - Synology says that bonding works, I have no bonding on asus (LinkAgg -s says bond is deleted), I can connect using wifi and local... Strange..:)

well normally I would say that's possible with dynamic linkagg

so synology side, they successfully create the bond
but don't get proper response from the router stating that it's bonded as well
so synology, marks 1 trunk as backup/non-active and passes all data on 1 trunk, effectively the same as only using 1 ethernet port

however this is completely the opposite of the feedback synology provided ebalsumgo above

based on what was said above, that should not be possible on a synology
 
Hi,
please could you provide the steps to get DS412+ working with linkagg provided by Kad?
Thanks

Just a heads up - I managed to get it working now. Problem for me was the WD SMP box I was using wouldn't see the shares on my DS412+ after successfully creating the bonding.

Last week WD updated to version 2.something on the SMP box and now it works great!

Also confirmed working with my XBMC box (Pivos XIOS M3).
 

Similar threads

Sign Up For SNBForums Daily Digest

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