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!

The script randomly stops working after some hours. Here is the output of

before and after it stopped working.
I’m not seeing anything in your nvram on the post issue? That is definitely an issue if your nvram variables are getting wiped out for some reason because the script relies on these variables.
 
Are you running an AC86U by chance?
Yes.
What would wipe my nvram? I don't see any entries related to deleting the nvram values.
Edit:
I uninstalled the script and installed it again.
Output of
nvram show | grep “wan”
is still

Code:
admin@RT-AC86U-9AD0:/tmp/home/root# nvram show | grep “wan”

size: 70546 bytes (60526 left)

admin@RT-AC86U-9AD0:/tmp/home/root#
 
Yes.
What would wipe my nvram? I don't see any entries related to deleting the nvram values.
Edit:
I uninstalled the script and installed it again.
Output of

is still

Code:
admin@RT-AC86U-9AD0:/tmp/home/root# nvram show | grep “wan”

size: 70546 bytes (60526 left)

admin@RT-AC86U-9AD0:/tmp/home/root#
Try without the strange quotes....
Code:
nvram show | grep wan
 
Ah yes, without quotes there is an output. Now, I just have to recreate my issue. I will re-install the script and wait till it stops and post the output.
 
Just wanted to throw that out there, because ever since I've had my AC86U, I've had to deal with script lockups due to "nvram get" calls. Here's a thread about it: https://www.snbforums.com/threads/nvram-get-lookup-causes-script-hang.79188/

So if you're seeing others noting that the script is just "hanging" on them after a few hours, it could be due to this. Again, just a hypothesis.

I’ve noticed a pattern that a lot of issues seem to occur with this model across the board it would seem (not with just my stuff).
 
Ah yes, without quotes there is an output. Now, I just have to recreate my issue. I will re-install the script and wait till it stops and post the output.
Check with and without quotation simultaneously, if they are breaking your script then that is a bigger issue because almost every example of grep search patterns will have the pattern wrapped in quotation.
 
Check with and without quotation simultaneous, if they are breaking your script then that is a bigger issue because almost every example of grep search patterns will have the pattern wrapped in quotation.
There is a difference in the quotes used by the OP
Code:
echo “wan” | hexdump
0000000 80e2 779c 6e61 80e2 0a9d               
000000a
Code:
echo "wan" | hexdump
0000000 6177 0a6e                             
0000004
so this works
Code:
nvram show | grep "wan"
 
There is a difference in the quotes used by the OP
Code:
echo “wan” | hexdump
0000000 80e2 779c 6e61 80e2 0a9d               
000000a
Code:
echo "wan" | hexdump
0000000 6177 0a6e                             
0000004
so this works
Code:
nvram show | grep "wan"

Ahhh yes I’m on my phone typing. Don’t copy paste that command, just type it in. Good catch, I’m not at home atm so trying to help from the phone, lol.
 
Ah, yes, there is a difference in quotes.
This works:
Code:
nvram show | grep "wan"
Also this works:
Code:
nvram show | grep wan
 
Ah, yes, there is a difference in quotes.
This works:
Code:
nvram show | grep "wan"
Also this works:
Code:
nvram show | grep wan
Now that we got past the weird issue with quotes send over a new output after the issue occurs.
 
I am still following this thread…. with high hopes. I am glad there is another AC86U running this. Maybe I can return to this script.
 
I am still following this thread…. with high hopes. I am glad there is another AC86U running this. Maybe I can return to this script.
Yea it seems like everyone running the AC86U is having issues but other models seem to be ok, trying to figure out what is different with this model that would invoke a change. Trying to get the data to work on that as I don't personally own this model. :)
 
Just wanted to throw that out there, because ever since I've had my AC86U, I've had to deal with script lockups due to "nvram get" calls. Here's a thread about it: https://www.snbforums.com/threads/nvram-get-lookup-causes-script-hang.79188/

