TransWikia.com

ping command is not printing result to the console

Server Fault Asked by user583819 on November 4, 2021

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

ads@3290:~#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

One 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?

Answered by Michael Hampton on November 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP