What's new

WANFailover Dual WAN Failover Script ***v1.6.0 Released***

  • 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!

Is this working good with a Load Balancing setup?

I am considering putting one of my RT-AC86U back online using Load Balancing for testing.
 
Is this working good with a Load Balancing setup?

I am considering putting one of my RT-AC86U back online using Load Balancing for testing.
Yes it works for load balancing mode.
 
Yes the script works.
But load balancing is erratic at best
Enable debug logging on your router and use capture mode to provide logs for me to take a look at please?
 
Thanks for the interest but it's impossibile for me to do it.
Putting the asus router in front of my actual load/balancer (an ER-X) could disrupt my net once again and I don't want to be killed by my wife and daughter...
I've made several attempts this year, with and without your script. The problem is that your script correctly detects when a connection is down or up.
However the load balancing is erratic: on 10 websites 6 are reachable and 4 are non resolved. My openvpn server sometimes disconnects without reason, of my 2 openvpn clients 1 spits out errors of unreachable server, the other works ok.
With ER-X everything is smooth.
 
Thanks for the interest but it's impossibile for me to do it.
Putting the asus router in front of my actual load/balancer (an ER-X) could disrupt my net once again and I don't want to be killed by my wife and daughter...
I've made several attempts this year, with and without your script. The problem is that your script correctly detects when a connection is down or up.
However the load balancing is erratic: on 10 websites 6 are reachable and 4 are non resolved. My openvpn server sometimes disconnects without reason, of my 2 openvpn clients 1 spits out errors of unreachable server, the other works ok.
With ER-X everything is smooth.
I had this problem before developing my script in Load Balancing and resolved it with it checking for mangle rules and IP Rules needed for proper load balancing but I’d have to see the logs to see if it is not creating something correctly.
 
I had this problem before developing my script in Load Balancing and resolved it with it checking for mangle rules and IP Rules needed for proper load balancing but I’d have to see the logs to see if it is not creating something correctly.
Yes, I understand but it's impossibile to do right now.
 
Yes, I understand but it's impossibile to do right now.
No worries, if anyone else is experiencing these issues in Load Balancing mode, please feel free to comment and volunteer to help further diagnose the issues. There may be other cases that need to be resolved that don’t effect everyone. Load balancing mode works perfect for me and my guest networks using my script but I know there may be other factors that effect others.
 
