What's new

[How-To] Link Aggregation/LACP on RT-AC68U/W/R/P

  • Thread starter Deleted member 28123
  • Start date
  • 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!

I've tried this once as well and got it running, however max throughput from the NAS to my LAN was nowhere near the theoretical 2Gbit/s.
With my Cisco SG300 however max throughput from the NAS to my LAN was exactly 228MB/s which is pretty much as good as it gets with two links.

However there is an easy way out, at least if you have a Synology.
Install DSM 5.2 Beta and use its new modes for Link Aggregation, in my case I use Adaptive Load Balancing on my AC87U (Port 3 and 4) and it works out of the box.

"New modes for Link Aggregation

Link Aggregation is an essential network feature, allowing you to tailor the behavior of your network ports according to your needs and find a balance between reliability and performance. DSM is now compatible with the following-modes: Active-standby, 802.3ad dynamic, Balanced XOR, and Adaptive Load Balancing, allowing you to benefit from link aggregation without server-class switch."
 
Are you sure you didn't enable iptraffic monitoring or some other service that is known to automatically disable CTF? I have CTF enabled and I'm maxing out my 50Mbps connection.. Wish I had your wan speed to test ;)

View attachment 3536

I just tried it, right after resetting my router, same issue, it does have a huge negative impact on WAN to LAN speeds the HW acceleration status says : Enabled (CTF Only)

LAG Enabled:
lan_enabled-jpg.3538


LAG Disabled:

lan_disabled-jpg.3537


It looks like rather than CTF it is actually the Flow Acceleration that gets disabled while using LAG on the RT-AC68U, I have no idea why that is, but it does not explain the poor performances as CTF alone (aka CTF Level 1) should be able to route WAN traffic at gigabit speeds.
 

Attachments

  • LAN_Disabled.JPG
    LAN_Disabled.JPG
    25.4 KB · Views: 2,715
  • LAN_Enabled.JPG
    LAN_Enabled.JPG
    27 KB · Views: 3,402
Last edited:
I've tried this once as well and got it running, however max throughput from the NAS to my LAN was nowhere near the theoretical 2Gbit/s.
With my Cisco SG300 however max throughput from the NAS to my LAN was exactly 228MB/s which is pretty much as good as it gets with two links.

However there is an easy way out, at least if you have a Synology.
Install DSM 5.2 Beta and use its new modes for Link Aggregation, in my case I use Adaptive Load Balancing on my AC87U (Port 3 and 4) and it works out of the box.

"New modes for Link Aggregation

Link Aggregation is an essential network feature, allowing you to tailor the behavior of your network ports according to your needs and find a balance between reliability and performance. DSM is now compatible with the following-modes: Active-standby, 802.3ad dynamic, Balanced XOR, and Adaptive Load Balancing, allowing you to benefit from link aggregation without server-class switch."
Hum... Wouldn't Adaptive Load Balancing have limitations compared to 802.3ad ? Such only providing aggregation for Tx while 802.3ad provides it for both Tx and Rx there is also no Layer 2 Address Aggregation using ALB as far as I know of (which may lead to issues with protocols such as iSCSI ?)

Wouldn't it be better to just purchase the affordable SG200-08 which allows to provide LACP up to 4 devices (it has 8 ports), allows VLAN management (including VLAN tagging support) and has a commutable throughput of 20Gbps ?
 
I tried this with an AC68U and a HP V1910-24G switch, using all four ports on the router and the four "extra" ports on the 24 port switch. The switch acknowledges the connection without any problems and performance seems great. However the WAN download speed suffers greatly and only gives me approximately 54% of my max bandwidth. Bypassing the switch and router always gives me close to 100% (which is 500 megabit/s if it matters). Any ideas why this is happening? Also, just ignoring any link aggregation at all and just simply connecting the switch and router with a single cat6 cable gives me 95% of max, which is very acceptable.
 
There was some issues with the initial script and my router that required modifying (namely setting VLAN4 & 5 as down before adding to bond0) but everything seems to be working with my WD DL4100. Only problem as others have stated is issues with wifi not reaching it. The strange part is that I can arping any wireless device just fine from the NAS but nothing on WAN can reach it. The NAS also shows up in the arp list for the wireless client.

services-start script after being modified:
Code:
#!/bin/sh

# Logger Services
logger -t "($(basename $0))" $$ SERVICES-START being started....

