RE: ping hanging forever

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



both "ping -c5" and "ping -c5 -w5" give an endless supply of:

13:43:20.404258 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:21.400132 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:22.400118 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:23.310074 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:23.400111 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:24.140069 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:24.400128 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:25.590070 > 217.103.244.253 > 217.103.245.56: icmp: echo request
13:43:33.310086 > 217.103.244.253 > 217.103.245.56: icmp: echo request

So both options seem to be ignored.
I've tried it on RedHat 7.0 and 6.0

Peter, or anyone, got any clues left?

Serge Maandag 


> -----Oorspronkelijk bericht-----
> Van: Peter Waechtler [mailto:pwaechtler@loewe-komp.de]
> Verzonden: woensdag 20 juni 2001 13:25
> Aan: Serge Maandag
> CC: Linux-Net (E-mail)
> Onderwerp: Re: ping hanging forever
> 
> 
> 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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux