ping command is not printing result to the console

user583819 asked:

When I am trying to ping the server, the output of ping command is not coming to the console.

[email protected]:~#ping ksr-india01
PING ksr-india01.uit.com (10.105.34.184) 56(84) bytes of data.
^C
--- ksr-india01.uit.com  ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 5999ms

if you see until i pressed the ctrl+c , no output came. I believe that even though server is unreachable then also ping should print the some info. Something like this

Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6

but it is not printing. Can anyone please tell me what is the setting I am missing

My answer:


This is normal behavior.

The Linux version of ping does not print any output if there is no reply or ICMP error response to the ping. Nor is there an option to cause it to print any such reply.

Note that ping will print a line if an ICMP error is returned from a router somewhere on the network, but you are not guaranteed to receive this ICMP error reply if the remote host is not on your LAN; any router between you and the destination may drop it, or it might not have been generated at all.

The Windows version of ping does print a line if the request times out. Perhaps this is where you have seen such a thing before?


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.