问题原文
原帖链接 · user583819 · CC BY-SA 4.0
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
已采纳解答
原帖链接 · Michael Hampton · CC BY-SA 4.0
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?
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
