Asus RT-AC3200 Link Aggregation

Discussion in 'Tomato Firmware' started by Parity Error, May 25, 2019.

  1. Parity Error

    Parity Error Addicted to LI Member

    Is it possible to do link aggregation (port bonding) with Tomato and the RT-AC3200 (I use Tomato Advanced)? I recently purchased a Netgear CM1200 cable modem which has this capability and was really hoping to give it a try. There is a script I found online (see below) that is supposedly able to handle port bonding on the RT-AC3200, although it's meant to be used with the Merlin firmware apparently, or I simply have no clue how to make it work. Any insight into this would be appreciated, thanks!

    ## AC3200 Port Mappings
    ## port 4 physical / port 1 internal
    ## port 3 physical / port 2 internal
    ## port 2 physical / port 3 internal
    ## port 1 physical / port 4 internal
    ## LACP/LAG on AC3200
    ## nvram edits for ports 3 & 4 router side
    nvram set vlan4ports="2 5t"
    nvram set vlan5ports="1 5t"
    nvram set vlan4hwname=et0
    nvram set vlan5hwname=et0
    nvram commit
    ## services-start edits for basic lacp profile setup
    # Logger Services
    logger -t "($(basename $0))" $$ Bonding commencing....
    robocfg vlan 1 ports "3 4 5*"
    sleep 1s
    modprobe bonding mode=802.3ad miimon=50 lacp_rate=fast xmit_hash_policy=1
    sleep 1s
    ip link set bond0 up
    sleep 1s
    echo +vlan4 > /sys/class/net/bond0/bonding/slaves
    echo +vlan5 > /sys/class/net/bond0/bonding/slaves
    brctl addif br0 bond0
    sleep 2s
    logger -t "($(basename $0))" $$ Bonding Status....
    cat /proc/net/bonding/bond0 | sed 's/^/+++ /' | logger
    ## firewall-start edits
    # Bonding IPtables rules
    iptables -I INPUT -i vlan4 -j ACCEPT
    iptables -I INPUT -i vlan5 -j ACCEPT
    iptables -I INPUT -i bond0 -j ACCEPT
    # Firewall/IPtables Performance Tweak for Bond0 to be placed right after the above bonding rules and before your custom rules - if any.
    iptables -D INPUT `iptables --line-numbers -nL INPUT | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
    iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  2. Sean B.

    Sean B. Network Guru Member

    It should work. Well, let me rephrase that. There's nothing about running Tomato rather than Merlin which would prevent it from working, Tomato does include the appropriate kernel module:

    root@Storage:/tmp/home/root# modinfo bonding
    filename:       /lib/modules/
    alias:          rtnl-link-bond
    author:         Thomas Davis, and many others
    description:    Ethernet Channel Bonding Driver, v3.7.0
    version:        3.7.0
    license:        GPL
    srcversion:     D864BCA0BCF601A8B2AC504
    vermagic: SMP preempt mod_unload modversions ARMv7
    parm:           max_bonds:Max number of bonded devices (int)
    parm:           tx_queues:Max number of transmit queues (default = 16) (int)
    parm:           num_grat_arp:Number of gratuitous ARP packets to send on failover event (int)
    parm:           num_unsol_na:Number of unsolicited IPv6 Neighbor Advertisements packets to send on failover event (int)
    parm:           miimon:Link check interval in milliseconds (int)
    parm:           updelay:Delay before considering link up, in milliseconds (int)
    parm:           downdelay:Delay before considering link down, in milliseconds (int)
    parm:           use_carrier:Use netif_carrier_ok (vs MII ioctls) in miimon; 0 for off, 1 for on (default) (int)
    parm:           mode:Mode of operation : 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp)
    parm:           primary:Primary network device to use (charp)
    parm:           primary_reselect:Reselect primary slave once it comes up; 0 for always (default), 1 for only if speed of primary is better, 2 for only on active slave failure (charp)
    parm:           lacp_rate:LACPDU tx rate to request from 802.3ad partner (slow/fast) (charp)
    parm:  aggregation selection logic: stable (0, default), bandwidth (1), count (2) (charp)
    parm:           xmit_hash_policy:XOR hashing method: 0 for layer 2 (default), 1 for layer 3+4 (charp)
    parm:           arp_interval:arp interval in milliseconds (int)
    parm:           arp_ip_target:arp targets in n.n.n.n form (array of charp)
    parm:           arp_validate:validate src/dst of ARP probes: none (default), active, backup or all (charp)
    parm:           fail_over_mac:For active-backup, do not set all slaves to the same MAC.  none (default), active or follow (charp)
    parm:           all_slaves_active:Keep all frames received on an interfaceby setting active flag for all slaves.  0 for never (default), 1 for always. (int)
    I can't speak to its effectiveness at its intended purpose though.
  3. pomidor1

    pomidor1 Networkin' Nut Member

  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