dannyxyz / wanfailoverscript

Automatically exported from code.google.com/p/wanfailoverscript
0 stars 0 forks source link

doesn't work as expected #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've tested your fine script and found two major issues with it

1. It will just "bounce" between gateways for me. As I see it, script will test 
for availability with icmp but as it fails on primary gw targets are once again 
reachable from secondary and the script once again switch to primary!? Are you 
sure you can test without -I ping command option and get desired behavior?

2. Default value of MAX_LATENCY is total overkill, ping will just stall if
default gw isn't available on primary interface which is most probable cause of 
failure.

Best regards,

Nikola

Original issue reported on code.google.com by nbjeli...@gmail.com on 29 Nov 2012 at 9:50

GoogleCodeExporter commented 9 years ago
Strange, this script is running in production on multiple hosts for years.

Can you please test with the previous version?

The script specifically creates static routes to the target hosts, so when 
switching to the backup link, those target hosts won't be pingable as long as 
the primary link is down. 

I do not understand your second remark about MAX_LATENCY. This is how long PING 
will wait untill the response is considered timed-out. 

Original comment by Louwrentius on 3 Dec 2012 at 6:38

GoogleCodeExporter commented 9 years ago
The MAX_LATENCY value is incorrectly stated in miliseconds but it actually 
works in seconds. So 1000 seconds is a bit too much. This must be changed and 
is a bug.

Original comment by Louwrentius on 3 Dec 2012 at 6:43

GoogleCodeExporter commented 9 years ago
Checking a .target host that's visible only from primary link is very narrow 
condition in my opinion Maybe simply ping -I $PRIMARY_INT would be more useful, 
also maybe some other other checks like dig -b $PRIMARY_IP ....
Hping utility could be perfect for a comprehensive check!

Original comment by nbjeli...@gmail.com on 4 Dec 2012 at 12:05

GoogleCodeExporter commented 9 years ago
This script does not and will never rely on non-standard third-party tools. 
This is by design.

Original comment by Louwrentius on 12 Aug 2013 at 9:46