What's new

Dual WAN Failover ***v2 Release***

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

Code:
/jffs/scripts/wan-failover.sh update
wan-failover is up to date - Version: v2.0.0-beta5
***Checksum Failed***
Current Checksum: 880cda04e7117b98081749691c3dbf9685887e21cca4608b7e2fbae6137ed88c  Valid Checksum: d6a1712dcb20de6b7065e23f30d6dbb06fc5ea74d6a3b7bfca7bc361d8532943
wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta5? ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has reinstalled version: v2.0.0-beta5
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 6381
wan-failover: Restart - Killed wan-failover Process ID: 6381
wan-failover: Restart - Killing wan-failover Process ID: 6382
wan-failover: Restart - Killed wan-failover Process ID: 6382
wan-failover: Restart - Killing wan-failover Process ID: 17347
wan-failover: Restart - Killed wan-failover Process ID: 17347
wan-failover: Restart - Killing wan-failover Process ID: 17348
wan-failover: Restart - Killed wan-failover Process ID: 17348
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 7047 7049
Successfully Restarted wan-failover Process ID(s): 7047,7049
/jffs/scripts/wan-failover.sh: line 5954: syntax error: unterminated quoted string
 
Code:
/jffs/scripts/wan-failover.sh update
wan-failover is up to date - Version: v2.0.0-beta5
***Checksum Failed***
Current Checksum: 880cda04e7117b98081749691c3dbf9685887e21cca4608b7e2fbae6137ed88c  Valid Checksum: d6a1712dcb20de6b7065e23f30d6dbb06fc5ea74d6a3b7bfca7bc361d8532943
wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta5? ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has reinstalled version: v2.0.0-beta5
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 6381
wan-failover: Restart - Killed wan-failover Process ID: 6381
wan-failover: Restart - Killing wan-failover Process ID: 6382
wan-failover: Restart - Killed wan-failover Process ID: 6382
wan-failover: Restart - Killing wan-failover Process ID: 17347
wan-failover: Restart - Killed wan-failover Process ID: 17347
wan-failover: Restart - Killing wan-failover Process ID: 17348
wan-failover: Restart - Killed wan-failover Process ID: 17348
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 7047 7049
Successfully Restarted wan-failover Process ID(s): 7047,7049
/jffs/scripts/wan-failover.sh: line 5954: syntax error: unterminated quoted string
Yea I'm not sure why your router has that issue, I've searched and searched and don't see it and I have no other reports of it.
 
Published some minor clean up of syntax and adjustments regarding WAN0IFNAME and WAN1IFNAME variables and published as beta6.
 
Update from V2.0.0-beta5 to V2.0.0-beta6, appears to be working, different line error in the last part of the script:

Code:
ASUSWRT-Merlin RT-AX88U 386.8_0 Sat Aug 13 20:54:16 UTC 2022
admin@XXAX88U:/tmp/home/root# /jffs/scripts/wan-failover.sh update
***Dev Mode is Enabled***
wan-failover is out of date - Current Version: v2.0.0-beta5 Available Version: v2.0.0-beta6
Do you want to update to the latest beta version? v2.0.0-beta6 ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has been updated to version: v2.0.0-beta6
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 6596
wan-failover: Restart - Killed wan-failover Process ID: 6596
wan-failover: Restart - Killing wan-failover Process ID: 6597
wan-failover: Restart - Killed wan-failover Process ID: 6597
wan-failover: Restart - Killing wan-failover Process ID: 7047
wan-failover: Restart - Killed wan-failover Process ID: 7047
wan-failover: Restart - Killing wan-failover Process ID: 7049
wan-failover: Restart - Killed wan-failover Process ID: 7049
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 7303 7304
Successfully Restarted wan-failover Process ID(s): 7303,7304
/jffs/scripts/wan-failover.sh: line 5949: PRIORITY: parameter not set
admin@XXAX88U:/tmp/home/root#
 
Minor addition to v2.0.0-beta6 that will create an additional IP Route in each WAN specific routing table for the Target IPs accordingly, this is in addition to the script already creating default routes in each of these tables.
 
Code:
ASUSWRT-Merlin RT-AX88U 386.8_0 Sat Aug 13 20:54:16 UTC 2022
admin@XXAX88U:/tmp/home/root# /jffs/scripts/wan-failover.sh update
wan-failover is up to date - Version: v2.0.0-beta6
***Checksum Failed***
Current Checksum: 92ae59b32ef4bf5abe6548ef7f072385655b28f8c9835ba1768ba12c30e4291e  Valid Checksum: 7f0f22cae20ff65fbefc0d58ea37509194748e135f3a1ad2b57de4f0cb4a8bc6
wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta6? ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has reinstalled version: v2.0.0-beta6
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 7303
wan-failover: Restart - Killed wan-failover Process ID: 7303
wan-failover: Restart - Killing wan-failover Process ID: 7304
wan-failover: Restart - Killed wan-failover Process ID: 7304
wan-failover: Restart - Killing wan-failover Process ID: 8435
wan-failover: Restart - Killed wan-failover Process ID: 8435
wan-failover: Restart - Killing wan-failover Process ID: 8436
wan-failover: Restart - Killed wan-failover Process ID: 8436
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 9654 9656
Successfully Restarted wan-failover Process ID(s): 9654,9656
/jffs/scripts/wan-failover.sh: line 5949: SBSTATE: parameter not set
admin@XXAX88U:/tmp/home/root#
 
