System Administration Guide: Network Services

How to Check the Response of Hosts on the Network

Check the response of hosts on the network with the ping command.

$ ping hostname

If you suspect a physical problem, you can use ping to find the response time of several hosts on the network. If the response from one host is not what you would expect, you can investigate that host. Physical problems could be caused by the following:

For more information about this command, see ping(1M).

Example 30–1 Checking the Response of Hosts on the Network

The simplest version of ping sends a single packet to a host on the network. If ping receives the correct response, the command prints the message host is alive.

$ ping elvis
elvis is alive

With the -s option, ping sends one datagram per second to a host. The command then prints each response and the time that was required for the round trip. An example follows.

$ ping -s pluto
64 bytes from pluto (123.456.78.90): icmp_seq=0. time=3.82 ms
64 bytes from pluto (123.456.78.90): icmp_seq=5. time=0.947 ms
64 bytes from pluto (123.456.78.90): icmp_seq=6. time=0.855 ms
----pluto PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max/sttdev = 0.855/1.87/3.82/1.7