logger -t "($(basename $0))" $$ Bonding ports 3 and 4 commencing....
# Pre-Bonding
robocfg vlan 1 ports "1 2 5*"

# Bonding
sleep 2s
modprobe bonding
# Setting mode to 802.3ad
echo 802.3ad > /sys/class/net/bond0/bonding/mode
# Setting LACP rate to slow
echo slow > /sys/class/net/bond0/bonding/lacp_rate
# Setting MII monitoring interval to 500
echo 500 > /sys/class/net/bond0/bonding/miimon
# Setting Up/Down delay to 1000
echo 1000 > /sys/class/net/bond0/bonding/updelay
echo 1000 > /sys/class/net/bond0/bonding/downdelay

# Setting xmit hash policy to layer2
echo 0 > /sys/class/net/bond0/bonding/xmit_hash_policy
ip link set bond0 up
# Add vlan4/5
ip link set vlan4 down
ip link set vlan5 down
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
echo +vlan5 > /sys/class/net/bond0/bonding/slaves
ip link set vlan4 up
ip link set vlan5 up
brctl addif br0 bond0

# Post-Bonding
sleep 2s
logger -t "($(basename $0))" $$ Bonding Status....
cat /proc/net/bonding/bond0 | sed 's/^/+++  /' | logger

Firewall remains the same as the initial script.

Bond interface on router:
Code:
Ethernet Channel Bonding Driver: v3.7.0 (June 2, 2010)

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

802.3ad info
LACP rate: slow
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
    Aggregator ID: 1
    Number of ports: 2
    Actor Key: 5
    Partner Key: 17
    Partner Mac Address: 00:90:a9:db:88:94

Slave Interface: vlan4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 38:2c:4a:48:ff:70
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: vlan5
MII Status: up
Link Failure Count: 0
Permanent HW addr: 38:2c:4a:48:ff:70
Aggregator ID: 1
Slave queue ID: 0

Bond interface on NAS:
Code:
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): 500
Up Delay (ms): 1000
Down Delay (ms): 1000

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
    Aggregator ID: 1
    Number of ports: 2
    Actor Key: 17
    Partner Key: 5
    Partner Mac Address: 38:2c:4a:48:ff:70

Slave Interface: egiga0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:90:a9:db:88:94
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: egiga1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:90:a9:db:88:95
Aggregator ID: 1
Slave queue ID: 0

VLAN/Bridge configuration:
Code:
admin@RT-AC68P:/jffs/scripts# nvram show | grep vlan
vlan4ports=3 5t
vlan2ports=0 5u
size: 49067 bytes (16469 left)
wl0_vlan_prio_mode=off
vlan2hwname=et0
vlan5hwname=et0
wl_vlan_prio_mode=off
lan_ifnames=vlan1 eth1 eth2
vlan5ports=4 5t
vlan1hwname=et0
vlan1ports=1 2 3 4 5*
vlan4hwname=et0
landevs=vlan1 wl0 wl1
wl1_vlan_prio_mode=off
admin@RT-AC68P:/jffs/scripts# brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.382c4a48ff70    yes        vlan1
                            eth1
                            eth2
                            bond0
admin@RT-AC68P:/jffs/scripts#

iptables INPUT configuration:
Code:
admin@RT-AC68P:/jffs/scripts# iptables -vnL INPUT

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)

 pkts bytes target     prot opt in     out     source               destination         

    0     0 ACCEPT     all  --  tun21  *       0.0.0.0/0            0.0.0.0/0           

    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:1194

11104 1350K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED

    0     0 ACCEPT     all  --  bond0  *       0.0.0.0/0            0.0.0.0/0           

    0     0 ACCEPT     all  --  vlan5  *       0.0.0.0/0            0.0.0.0/0           

    0     0 ACCEPT     all  --  vlan4  *       0.0.0.0/0            0.0.0.0/0           

  117  8090 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0            state INVALID

14209 3704K ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0            state NEW

 9270 1785K ACCEPT     all  --  br0    *       0.0.0.0/0            0.0.0.0/0            state NEW

  232 78362 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp spt:67 dpt:68

  39  4940 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0           

admin@RT-AC68P:/jffs/scripts#

What's odd is when this was first setup my 802.11ac tablet could reach the NAS fine, I restarted wireless to test if it was just 802.11n affected and now that cannot connect at all along with my 802.11n MBP. Any ideas? Via LAN the bonded interface works swimmingly.
 
