So your prime objective was achieved
Hmm, can you try giving the script two
PING addresses that are expected to
fail and two that should
work
e.g.
Code:
./ChkWAN.sh noaction nowait once fails=1 tries=1 ping=1.2.3.4,6.7.8.9,208.67.222.222,8.8.8.8
So ignoring the fact that
v1.09 script reports the
wrong PING IP when it fails
, can you post the output?
EDIT: v1.10 uploaded to correctly display the PING IP that fails.
Hi,
I tested like you asked with V1.09 like this:
I changed the start method back to 'sh /jffs/scripts/ChkWAN.sh ping=1.2.3.4,2.3.4.5,8.8.8.8,8.8.4.4 &'
If that runs in the background only the first IP is logged as failed, but when I run it as ./wan-start from my telnet window, I DO see the proper IP addresses, so it's probably just the output to the system-log?
This is from my telnet window where it DOES use the different IP addresses in a round robin way:
=================================================================================================================
(ChkWAN.sh): 17996 v1.09 Monitoring WAN connection using 4 target PING hosts (1.2.3.4 2.3.4.5 8.8.8.8 8.8.4.4) (Tries=3)
(ChkWAN.sh): 17996 Monitoring pass 1 out of 3
PING 1.2.3.4 (1.2.3.4): 56 data bytes
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 1.2.3.4 (1.2.3.4): 56 data bytes
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 1.2.3.4 (1.2.3.4): 56 data bytes
admin@Router_Storage:/jffs/scripts#
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
admin@Router_Storage:/jffs/scripts# (ChkWAN.sh): 17996 v1.09 Monitoring WAN connection using PING method to 1.2.3.4 check FAILED
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
(ChkWAN.sh): 17996 v1.09 Monitoring WAN connection using PING method to 1.2.3.4 check FAILED
PING 8.8.8.8 (8.8.8.8): 56 data bytes
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 50.899/50.899/50.899 ms
(ChkWAN.sh): 17996 Monitoring WAN connection OK.....(Successful ping to '8.8.8.8'). Will check WAN again in 30 secs
PING 1.2.3.4 (1.2.3.4): 56 data bytes
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 1.2.3.4 (1.2.3.4): 56 data bytes
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 1.2.3.4 (1.2.3.4): 56 data bytes
ano
--- 1.2.3.4 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
(ChkWAN.sh): 17996 v1.09 Monitoring WAN connection using PING method to 1.2.3.4 check FAILED
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
PING 2.3.4.5 (2.3.4.5): 56 data bytes
--- 2.3.4.5 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
(ChkWAN.sh): 17996 v1.09 Monitoring WAN connection using PING method to 1.2.3.4 check FAILED
PING 8.8.8.8 (8.8.8.8): 56 data bytes
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 40.518/40.518/40.518 ms
(ChkWAN.sh): 17996 Monitoring WAN connection OK.....(Successful ping to '8.8.8.8'). Will check WAN again in 30 secs
=================================================================================================================
By now I see you have uploaded V1.10, so I will install that one now.
Thanks for your work, besides the minor? output issue, your script kept my internet alive several times already
Will report back about V1.10.
Un saludo,
Leo