What's new

WANFailover Dual WAN Failover Script

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

Let's try. so far I see I have more than 1mb per hour spent;) (I also ping from outside once a minute in the hetrixtools.com service

p.s. I configured to ping mts host 178.248.238.27 , I'll see what happens.
I republished with this option, I estimate if you change the default from 56 to 1, you'll reduce the bandwidth usage to 0.016MB per hour. That should take each ICMP echo and response from 64 bytes total to 9 bytes total.
 
I estimate if you change the default from 56 to 1, you'll reduce the bandwidth usage to 0.016MB per hour. That should take each ICMP echo and response from 64 bytes total to 9 bytes total.
Thanks, good ask @VIper_Rus and quick response @Ranger802004 , suspect there will be quite a few of us hoping to use 3G/4G/5G USB sticks as our backup WAN, and usage "overhead" is definitely an issue in many countries where data plans are still expensive and not unlimited.
 
@Ranger802004 does the Dual WAN Failover Script have anything to do with Lan DNS Filter ?


I keep loosing my DNS Filter entries

1658398748960.png



This gets reset, just can't figure out what's happening, everything resets to default once in a while
 
@Ranger802004 does the Dual WAN Failover Script have anything to do with Lan DNS Filter ?


I keep loosing my DNS Filter entries

View attachment 42966


This gets reset, just can't figure out what's happening, everything resets to default once in a while

Possibly, it alters the resolv.conf file during Failover unless you are using AdGuardHome
 
Maybe I don't understand something. remotely restart the wan1 device.

Jul 22 00:37:22 wan-failover.sh: WAN0 Failover Monitor - Monitoring wan0 via 1.1.1.1 for Failure
Jul 22 00:37:22 wan-failover.sh: WAN0 Failover Monitor - Monitoring wan1 via 87.240.139.194 for Failure
Jul 22 00:37:32 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link DOWN.
Jul 22 00:37:37 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link Up at 100 mbps full duplex
Jul 22 00:37:57 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link DOWN.
Jul 22 00:38:04 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link Up at 100 mbps full duplex
Jul 22 00:38:21 wan-failover.sh: Packet Loss Detected - WAN1 Packet Loss: 60%


And that's all. No more messages. And where is the 100% loss on wan1, because the interface is now in cold-state, i.e. not connected by default.
But at the same time, I can manage the device using the internal ip (10.100.2.1), i.e. it is connected, but the asus does not know about it. It's strange how

p.s. Is it not possible for the packet size of wan0 and wan1 to be configured separately?
 
Last edited:
Maybe I don't understand something. remotely restart the wan1 device.

Jul 22 00:37:22 wan-failover.sh: WAN0 Failover Monitor - Monitoring wan0 via 1.1.1.1 for Failure
Jul 22 00:37:22 wan-failover.sh: WAN0 Failover Monitor - Monitoring wan1 via 87.240.139.194 for Failure
Jul 22 00:37:32 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link DOWN.
Jul 22 00:37:37 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link Up at 100 mbps full duplex
Jul 22 00:37:57 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link DOWN.
Jul 22 00:38:04 kernel: eth5 (Ext switch port: 7) (Logical Port: 15) (phyId: 1e) Link Up at 100 mbps full duplex
Jul 22 00:38:21 wan-failover.sh: Packet Loss Detected - WAN1 Packet Loss: 60%


And that's all. No more messages. And where is the 100% loss on wan1, because the interface is now in cold-state, i.e. not connected by default.
But at the same time, I can manage the device using the internal ip (10.100.2.1), i.e. it is connected, but the asus does not know about it. It's strange how

p.s. Is it not possible for the packet size of wan0 and wan1 to be configured separately?
If you send me debug logs from WAN Failover I can tell you why it says that, it should grab the State of the WAN Interfaces to determine that.

EDIT: I made one packet size option for simplicity, because it is ICMP I didn't think it was necessary to have 2 separate settings.
 
Last edited:
Is anyone still running this on an RT-AC86U, as I am curious if the issues related to these units was resolved?
 