So if you're seeing others noting that the script is just "hanging" on them after a few hours, it could be due to this. Again, just a hypothesis.
I read that thread and yea, I have a friend local to me that has the AX86U and doesn't experience the same issues as you guys with the AC86U, it does seem like there is an issue with it accessing nvram at times and that could be a symptom but not the root cause.

EDIT: https://www.snbforums.com/threads/my-experience-with-the-rt-ac86u.79290/#post-767946

I read this thread and it sounds like particular model has a lot of issues with thermals, and accessing storage? It may be possible these units are going faulty.
 
Last edited:
I read that thread and yea, I have a friend local to me that has the AX86U and doesn't experience the same issues as you guys with the AC86U, it does seem like there is an issue with it accessing nvram at times and that could be a symptom but not the root cause.

So, what you are saying is I just need to get an AX86U ? :)
 
The script stopped working after about two hours.
In syslog, I see this entries every minute, but this suddenly is stopping:
Code:
Jun 12 19:12:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:12:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
 

Attachments

  • After installation.txt
    8.6 KB · Views: 48
  • Stopped working.txt
    6.5 KB · Views: 46
The script stopped working after about two hours.
In syslog, I see this entries every minute, but this suddenly is stopping:
Code:
Jun 12 19:12:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:12:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xxx.xx dev eth0
Do you have any logging data from when the failure occurred?
 
So, what you are saying is I just need to get an AX86U ? :)
I'd like to think swapping the unit is not the optimal solution here but damn it does seem like this model has a ton of issues around the forums.
 
Do you have any logging data from when the failure occurred?
This is all I see:

Jun 12 18:59:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:00:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:00:02 Skynet: [#] 163412 IPs (+0) -- 9499 Ranges Banned (+0) || 1208 Inbound -- 23 Outbound Connections Blocked! [save] [2s]
Jun 12 19:01:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:01:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:02:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:02:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:03:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:03:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:04:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:04:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:05:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:05:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:06:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:06:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:07:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:07:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:08:00 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:08:00 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:09:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:09:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:10:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:10:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:11:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:11:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:12:01 wan-failover.sh: WAN Status - wan0 enabled
Jun 12 19:12:01 wan-failover.sh: WAN Status - Creating route 8.8.8.8 via 88.116.xx:xx dev eth0
Jun 12 19:52:17 wlceventd: wlceventd_proc_event(527): eth5: Auth 5A:92:FA:5A:xx:xx, status: Successful (0), rssi:0
Jun 12 19:52:17 wlceventd: wlceventd_proc_event(556): eth5: Assoc 5A:92:FA:5A:xx:xx, status: Successful (0), rssi:0
Jun 12 19:52:36 wlceventd: wlceventd_proc_event(508): eth5: Disassoc 24:0A:64:55:xx:xx, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun 12 19:53:40 wlceventd: wlceventd_proc_event(527): eth6: Auth 6C:5A:B0:D0:xx:xx, status: Successful (0), rssi:0
Jun 12 19:53:40 wlceventd: wlceventd_proc_event(556): eth6: Assoc 6C:5A:B0:D0:xx:xx, status: Successful (0), rssi:0
Jun 12 19:53:44 wlceventd: wlceventd_proc_event(508): eth6: Disassoc 6C:5A:B0:D0:xx:xx, status: 0, reason: Disassociated because sending station is leaving (or has left) BSS (8), rssi:0
Jun 12 19:53:44 kernel: br0: received packet on eth6 with own address as source address
Jun 12 19:53:44 wlceventd: wlceventd_proc_event(527): eth6: Auth 6C:5A:B0:D0:xx:xx, status: Successful (0), rssi:0
Jun 12 19:53:44 wlceventd: wlceventd_proc_event(537): eth6: ReAssoc 6C:5A:B0:D0:xx:xx, status: Successful (0), rssi:0
The script entries just stop comming up.
 

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