Current Checksum: 92ae59b32ef4bf5abe6548ef7f072385655b28f8c9835ba1768ba12c30e4291e Valid Checksum: 7f0f22cae20ff65fbefc0d58ea37509194748e135f3a1ad2b57de4f0cb4a8bc6 wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta6? ***Enter Y for Yes or N for No*** > Y
Yep I got that too - seemed to fix itself after I forced another update?
 
Yep I got that too - seemed to fix itself after I forced another update?
That is because I changed the code so it was failing checksum with the available code on the repo ( don’t match).
 
Hello @Ranger802004
I tested your last script on AC86U and AC68U with firmware 386.9 and didn't work.
Someone tried the script on the same models as me ?

I'm searching buying AX88U :(
 
Hello @Ranger802004
I tested your last script on AC86U and AC68U with firmware 386.9 and didn't work.
Someone tried the script on the same models as me ?

I'm searching buying AX88U :(
If you’re having lock ups try turning on Check NVRAM.
 
Hello @Ranger802004
I tested your last script on AC86U and AC68U with firmware 386.9 and didn't work.
Someone tried the script on the same models as me ?

I'm searching buying AX88U :(

Works like a charm on my AC86U from inception. Just minor bugs that @Ranger802004 took care of relatively quickly. Note I use mine configured in HA mode active/passive, not load balancing active/active.
 
Works like a charm on my AC86U from inception. Just minor bugs that @Ranger802004 took care of relatively quickly. Note I use mine configured in HA mode active/passive, not load balancing active/active.
I am considering forcing AC86U to have NVRAM checks on since it is highly prone to the stuck commands issue.
 
I just got my new AX86U delivered today and tried the beta 6 of this script. The failover to 2nd WAN is working, but recovery back to primary WAN doesn’t work automatically. I have to do the switch back manually. And the log capture showing strange error “WAN Failover is currently disabled”. Where the status shows it is enabled

Attached is the log and the script status when it was on 2nd WAN.

Is there anything wrong? The only other 2 script I have are FlexQOS and Adguard Home

8F80B6CC-E7EF-45EC-805D-1B5788E4C21C.jpeg

F7B84AB2-3687-4A1E-949D-C139AAF3BF4F.jpeg
 
I just got my new AX86U delivered today and tried the beta 6 of this script. The failover to 2nd WAN is working, but recovery back to primary WAN doesn’t work automatically. I have to do the switch back manually. And the log capture showing strange error “WAN Failover is currently disabled”. Where the status shows it is enabled

Attached is the log and the script status when it was on 2nd WAN.

Is there anything wrong? The only other 2 script I have are FlexQOS and Adguard Home

View attachment 48420
View attachment 48422
This seems similar with my case when the WAN0 got 100% packet loss after it got down and the ping stopped working. @Ranger802004


@wolvenstein when this happens. Restarting Wan-Failover using the option should make the WAN0 ping work again and it should move it back to WAN0. Also what happened with the internet? Did you try it on purpose? Or was it actually down? Did you unplug the wan connection for the WAN0? Or did you just make the internet stop without the WAN port actually getting unplugged? (Let's say you unplugged the coax of the modem. The modem itself is still on and connected to the router but the internet just goes down)
 
This seems similar with my case when the WAN0 got 100% packet loss after it got down and the ping stopped working. @Ranger802004


@wolvenstein when this happens. Restarting Wan-Failover using the option should make the WAN0 ping work again and it should move it back to WAN0. Also what happened with the internet? Did you try it on purpose? Or was it actually down? Did you unplug the wan connection for the WAN0? Or did you just make the internet stop without the WAN port actually getting unplugged? (Let's say you unplugged the coax of the modem. The modem itself is still on and connected to the router but the internet just goes down)

For testing purpose, I switch off one of my internet modem to see if the router will failover to my 2nd internet. And then switch on that modem again, but the router unable to switch back to it.

And yes, I noticed restarting the script do the trick. It will switch back to the primary internet connection
 
For testing purpose, I switch off one of my internet modem to see if the router will failover to my 2nd internet. And then switch on that modem again, but the router unable to switch back to it.

And yes, I noticed restarting the script do the trick. It will switch back to the primary internet connection
Yeah. Does it fail to fallback if you keep the modem turned on and connected. But you cut the internet off by for example unplugging the coaxial cable?
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top