|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
What should ping do if the remote host is switched off? - should it
hang indefinitely, or timeout? I have two Red Hat Linux machines that behave differently on pinging a host that is down - one hangs indefinitely, and another comes back after a couple of seconds with an error message. (I am yet to play with ping options regarding number of packets, and timeouts, just wondered what default behaviour ought to be, or if it depends on network topology etc) TIA Mark |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> What should ping do if the remote host is switched off? - should it hang
> indefinitely, or timeout? I think the question doesn't apply, as ping is stateless. It sends ICMP echo requests and prints out a line whenever it receives a packet. If the received packet is an ICMP echo reply, it will print the "normal" line. For any other packet (for example, an ICMP host unreachable or ICMP ttl exceeded packet), it will print a corresponding line. And if it doesn't receive any packet, it won't print any line. Mikael |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
mark.bergman@thales-is.com wrote: > I have two Red Hat Linux machines that behave differently on pinging a > host that is down - one hangs indefinitely, and another comes back > after a couple of seconds with an error message. What error does it report? And does it terminate on the error? DS |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
mark.bergman@thales-is.com writes:
> I have two Red Hat Linux machines that behave differently on pinging a > host that is down - one hangs indefinitely, and another comes back > after a couple of seconds with an error message. An educated guess says the first of those two hosts is running a quite old release of RH -- probably 6.x or perhaps 7.x, my memory is fuzzy on exactly when. There was a bug in their ping as distributed then, which caused ping to hang. It caused me grief because some network sanity-checking scripts of mine depended on standard, historical ping behavior of "ping -c3 some.host" in which ping returns with an error result after getting dead air from the down machine. Upgrade. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
In article <1159527243.538337.176550@k70g2000cwa.googlegroups .com>,
mark.bergman@thales-is.com wrote: > What should ping do if the remote host is switched off? - should it > hang indefinitely, or timeout? > > I have two Red Hat Linux machines that behave differently on pinging a > host that is down - one hangs indefinitely, and another comes back > after a couple of seconds with an error message. > > (I am yet to play with ping options regarding number of packets, and > timeouts, just wondered what default behaviour ought to be, or if it > depends on network topology etc) > > TIA > Mark It depends on the ping version and options. With some versions of ping, the default behavior is to send up to 3 packets, and report success if any of them get a response, otherwise report failure. So if the remote host is down, it will return an error message. With others, the default behavior is to send packets until you press control-C, and display details about all the responses received. In this case, if the remote host is down, it won't display anything. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group *** |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
<mark.bergman@thales-is.com> wrote:
> What should ping do if the remote host is switched off? - should it > hang indefinitely, or timeout? Z:\>ping microsoft.com Pinging microsoft.com [207.46.250.119] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 207.46.250.119: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), Z:\>ping google.com Pinging google.com [72.14.207.99] with 32 bytes of data: Reply from 72.14.207.99: bytes=32 time=1618ms TTL=237 Reply from 72.14.207.99: bytes=32 time=283ms TTL=237 Reply from 72.14.207.99: bytes=32 time=637ms TTL=237 Reply from 72.14.207.99: bytes=32 time=540ms TTL=237 Ping statistics for 72.14.207.99: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 283ms, Maximum = 1618ms, Average = 769ms Good luck. - - Jim Carlock Post replies to the group. |
|
![]() |
| Outils de la discussion | |
|
|