Questions tagged [ping]

A tool commonly used to test the reachability of a given host, either on the internet or in a local network.

ping works by sending ICMP packets to the target host and timing the host's response. It also measures connection quality by recording percentage packet loss. The time taken to establish the connection is not taken into account, only the time it takes for the packets themselves to be transferred.

On *nix machines, ping can be run by simply executing

ping example.com

ping also has a partner-in-crime utility - ping6. ping6 essentially works the exact same way as ping, but it uses an IPv6 stack instead of an IPv4 stack. This means that it expects IPv6 addresses, IPv6 DNS records, and will use IPv6 to transfer the ICMP packets.

Both binaries are provided by the iputils package on most of GNU/Linux distributions. Pinging a host known to always respond correctly (such as 8.8.8.8 - one of Google's Public DNS servers) is a common first step in diagnosing network issues.

484 questions
82
votes
4 answers

What could DUP mean when using ping?

What could DUP mean when using ping?
LanceBaynes
  • 39,295
  • 97
  • 250
  • 349
60
votes
3 answers

traceroute gives only stars + how to fix

When I do: $ traceroute 8.8.8.8 I get in the output showing only stars, even though pinging to google.com ( 8.8.8.8) appears to be working. What do I need to fix in my files/conf in order to solve this issue? what I need to check? Ping command…
user58412
57
votes
4 answers

What are the differences between iputils-ping and inetutils-ping?

I'm using a Debian 9 image on a virtual machine. The ping command is not installed. When I run: sudo apt-get install ping It asks me: Package ping is a virtual package provided by: iputils-ping 3:20161105-1 inetutils-ping 2:1.9.4-2+b1 You…
Ortomala Lokni
  • 4,665
  • 3
  • 31
  • 58
43
votes
3 answers

What Linux process is responsible for responding to pings?

I have a Linux based process controller that occasionally locks up to the point where you can't ping it (i.e. I can ping it, then it becomes no longer pingable without any modifications to network settings). I'm curious, what process/system is…
Izzo
  • 999
  • 1
  • 8
  • 15
43
votes
7 answers

Check ping statistics without stopping

Is there a way to tell ping to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view: --- 8.8.8.8 ping statistics --- 2410 packets transmitted, 2274 received, +27 errors, 5% packet loss, time…
2mac
  • 1,005
  • 1
  • 8
  • 16
33
votes
3 answers

What is the difference between ping localhost and ping 127.0.0.1?

After executing the following to disable ping replies: # sysctl net.ipv4.icmp_echo_ignore_all=1 # sysctl -p I obtain different results from pinging localhost vs. 127.0.0.1 # ping -c 3 localhost PING localhost(localhost (::1)) 56 data bytes 64 bytes…
Helio
  • 473
  • 1
  • 4
  • 13
33
votes
1 answer

"/usr/bin/ping" is shown as yellow-on-red in the default Fedora bash color scheme -- what does it mean?

When listing the directory /usr/bin, one sees that ping is shown as yellow-on-red: The file has no special features: $ file /usr/bin/ping /usr/bin/ping: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter…
David Tonhofer
  • 1,371
  • 13
  • 26
31
votes
6 answers

Can one ping a NIC by MAC

I have an NIC card on a Debian machine somewhere. The machine is turned off, but I need to know whether the NIC card is turned on so that I can send a wake-on-lan magic packet later (from another Debian machine) to wake it up. I have the MAC address…
FirstName LastName
  • 555
  • 1
  • 5
  • 12
31
votes
12 answers

How can I ping multiple IP addresses at the same time?

I'm aware of the methods where you can run a Bash for loop and ping multiple servers, is there a Linux CLI tool that I can use which will allow for me to do this without having to resort to writing a Bash script to ping a list of servers one at a…
slm
  • 363,520
  • 117
  • 767
  • 871
30
votes
2 answers

Why does 'ping' not output a summary when redirecting output?

I can ping google.com for several seconds and when I press Ctrl + C, a brief summary is displayed at the bottom: $ ping google.com PING google.com (74.125.131.113) 56(84) bytes of data. 64 bytes from lu-in-f113.1e100.net (74.125.131.113): icmp_seq=2…
ks1322
  • 1,646
  • 15
  • 26
25
votes
4 answers

What is the difference between ping -w and ping -W?

What is the -w (deadline) flag in ping for? I cannot find a description of it in the ping man page; only for -W, which takes seconds as a parameter. What is the difference between them, and how can I set a ping timeout (if host is not responding) to…
Rafael T
  • 815
  • 3
  • 11
  • 16
23
votes
6 answers

Why can't I ping Google?

I can't ping google.com (unknown host). But I can ping IP addresses. I tried to ping the IP address of Google but it doesn't work. resolv.conf nameserver 8.8.8.8 nameserver 209.139.209.33 ifconfig -a eth0 Link encap:Ethernet HWaddr…
az93
  • 857
  • 4
  • 9
  • 9
20
votes
8 answers

Faster way than ping for checking if computer online?

I'm writing a wake on lan script for a set of our lab computers. We have sqlite db with a list of the computer hostnames, IPs, and MACs and currently I ping each of them with '-c1' so it doesn't run endlessly - but even that takes some waiting, is…
Jon Phenow
  • 501
  • 3
  • 7
  • 14
20
votes
6 answers

How can I check that a remote computer is online for ssh / script access?

I'm writing a script that will backup data from my laptop to an Ubuntu server. To do so, I'm looking for a (ba)sh command to test if the server is available before starting the backup. something like ping on port 22 that returns a boolean. How can I…
Amo__
  • 303
  • 1
  • 2
  • 4
18
votes
3 answers

How to Disable Ping Response (ICMP echo) in Linux all the time?

I want to disable ping response all the time on my Ubuntu operating system, the following commands work but only until the system reboots: Ping off: echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all Ping on: echo "0" >…
HardRebootHackerHD
  • 171
  • 1
  • 1
  • 8
1
2 3
32 33