Serge Maandag wrote: > > I'm running a script that's doing a periodic ping to some cisco routers. > > I'm using ping -w 5 to have it bail out in case the host is down / > unreachable. > somehow there are a few ones that are not directly attached that ping > will wait for forever. > I do have a correct route to them. > > Does someone have a clue why the -w option does not work in those cases? > Should the intermediate router be sending icmp unreachables or something > like that? > -w 5 decreases the wait time between two requests If you want ping to stop use "-c 5" and check the return code (which BTW is not documented "my" man page) if ! ping -c5 -w5 $HOST >/dev/null then echo $HOST is down fi - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org