Hey Ranger802004 - thank you for this script!
Unfortunately I have troubles running it for longer periods of time :(
It works well at the beginning but after some time it stops (however the process is still running) and once main WAN looses connection it doesn't do what it should and what it did earlier without problem (WAN1 shows as Disconnected, WAN2 as Hot-Standby). Only after I restart the script it detects there is no connection on main WAN and switches to secondary WAN (USB Stick, mobile). If the interruption is long enough (today it lasted for 6h) it then doesn't switch back to main WAN (which changes from Cold-Standby to Hot-Standby and that's it). Only manual restarting does the trick. Did anyone experience such behavior? How can I troubleshoot it?

I have Asus RT-AC86U, main WAN is 1 Gbit PPPoE, second WAN is USB Stick with GSM card in it. I'm running failover mode, no load balancing, nothing else is custom on router side (no custom rules or other more advanced settings).
If anyone can help I would highly appreciate it!

I'm running v1.6.0-beta2 but the same happened with earlier (1.5.x) versions.
 
Hello

if I do a manual switch I get
Make a selection: 13
wan-failover.sh - Switch WAN Mode
Are you sure you want to switch Primary WAN? ***Enter Y for Yes or N for No***y
wan-failover.sh: WAN Switch - Switching wan1 to Primary WAN
wan-failover.sh: WAN Switch - WAN Gateway Interface: vlan3
wan-failover.sh: WAN Switch - Deleting default route via 192.168.58.1 dev vlan2
wan-failover.sh: WAN Switch - Deleted default route via 192.168.58.1 dev vlan2
wan-failover.sh: WAN Switch - Disabling QoS Bandwidth Settings
wan-failover.sh: WAN Switch - Deleting default route via 192.168.58.1 dev vlan2
wan-failover.sh: WAN Switch - Deleted default route via 192.168.58.1 dev vlan2
wan-failover.sh: WAN Switch - Disabling QoS Bandwidth Settings
wan-failover.sh: WAN Switch - Deleting default route via 192.168.58.1 dev vlan2
RTNETLINK answers: No such process
wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.58.1 dev vlan2
...
and switching back
Make a selection: 13
wan-failover.sh - Switch WAN Mode
Are you sure you want to switch Primary WAN? ***Enter Y for Yes or N for No***y
wan-failover.sh: WAN Switch - Switching wan0 to Primary WAN
wan-failover.sh: WAN Switch - WAN IP Address: 192.168.58.51
wan-failover.sh: WAN Switch - WAN Gateway IP: 192.168.58.1
wan-failover.sh: WAN Switch - WAN Gateway Interface: vlan2
wan-failover.sh: WAN Switch - Deleting default route via 192.168.59.1 dev vlan3
wan-failover.sh: WAN Switch - Deleted default route via 192.168.59.1 dev vlan3
wan-failover.sh: WAN Switch - Disabling QoS Bandwidth Settings
wan-failover.sh: WAN Switch - Deleting default route via 192.168.59.1 dev vlan3
RTNETLINK answers: No such process
wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.59.1 dev vlan3
wan-failover.sh: WAN Switch - Disabling QoS Bandwidth Settings
wan-failover.sh: WAN Switch - Deleting default route via 192.168.59.1 dev vlan3
RTNETLINK answers: No such process
wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.59.1 dev vlan3 ....

if I then check monitor I get
Jan 11 07:26:02 wan-failover.sh: WAN Failover Disabled - WAN Failover is currently disabled. ***Review Logs***

and GUI shows status as (in between it stated WAN connection on prime not available (even if a ssh session was permanently working).
2023-01-11_07h49_46.png
2023-01-11_07h27_02.png
 
Last edited:
When I was running this script, I had better luck if I manually set the WAN IP addresses instead of using WAN DHCP settings.
 
This is a pretty cool script....will it be included to AMTM in the near future?
 
It would be nice to have this supported in AMTM.

Im using it for a fairly unique use case. I call it StarlinkRoamingMode (trademark ;-)

I moved a few months back to an Internet starved area. I was luckily able to get Starlink - but only in roaming mode until my area gets out of the Waitlist - sometime in 2023 Starlink says. Roaming means best effort, no Qos etc.

I was getting pretty good speeds during the day - between 100-200+Mbit. But, by evening around dinner time and later - wow, drop to 1Mbit or less!!!

So, re-enabled my AT&T DSL 12Mbit modem, installed Dual WAN Failover and have a cron job that does a “failover” at 5PM to AT&T then back to Starlink at 2AM. We can at least stream during the evening!

Been working well.

BTW, this is my Internet life right now (using Yaz Speedtest running every few hours):

EF2EFBE4-21AC-4AFF-B653-CCDB102F62DE.jpeg
 
Enable debug logging on your router and use capture mode to provide logs for me to take a look at please?
@Ranger802004

I recently got T-Mobile Home Internet (THMI) as a backup (main ISP is Xfinity)...and would like to enable dual-wan on my Asus router and use it as either failover or load balancing. Still deciding...

If enable "debug" logging for my setup (will prob try load balancing 1st), ill definitely provide input if Im seeing any issues from my initial setup.

I will have xfinity as main ISP and TMHI as either failover or load balancing.

Finally not sure if this has been asked previously but does this script allow QoS to stay enabled while using load balancing? I know thr stock version disables QoS. Just curious if it acts the same way. Thanks!
 
Last edited:
Finally not sure if this has been asked previously but does this script allow QoS to stay enabled while using load balancing? I know thr stock version disables QoS. Just curious if it acts the same way. Thanks!

Yep @Kingp1n -- hope all is well.

in the readme: https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/wan-failover-readme.txt

Code:
- WAN0_QOS_OVERHEAD: This will define WAN0 Packet Overhead when QoS is Enabled.  Default: 0 Bytes
- WAN1_QOS_OVERHEAD: This will define WAN1 Packet Overhead when QoS is Enabled.  Default: 0 Bytes
- WAN0_QOS_ATM: This will enable or disable Asynchronous Transfer Mode (ATM) for WAN0 when QoS is Enabled. Default: Disabled (0)
- WAN1_QOS_ATM: This will enable or disable Asynchronous Transfer Mode (ATM) for WAN1 when QoS is Enabled. Default: Disabled (0)

It flips based on the connection. You can even have it disabled for one, and enabled for the other as I do.
 
I appreciate the information.

If I make changes from Failover to Load balancing, do I need to run the install again or a simple restart of the script will do?
 
Hello

if I do a manual switch I get

and switching back


if I then check monitor I get
Jan 11 07:26:02 wan-failover.sh: WAN Failover Disabled - WAN Failover is currently disabled. ***Review Logs***

and GUI shows status as (in between it stated WAN connection on prime not available (even if a ssh session was permanently working).
View attachment 47035 View attachment 47034
Turn on debug logging and capture logs for me please.
 

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!

Staff online

Top