Last edited:
Is anyone still running this on an RT-AC86U, as I am curious if the issues related to these units was resolved?
Since I put in the NVRAM check function I haven't heard of anyone having that issue but I can't 100% guarantee it is resolved.
 
Possibly, it alters the resolv.conf file during Failover unless you are using AdGuardHome

Nope, I don't use Adguard.

How can I avoid going through this every time
 
Nope, I don't use Adguard.

How can I avoid going through this every time
I’ll fix it where it won’t interrupt those, I need an nvram dump from you though if you want to DM that to me
 
I’ll fix it where it won’t interrupt those, I need an nvram dump from you though if you want to DM that to me
Np, I can do that, but what's the command
 
Np, I can do that, but what's the command

Delete out private info you don’t want to send. Send me the the list of DNS servers you use as well. Make sure they are configured before you send
Code:
nvram show
 
Delete out private info you don’t want to send. Send me the the list of DNS servers you use as well. Make sure they are configured before you send
Code:
nvram show
Done, DNS is already configured

1658464634524.png
 
So, I just switched ISPs to take advantage of a really good deal, but before dumping the old ISP I wanted to see how the new connection did. Of course, I installed your script. I was a bit baffled by some of the installation questions. Perhaps you could put some decent default values in your documentation. Well, things didn't seem to go as I expected so I tried to do the uninstall. Uninstall did not remove the script, nor did it remove the cron job line - just letting you know. RM to the rescue.
 
So, I just switched ISPs to take advantage of a really good deal, but before dumping the old ISP I wanted to see how the new connection did. Of course, I installed your script. I was a bit baffled by some of the installation questions. Perhaps you could put some decent default values in your documentation. Well, things didn't seem to go as I expected so I tried to do the uninstall. Uninstall did not remove the script, nor did it remove the cron job line - just letting you know. RM to the rescue.

What error did you receive on uninstall? I haven’t had another report of an uninstall issue in awhile so any feedback would be great. The readme goes over the optional configuration, the next beta is going to be moving a lot if these items to just apply a default value and make them adjustable.
 
There weren't any errors. That was why I was surprised to see the script still there. It did say something about doing something in the /var/... something directory. Not sure why it would go there.
 
There weren't any errors. That was why I was surprised to see the script still there. It did say something about doing something in the /var/... something directory. Not sure why it would go there.
Deleting the lock file under /var/lock, it should have done and that removed the cron job as well as remove it from wan-event. It doesn’t delete the actual script file. The existence of the script file doesn’t mean it is installed.
 
So @Ranger802004 ... I tried hooking an android phone up to my router, using stock mode, and I basically experienced the same behavior as when I had a 4G modem attached. Failover mode would just stay in "cold standby", even after I turned the main WAN off. When I put it in load balancing mode, at least it got an IP and said it was "connected". However, when I turned the main WAN off, eventhough the secondary WAN said it was connected, I could not browse the internet. The thing that kinda concerns me is that its DNS IP address is the local Android device... and it also said it was using DoT, which I'm assuming is coming over from my main WAN connection? Could this be preventing DNS from working right, and using the load balanced connection? I wanted to just try the basics before playing with your script again...
 
So @Ranger802004 ... I tried hooking an android phone up to my router, using stock mode, and I basically experienced the same behavior as when I had a 4G modem attached. Failover mode would just stay in "cold standby", even after I turned the main WAN off. When I put it in load balancing mode, at least it got an IP and said it was "connected". However, when I turned the main WAN off, eventhough the secondary WAN said it was connected, I could not browse the internet. The thing that kinda concerns me is that its DNS IP address is the local Android device... and it also said it was using DoT, which I'm assuming is coming over from my main WAN connection? Could this be preventing DNS from working right, and using the load balanced connection? I wanted to just try the basics before playing with your script again...

Send me the debug logging so I can take a look at what is going on, this is the first test I have had with USB devices after my iteration of fixes in the current beta
 
Deleting the lock file under /var/lock, it should have done and that removed the cron job as well as remove it from wan-event. It doesn’t delete the actual script file. The existence of the script file doesn’t mean it is installed.
But it didn't remove the cron entry - I did it by hand.
 

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