- -i address
If
host
is a multicast address, send multicast datagrams from the interface
with the local IP address specified by
address
in ``dot'' notation (see
inet(3N)).
If the
-i
option is not specified, multicast datagrams are sent from
the default interface, which is determined by the route
configuration.
- -o
Insert an IP Record Route option in outgoing packets,
summarizing routes taken when the command terminates.
It may not be possible to get the round-trip path
if some hosts on the route taken do not implement the
IP Record Route option.
A maximum of 9 Internet addresses can be recorded
due to the maximum length of the IP option area.
- -p
The new Path MTU information is displayed when a ICMP
Datagram Too Big
message is received from a gateway.
The
-p
option must be used in conjunction with a large
packetsize
and with the
-v
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-connected network, an error
is returned.
This option can be used to ping the local system
through an interface that has no route through it,
such as, after the interface was dropped by
gated
(see
gated(1M)).
- -t ttl
If
host
is a multicast address, set the time-to-live field in
the multicast datagram to
ttl.
This controls the scope of the multicast datagrams
by specifying the maximum number of external systems
through which the datagram can be forwarded.
If
ttl
is zero, the datagram is restricted to the local system.
If
ttl
is one, the datagram is restricted to systems that have
an interface on the network directly connected to the interface
specified by the
-i
option.
If
ttl
is two, the datagram can be forwarded through
one multicast router at the most; and so forth.
Range:
zero to 255.
The default value is 1.
- -I interval
This option specifies the
interval
in seconds, between each packet to be transmitted. The default
interval is 1 second.
- -v
Verbose output.
Show ICMP packets other than Echo Responses that are received.
- -f address-family
The
address-family
determines whether the
host
is an IPv4 or IPv6 host.
The address families currently supported are
inet
for IPv4 addresses and
inet6
for IPv6 addresses.
- host
Destination to which the ICMP Echo Requests are sent.
host
can be a hostname or an IPv4 or IPv6 Internet address.
All symbolic names specified for
host
are looked up by using
gethostbyname()
(see
gethostent(3N))
for IPv4, and
getaddrinfo()
(see
getaddrinfo(3N))
for IPv6.
If
host
is an Internet address, it must be in "dot" notation (see
inet(3N))
for IPv4, and in "colon" notation (see
inet6(3N))
for IPv6.
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 network.
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 multicast 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 65500 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.