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!

Access Internet KO.
Here the status of the Dual WAN :
  1. Primary WAN : Disconnected
  2. Secondary WAN : Cold-Standby
 
Last edited:
Can you enable debug logging and run capture mode in wan-failover while this is going on so you can capture logs. Thanks
 
Hi @Ranger802004, Please find attached the logs (Logs1.txt).
Here the logs when I switched manually from wan secondary to wan primary :

May 5 07:10:20 wan-failover.sh: WAN Switch - Switching wan1 to Primary WAN
May 5 07:10:20 wan-failover.sh: WAN Switch - Deleting default route via 192.168.3.1 dev eth0
May 5 07:10:20 wan-failover.sh: WAN Switch - Deleted default route via 192.168.3.1 dev eth0
May 5 07:10:20 wan-failover.sh: WAN Switch - Adding default route via 192.168.1.1 dev vlan3
May 5 07:10:20 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.1.1 dev vlan3
May 5 07:10:20 wan-failover.sh: Debug - Function: getwanparameters
May 5 07:10:20 wan-failover.sh: Debug - Setting parameters for wan1
May 5 07:10:20 wan-failover.sh: Debug - Outbound Bandwidth:
May 5 07:10:20 wan-failover.sh: Debug - Inbound Bandwidth:
May 5 07:10:20 wan-failover.sh: Debug - QoS Overhead: 0
May 5 07:10:20 wan-failover.sh: Debug - QoS ATM: 0
May 5 07:10:20 wan-failover.sh: Debug - QoS is Disabled
May 5 07:10:21 wan-failover.sh: WAN Switch - Deleting default route via 192.168.3.1 dev eth0
May 5 07:10:21 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.3.1 dev eth0
May 5 07:10:21 wan-failover.sh: WAN Switch - Adding default route via 192.168.1.1 dev vlan3
May 5 07:10:21 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.1.1 dev vlan3
May 5 07:10:21 wan-failover.sh: Debug - Function: getwanparameters
May 5 07:10:21 wan-failover.sh: Debug - Setting parameters for wan1
May 5 07:10:21 wan-failover.sh: Debug - Outbound Bandwidth:
May 5 07:10:21 wan-failover.sh: Debug - Inbound Bandwidth:
May 5 07:10:21 wan-failover.sh: Debug - QoS Overhead: 0
May 5 07:10:21 wan-failover.sh: Debug - QoS ATM: 0
May 5 07:10:22 wan-failover.sh: Debug - QoS is Disabled
May 5 07:10:23 wan-failover.sh: WAN Switch - Deleting default route via 192.168.3.1 dev eth0
May 5 07:10:23 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.3.1 dev eth0
May 5 07:10:23 wan-failover.sh: WAN Switch - Adding default route via 192.168.1.1 dev vlan3
May 5 07:10:23 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.1.1 dev vlan3
May 5 07:10:23 wan-failover.sh: Debug - Function: getwanparameters
May 5 07:10:23 wan-failover.sh: Debug - Setting parameters for wan1
May 5 07:10:23 wan-failover.sh: Debug - Outbound Bandwidth:
May 5 07:10:23 wan-failover.sh: Debug - Inbound Bandwidth:
May 5 07:10:23 wan-failover.sh: Debug - QoS Overhead: 0
May 5 07:10:23 wan-failover.sh: Debug - QoS ATM: 0
May 5 07:10:23 wan-failover.sh: Debug - QoS is Disabled
May 5 07:10:24 wan-failover.sh: WAN Switch - Deleting default route via 192.168.3.1 dev eth0
May 5 07:10:24 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.3.1 dev eth0
May 5 07:10:24 wan-failover.sh: WAN Switch - Adding default route via 192.168.1.1 dev vlan3
May 5 07:10:24 wan-failover.sh: WAN Switch - ***Error*** Unable to delete default route via 192.168.1.1 dev vlan3
May 5 07:10:24 wan-failover.sh: Debug - Function: getwanparameters
May 5 07:10:24 wan-failover.sh: Debug - Setting parameters for wan1
May 5 07:10:24 wan-failover.sh: Debug - Outbound Bandwidth:
May 5 07:10:24 wan-failover.sh: Debug - Inbound Bandwidth:
May 5 07:10:24 wan-failover.sh: Debug - QoS Overhead: 0
May 5 07:10:24 wan-failover.sh: Debug - QoS ATM: 0
May 5 07:10:24 wan-failover.sh: Debug - QoS is Disabled
May 5 07:10:24 wan: finish adding multi routes
 

Attachments

  • Logs1.txt
    48.3 KB · Views: 39
Hello guys, I have discovered some additional bugs that may cause the script to hang in certain conditions and am actively working on them to resolve, hoping to have an update out by today.
Just a follow up guys I am doing a major optimization overhaul and will be releasing soon, had quite a few bugs to iron out but the script will be extremely more efficient once I publish, thanks for your patience.
 
I appreciate your work on this. I will definitely try it out again. Its probably not possible to do, but requesting if the load balancing option can be use with QoS enabled. Again, I doubt this can be enabled due to close source but thought I asked. Thanks again for this.
 
Just a follow up guys I am doing a major optimization overhaul and will be releasing soon, had quite a few bugs to iron out but the script will be extremely more efficient once I publish, thanks for your patience.
I am very close to a new release and went ahead and decide with the major overhauls to the script and enhancements I will soon be deprecating v1.6 and launching a new v2.0. I expect to release my first beta on this possibly this weekend.
 
