HP-UX Reference (11i v1 05/09) - 1M System Administration Commands N-Z (vol 4)

p
ping(1M) ping(1M)
If the address-family is specified, and host is an Internet address, the address family of
the Internet address must be the same as that specified in the address-family option. If
the address-family is not specified, and host is a symbolic name, an attempt will be made
to resolve host into an IPv4 address first. If that fails, a second attempt will be made to
resolve host into an IPv6 address.
The ping command does not accept IPv4-mapped IPv6 addresses. To ping an IPv4 node,
an IPv4 address should be used. IPv4-mapped IPv6 addresses are used to address IPv4-
only nodes from an IPv6 node in a socket program only. IPv4-mapped IPv6 addresses are
always converted to an IPv4 address before they are used in packets sent over the net-
work.
If a system does not respond as expected, the route might be configured incorrectly on
the local or remote system or on an intermediate gateway, or there might be some other
network failure. Normally, host is the address assigned to a local or remote network
interface.
(inet only) If host is a broadcast address, all systems that receive the broadcast should
respond. Normally, these are only systems that have a network interface on the same
network as the local interface sending the ICMP Echo Request.
If host is a multicast address, only systems that have joined the multicast group should
respond. These may be distant systems if the
-t option is specified, and there is a mul-
ticast router on the network directly connected to the interface specified by the -i
option.
packet-size The size of the transmitted packet, in bytes. By default (when packet-size is not
specified), the size of transmitted packets is 64 bytes. The minimum value allowed for
packet-size is 8 bytes, and the maximum value is 4095 bytes. If packet-size is smaller
than 16 bytes, there is not enough room for timing information. In that case, the round-
trip times are not displayed.
-n count The number of packets ping will transmit before terminating. The -n is not needed if
also specifying packet-size. Range: zero to 2147483647. The default is zero, in which
case ping sends packets until interrupted.
-m timeout Override the default timeout value (10 seconds) which ping uses to timeout (in seconds)
when a host or network is unreachable. This option is valid only with the -n option or
when count is specified. The
-m option should not be used with count equal to 0.
The
-m option is not effective for reachable hosts or networks.
Using ping for Fault Isolation
When using ping for fault isolation, first specify a local address for host to verify that the local network
interface is working correctly. Then specify host and gateway addresses further and further away to deter-
mine the point of failure.
ping sends one datagram per second, and it normally writes one line of output
for every ICMP Echo Response that is received. No output is produced if there are no responses. If an
optional count is given, only the specified number of requests is sent. Round-trip times and packet loss
statistics are computed. When all responses have been received or the command times out (if the count
option is specified), or if the command is terminated with a
SIGINT, a brief summary is displayed.
This command is intended for use in testing, managing and measuring network performance. It should be
used primarily to isolate network failures. Because of the load it could impose on the network, it is con-
sidered discourteous to use ping unnecessarily during normal operations or from automated scripts.
RETURN VALUE
ping exits with one of the following values:
0 On success.
1 On failure such as unknown host, illegal packet size, etc.
2 On a unreachable host or network.
AUTHOR
ping was developed in the Public Domain.
HP-UX 11i Version 1: September 2005 2 Hewlett-Packard Company Section 1M681