Manual Pages
Table of Contents
ping - send ICMP ECHO_REQUEST packets to network hosts
ping [ -s ] [ -Rrv ] host [ packetsize [ count ] ]
ping uses the ICMP protocol's mandatory ECHO_REQUEST
datagram to elicit an ICMP ECHO_RESPONSE from the specified
host or gateway. ECHO_REQUEST datagrams have an IP and ICMP
header, followed by a struct timeval and then an arbitrary
number of bytes used to fill out the packet. If host
responds, ping prints "host is alive." Otherwise, ping will
resend the ECHO_REQUEST once a second. If the host does not
respond after count seconds (default value is 20), ping will
print "no answer from host."
When the -s flag is specified, ping sends one datagram per
second and prints one line of output for every ECHO_RESPONSE
that it receives. ping computes the round-trip times and
packet loss statistics. When the count number of packets
have been sent or if the command is terminated with a ^C,
the summary statistics is displayed. The default packetsize
is 56, which translates into 64 ICMP bytes when combined
with the 8 bytes of ICMP header.
- -R
- Record route. Includes the RECORD_ROUTE option in the
ECHO_REQUEST packet and displays the route buffer on
returned packets. Note that the IP header is only
large enough for nine such routes. Many hosts ignore
or discard this option.
- -r
- Bypass the normal routing tables and send directly to
a host on an attached network. If the host is not on a
directly-attached network, an error is returned.
- -s
- Send one datagram every second.
- -v
- Verbose output. ICMP packets other than ECHO_RESPONSE
that are received are listed.
na_ifconfig(1), na_netstat(1)
Table of Contents