Just a follow up guys I am doing a major optimization overhaul and will be releasing soon, had quite a few bugs to iron out but the script will be extremely more efficient once I publish, thanks for your patience.

Thanks @Ranger802004 - haven't been able to update/test anything due to LIFE, but looking forward to the new beta/release soon.

Cheers
 
Thanks @Ranger802004 - haven't been able to update/test anything due to LIFE, but looking forward to the new beta/release soon.

Cheers
No worries, I didn’t make it to release for this weekend but I’m just cleaning up loose ends at this point and am extremely close to release. Because there is a significant amount of changes I’m going through a thorough inspection of the code and other little minor fixes I’m applying.
 
 
WAN Failover is designed to replace the factory ASUS WAN Failover functionality, this script will monitor the WAN Interfaces using a Target IP Address and pinging these targets to determine when a failure occurs. When a failure is detected in Failover Mode, the script will switch to the Secondary WAN interface automatically and then monitor for failback conditions. When the Primary WAN interface connection is restored based on the Target IP Address, the script will perform the failback condition and switch back to Primary WAN.

Hey - it's been years since I used Merlin so pardon me if this is obvious, but can we configure some kind of notification when failover/failback occurs? I'm using default firmware on an ASUS BRT-AC828 and it doesn't inform you when it switches, so you can continue merrily using your backup 4G until it is gone and you have to troubeshoot without connectivity...
 
Hey - it's been years since I used Merlin so pardon me if this is obvious, but can we configure some kind of notification when failover/failback occurs? I'm using default firmware on an ASUS BRT-AC828 and it doesn't inform you when it switches, so you can continue merrily using your backup 4G until it is gone and you have to troubeshoot without connectivity...
This script is designed to work with Merlin only.
 
This script is designed to work with Merlin only.
Oh I understand that - I was just explaining that my lack of recent experience with Merlin may be why I don't already know whether or not it can send some kind of notification.
I can switch our router over to Merlin if necessary. I'll probably buy a second router to keep the first as a hot standby as it's running a small online business, but I won't have any problem installing Merlin.

EDIT and I now see there are more recent threads about this script anyway - sorry, I'll go read them!
 
Oh I understand that - I was just explaining that my lack of recent experience with Merlin may be why I don't already know whether or not it can send some kind of notification.
I can switch our router over to Merlin if necessary. I'll probably buy a second router to keep the first as a hot standby as it's running a small online business, but I won't have any problem installing Merlin.

EDIT and I now see there are more recent threads about this script anyway - sorry, I'll go read them!
No worries, yes there are notifications for failover events via email using amtm or AIProtection email config.
 
I just got this going yesterday, very easy install and setup, and working perfectly in my tests so far.
One thing I can't figure out (and I must be missing something simple) - where do I set the email address for notifications? Do I need to put this in a config file somewhere? The menu selection for this seems to just turn it on.
 
I just got this going yesterday, very easy install and setup, and working perfectly in my tests so far.
One thing I can't figure out (and I must be missing something simple) - where do I set the email address for notifications? Do I need to put this in a config file somewhere? The menu selection for this seems to just turn it on.
it relies on amtm email configuration or alternatively AI Protection email alerts configuration.
 
Hello,
I have an ASUS 4g-AX56 with official firmware as it seems that the Merlin one is not compatible with this version (and I didn't find any alternative firmware compatible with this model). And the failover doesn't work (primary wan says disconnected but 4g connection remains in hot-standby or cold-standby). So is it possible to use this script in this condition? Thanks a lot for your answer.
 
If you have SSH access on stock firmware, you can give it a try.
 
If you have SSH access on stock firmware, you can give it a try.
I have access to the router with SSH but when I enter the installation code in my SSH client, nothing happened. I don't think it is possible to use it with the stock firmware like written above. If I did something wrong or you have any idea, it will be great for me. Thank you.

Edit: after creating manually a folder "scripts" in the already existing folder jffs, I can execute the script. I also removed the -s option and I can see "Getting System Settings..." but nothing happened after...
 
Last edited:
Maybe someone could suggest some settings. I have starlink as main, dsl as secondary. Really the only time it needs to kick over is during storms. Issue is starlink may go up and down losing signal through heavy rain every 30 seconds. So the script
is constantly switching from wan0-wan1, which basically makes the internet unusable during a heavy storms unless I manually switch it over to wan1. Hope this makes sense.
 
Hi all!

In general, we can say that this functionality works very poorly for Asus. Sometimes it’s reliable, sometimes it’s disgusting.

1. At one time I had a WAN (IPOE) + USB GSM Modem configuration - it worked so-so.
2. Then I found an almost 99% working configuration of WAN (IPOE) + LAN4 (STATIC IP) - it worked perfectly almost 99% of the time, although for such purposes I had to use the old DIR300 (Oleg's firmware) in Router mode by connecting a USB modem to it.

3. About six months ago, I connected a second provider in WAN mode (PPPoE) for 1 Gbit, and transferred the previous IPOE provider to LAN4........ and in almost 50% of cases, ASus chose Secondary LAN4 as my main Internet, at the same time, the WAN connection with the provider via PPPoE was successful.
For some reason, the Failover mechanism did not work back in case of successful verification of Internet access on the WAN (PPPoE).

The solution was to use the Dual WAN Failover Script...At the moment, a month has passed and I can say that the solution with script is very reliable and correct in operation.

Thanks to the developer for the solution!

1706619644017.png
 

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