I just tried it, right after resetting my router, same issue, it does have a huge negative impact on WAN to LAN speeds the HW acceleration status says : Enabled (CTF Only)

It looks like rather than CTF it is actually the Flow Acceleration that gets disabled while using LAG on the RT-AC68U, I have no idea why that is, but it does not explain the poor performances as CTF alone (aka CTF Level 1) should be able to route WAN traffic at gigabit speeds.
mathieulh, I too was having a major issue with being able to get full gigabit speeds from my modem to the AC68. My normal WAN to LAN speed was being capped at around 300mbps, when it should have been at least 750-800mbps! I contacted Asus support and they suggested enabling Adaptive QoS, setting my dl/ul speeds, and then disabling QoS. The whole process takes about 5 minutes to enable and disable QoS, but after doing this, I am now running at full speed.

Now, I'm not doing the port link aggregation that you are and it does look like you were previously getting your full dl speed, but this is a quick tip to try out and maybe it will resolve your issue? Good luck.
 
or this?:

admin@RT-AC87U-0978:/tmp/home/root# nvram show | grep vlan

vlan2ports=0 7u

port5vlans=1 2 16

port3vlans=1

port1vlans=1

wl0_vlan_prio_mode=off

vlan2hwname=et1

wan_ifname2=vlan2

vlan1_bridged=1

wl_vlan_prio_mode=off

lan_ifnames=vlan1 eth1 wifi0

wan_default=vlan2

vlan1hwname=et1

vlan1ports=1 2 3 5 7*

port4vlans=1

vlans=0

wan_iface=vlan2

port2vlans=1

probe_blacklist=vlan1 vlan2

port0vlans=2

wan_ifname=vlan2

landevs=vlan1 wl0

dtag_vlan8=0

size: 65263 bytes (273 left)

wl1_vlan_prio_mode=off

admin@RT-AC87U-0978:/tmp/home/root#
 
Hi AtAM1
Sorry to dive into your thread on this but it is the one that has given me the most understanding and success so far.
I'm trying to get LAGG working on my AC87U to connect to my twin NIC Nas4Free box.

After a LOT of reading up from various places I found this diagram:
skitch.png

which started me trying to understand the architecture of my overly complex ac87u, or so I thought...

Anyway armed with this I tried making some changes to your initial steps:

nvram set vlan1ports="1 5 7*”

nvram set vlan2ports="0 7u"

nvram set vlan3ports=“2 7t"

nvram set vlan4ports=“3 7t"

nvram set port5vlans="1 2 3 5 16"

nvram set port0vlans="2"

nvram set port1vlans="1"

nvram set port2vlans=“3”

nvram set port3vlans=“4”

nvram set port4vlans=“1”

nvram set vlan1hwname=et1

nvram set vlan2hwname=et1

nvram set vlan3hwname=et1

nvram set vlan4hwname=et1

nvram commit

My thinking here was to avoid ports 1 and 4 as I'd read a lot of people having problems trying to do anything out of the ordinary with them.
Therefore I attached my Nas4Free to physical lan ports 2 & 3.
I thought the results were promising at this point:
skitch2.png


although the vlan associations fo Lan2 and 3 weren't as I expected they both seemed to be connected to my Mas4Free, so.....

I soldiered on following what I thought were appropriate versions of your next steps to see what happened.

Unfortunately the result was not great:
(please see follow up next post as only able to attach 2 files each)
 
The result being this:
skitch3.png


Therefore I've scp copied the firewall-start and services-start scripts off the jffs partition for safe keeping before deleting them and now I'm back to the previous set up, as I reckon the problem with the vlans needs fixing first.

Could you please offer me any advice as to where I've gone wrong here?

Many thanks!
 
Last edited:
Stop bumping the thread. People have seen it already, there's simply very few people who use link aggregation.
 
There was some issues with the initial script and my router that required modifying (namely setting VLAN4 & 5 as down before adding to bond0) but everything seems to be working with my WD DL4100. Only problem as others have stated is issues with wifi not reaching it. The strange part is that I can arping any wireless device just fine from the NAS but nothing on WAN can reach it. The NAS also shows up in the arp list for the wireless client.

services-start script after being modified:
Code:
#!/bin/sh

# Logger Services
logger -t "($(basename $0))" $$ SERVICES-START being started....

