System Administration Guide

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:

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

Examples--Checking the Response of Hosts on the Network

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


$ ping elvis
elvis is alive

With the -s option, ping sends one datagram per second to a host. It then prints each response and the time it took for the round trip. For example:


$ ping -s pluto
64 bytes from pluto (123.456.78.90): icmp_seq=0. time=10. ms
64 bytes from pluto (123.456.78.90): icmp_seq=5. time=0. ms
64 bytes from pluto (123.456.78.90): icmp_seq=6. time=0. ms
^C
----pluto PING Statistics----
8 packets transmitted, 8 packets received, 0% packet loss
 
round-trip (ms) min/avg/max = 0/2/10