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!

1. No I don't monitor bandwidth.
2. You can set ping timeout to 1 second and 3000ms pings would be considered packet loss.
OK. then I understood your script and readme correctly.

I thought I leverage the 1 second timeouts and max. ICMP package size.

Question: it's possible to define a packet loss amount? Percentage or amount or something similar, to define down state

Feature request: Switch from seconds to milliseconds scheme :)
 
OK. then I understood your script and readme correctly.

I thought I leverage the 1 second timeouts and max. ICMP package size.

Question: it's possible to define a packet loss amount? Percentage or amount or something similar, to define down state

Feature request: Switch from seconds to milliseconds scheme :)
The % calculated is based on how many pings are dropped so if you are doing a PINGCOUNT of 6 and 1 is missed, that will be flagged as 16% loss, etc.

The ping build on the firmware doesn't have a millisecond option but for a later release I have been looking into tracking the ms and adding an option for setting a max average.
 
The % calculated is based on how many pings are dropped so if you are doing a PINGCOUNT of 6 and 1 is missed, that will be flagged as 16% loss, etc.

The ping build on the firmware doesn't have a millisecond option but for a later release I have been looking into tracking the ms and adding an option for setting a max average.
1. Which variable I can define 50% (1-100%) packet loss should be considered as WAN down state?

2. Network Tools - Network Analysis - may use another ping binary:
PING www.google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=57 time=38.474 ms
64 bytes from 216.239.38.120: seq=1 ttl=57 time=38.397 ms
64 bytes from 216.239.38.120: seq=2 ttl=57 time=38.246 ms
64 bytes from 216.239.38.120: seq=3 ttl=57 time=38.307 ms
64 bytes from 216.239.38.120: seq=4 ttl=57 time=38.278 ms

--- www.google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 38.246/38.340/38.474 ms
 
Last edited:
1. Which variable I can define 50% (0-99%) packet loss should be considered as WAN down state?

2. Network Tools - Network Analysis - may use another ping binary:
PING www.google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=57 time=38.474 ms
64 bytes from 216.239.38.120: seq=1 ttl=57 time=38.397 ms
64 bytes from 216.239.38.120: seq=2 ttl=57 time=38.246 ms
64 bytes from 216.239.38.120: seq=3 ttl=57 time=38.307 ms
64 bytes from 216.239.38.120: seq=4 ttl=57 time=38.278 ms

--- www.google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 38.246/38.340/38.474 ms
if you really want to ping it, and ping it hard we can add a custom size.

Code:
ping -c 6 -s 65500 www.google.com
PING www.google.com (216.239.38.120): 65500 data bytes
 
if you really want to ping it, and ping it hard we can add a custom size.

Code:
ping -c 6 -s 65500 www.google.com
PING www.google.com (216.239.38.120): 65500 data bytes
PACKETSIZE is a configuration option in my script lol
 
1. Which variable I can define 50% (0-99%) packet loss should be considered as WAN down state?

2. Network Tools - Network Analysis - may use another ping binary:
PING www.google.com (216.239.38.120): 56 data bytes
64 bytes from 216.239.38.120: seq=0 ttl=57 time=38.474 ms
64 bytes from 216.239.38.120: seq=1 ttl=57 time=38.397 ms
64 bytes from 216.239.38.120: seq=2 ttl=57 time=38.246 ms
64 bytes from 216.239.38.120: seq=3 ttl=57 time=38.307 ms
64 bytes from 216.239.38.120: seq=4 ttl=57 time=38.278 ms

--- www.google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 38.246/38.340/38.474 ms
I'm trying to work within the stock binaries as much as possible.
 
Hi,
On latest v1.5.6-beta12 I am flooded with WAN Failover Notification, even the secondary WAN is Hot-Standby:

Code:
WAN0 Status: CONNECTED
WAN1 Status: DISCONNECTED
 
Hi,
On latest v1.5.6-beta12 I am flooded with WAN Failover Notification, even the secondary WAN is Hot-Standby:

Code:
WAN0 Status: CONNECTED
WAN1 Status: DISCONNECTED
I will need debug logs to diagnose the issue
 
I'm trying to work within the stock binaries as much as possible.
Perfect, since I believe this is in stock firmware since decades.

Navigate via web gui to network tools or via ssh open a shell.

Both way return standard ping with milliseconds.

Which point I exactly miss?
 
Perfect, since I believe this is in stock firmware since decades.

Navigate via web gui to network tools or via ssh open a shell.

Both way return standard ping with milliseconds.

Which point I exactly miss?

The echo/responses are measured in milliseconds and the timeout parameter is specified in seconds. I am going to consider down the road adding in the ms as a factor to be measured but not for v1.5.6
 
The echo/responses are measured in milliseconds and the timeout parameter is specified in seconds. I am going to consider down the road adding in the ms as a factor to be measured but not for v1.5.6
Perfect.

No rush.

I love your work.
 
I will need debug logs to diagnose the issue
Thank you for reply.
Please, how can I put the script into debugging mode?
Because I see only logs from the booting time.
I mention I have syslogng for logging with logging file in opt var log messages

Thank you!
 
v1.5.6-beta12 notifications configured via amtm are not coming, although test notifications are coming.
 

Attachments

  • Снимок экрана 2022-08-09 12:32:47.png
    Снимок экрана 2022-08-09 12:32:47.png
    17.1 KB · Views: 45
I pulled out a 4g modem from my wan1 device, every 15 seconds I began to receive a letter about the failure of wan1. Those. not one mail will come, but an infinite number until wan1 is restored;)
 
Last edited:

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