1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Asus Dual-WAN >> Load-balancing with fail-over?

Discussion in 'Asuswrt-Merlin' started by b cheang, Oct 21, 2018.

  1. b cheang

    b cheang New Around Here

    Jul 31, 2017

    I have RT-AC86U on latest merlin FW 384.7. At the same time i have 2 x 1Gpbs connection from 2 diff ISPs.

    I have configured load-balancing ratio of 1:1 but when primary WAN goes down and come back up again, it seems all traffic still goes via secondary WAN (ETH 4).

    Does anyone faced the similar issues?

    If I configured them in fail-over mode, they worked perfectly OK as watchdog function sends pings to www.google.com

    Appreciate any advices.
  2. peraburek

    peraburek Regular Contributor

    Mar 13, 2015
    Last edited: Oct 22, 2018
  3. b cheang

    b cheang New Around Here

    Jul 31, 2017
  4. Martineau

    Martineau Very Senior Member

    Jul 8, 2012
    @b cheang, @peraburek suggested
    Ahem o_O, whilst the script can assist in identifying if a specific WAN interface is UP or DOWN (and initiate either a WAN restart or router reboot), in your situation it will only be useful when included in a script that monitors/manages the switch between Dual-WAN interfaces.
    How do you determine that the recovered Primary WAN (WAN0) interface is not used and all traffic is still via the Secondary WAN1 (eth4)?
    Did you examine the RPDB/routing rules (before the enforced switch from WAN0 -> WAN1) and after?
    ip rule
    ip route show table 100
    ip route show table 200
    Also examine/interprete the iptables 'statistic' rules in the Balance chain
    iptables --line -t mangle -nvL
    Chain balance (1 references)
    num   pkts bytes target     prot opt in     out     source               destination
    1      482 33248 RETURN     all  --  *      *  
    2        0     0 RETURN     all  --  *      *  
    3        0     0 RETURN     all  --  *      *  
    4       50  2589 RETURN     tcp  --  *      *              tcp dpt:443
    5        0     0 RETURN     tcp  --  *      *              tcp dpt:8443
    6        8 11024 RETURN     udp  --  *      *              udp dpt:443
    7        0     0 RETURN     udp  --  *      *              udp dpt:80
    8      391 90230 RETURN     all  --  *      *              connmark match  0x80000000/0x80000000
    9        0     0 RETURN     all  --  *      *              state RELATED,ESTABLISHED
    10      96 12889 CONNMARK   all  --  *      *              statistic mode random probability 0.75000000000 CONNMARK xset 0x80000000/0xf0000000
    11      31  3296 CONNMARK   all  --  *      *              connmark match  0x0 CONNMARK xset 0x90000000/0xf0000000
    should give you a clue (see rules 10 and 11 above) for ratio 3:1

    NOTE: To assist diagnostics, it may be easier, to reset the counters to 0 in the Balance chain after the Primary WAN has seemingly recovered?

    P.S. The above may not be the same on the RT-AC86U ?
    Last edited: Oct 23, 2018