logger -t "($(basename $0))" $$ Bonding ports 3 and 4 commencing....
# Pre-Bonding
robocfg vlan 1 ports "1 2 5*"

# Bonding
sleep 2s
modprobe bonding
# Setting mode to 802.3ad
echo 802.3ad > /sys/class/net/bond0/bonding/mode
# Setting LACP rate to slow
echo slow > /sys/class/net/bond0/bonding/lacp_rate
# Setting MII monitoring interval to 500
echo 500 > /sys/class/net/bond0/bonding/miimon
# Setting Up/Down delay to 1000
echo 1000 > /sys/class/net/bond0/bonding/updelay
echo 1000 > /sys/class/net/bond0/bonding/downdelay

# Setting xmit hash policy to layer2
echo 0 > /sys/class/net/bond0/bonding/xmit_hash_policy
ip link set bond0 up
# Add vlan4/5
ip link set vlan4 down
ip link set vlan5 down
echo +vlan4 > /sys/class/net/bond0/bonding/slaves
echo +vlan5 > /sys/class/net/bond0/bonding/slaves
ip link set vlan4 up
ip link set vlan5 up
brctl addif br0 bond0

# Post-Bonding
sleep 2s
logger -t "($(basename $0))" $$ Bonding Status....
cat /proc/net/bonding/bond0 | sed 's/^/+++  /' | logger

Firewall remains the same as the initial script.

Bond interface on router:
Code:
Ethernet Channel Bonding Driver: v3.7.0 (June 2, 2010)

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

802.3ad info
LACP rate: slow
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
    Aggregator ID: 1
    Number of ports: 2
    Actor Key: 5
    Partner Key: 17
    Partner Mac Address: 00:90:a9:db:88:94

Slave Interface: vlan4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 38:2c:4a:48:ff:70
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: vlan5
MII Status: up
Link Failure Count: 0
Permanent HW addr: 38:2c:4a:48:ff:70
Aggregator ID: 1
Slave queue ID: 0

Bond interface on NAS:
Code:
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): 500
Up Delay (ms): 1000
Down Delay (ms): 1000

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

What's odd is when this was first setup my 802.11ac tablet could reach the NAS fine, I restarted wireless to test if it was just 802.11n affected and now that cannot connect at all along with my 802.11n MBP. Any ideas? Via LAN the bonded interface works swimmingly.

Sorry for the late reply... I am rarely on the forums but am almost always on IRC/Dalnet/#asuswrt

I have had similar issues initially and was able to overcome them by setting the xmit_hash_policy to layer3+4 for both the router and switch as the NAS was connected to the switch... Does your NAS support this policy? If so, give it a try. As for the rest, I don't see any issues as they are identical to my working link aggregation.
 
Hi AtAM1
Sorry to dive into your thread on this but it is the one that has given me the most understanding and success so far.
I'm trying to get LAGG working on my AC87U to connect to my twin NIC Nas4Free box.

After a LOT of reading up from various places I found this diagram:
View attachment 4565
which started me trying to understand the architecture of my overly complex ac87u, or so I thought...

Anyway armed with this I tried making some changes to your initial steps:

nvram set vlan1ports="1 5 7*”

nvram set vlan2ports="0 7u"

nvram set vlan3ports=“2 7t"

nvram set vlan4ports=“3 7t"

nvram set port5vlans="1 2 3 5 16"

nvram set port0vlans="2"

nvram set port1vlans="1"

nvram set port2vlans=“3”

nvram set port3vlans=“4”

nvram set port4vlans=“1”

nvram set vlan1hwname=et1

nvram set vlan2hwname=et1

nvram set vlan3hwname=et1

nvram set vlan4hwname=et1

nvram commit

My thinking here was to avoid ports 1 and 4 as I'd read a lot of people having problems trying to do anything out of the ordinary with them.
Therefore I attached my Nas4Free to physical lan ports 2 & 3.
I thought the results were promising at this point:
View attachment 4566

although the vlan associations fo Lan2 and 3 weren't as I expected they both seemed to be connected to my Mas4Free, so.....

I soldiered on following what I thought were appropriate versions of your next steps to see what happened.

Unfortunately the result was not great:
(please see follow up next post as only able to attach 2 files each)

Hi there... I'd be happy to help but it's a guaranteed dead end without the actual router to experiment with. Anyway, I replied back to your private message. Let me know if you are willing to proceed with the online session.
 

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