Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (9905 KB)
ping(1M)Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Attributes | See Also Name
Synopsis/usr/sbin/ping host [timeout]
/usr/sbin/ping -s [-l | -U] [-abdlLnrRv] [-A addr_family]
[-c traffic_class] [-g gateway [-g gateway...]]
[-N next_hop_router] [-F flow_label] [-I interval]
[-i interface] [-P tos] [-p port] [-t ttl] host
[data_size] [npackets]
DescriptionThe utility ping utilizes the ICMP (ICMP6 in IPv6) protocol's ECHO_REQUEST datagram to elicit an ICMP (ICMP6) ECHO_RESPONSE from the specified host or network gateway. If host responds, ping will print:
on the standard output and exit. Otherwise, after timeout seconds, it will write:
The default value of timeout is 20 seconds. When you specify the s flag, sends one datagram per second (adjust with -I) and prints one line of output for every ECHO_RESPONSE that it receives. ping produces no output if there is no response. In this second form, ping computes round trip times and packet loss statistics; it displays a summary of this information upon termination or timeout. The default data_size is 56 bytes, or you can specify a size with the data_size command-line argument. If you specify the optional npackets, ping sends ping requests until it either sends npackets requests or receives npackets replies. When using ping for fault isolation, first ping the local host to verify that the local network interface is running. Options
The following options are supported: OperandsExamplesExample 1 Using ping With IPv6This example shows ping sending probe packets to all the IPv6 addresses of the host xyz, one at a time. It sends an ICMP6 ECHO_REQUEST every second until the user interrupts it.
Example 2 Using ndd to Set the icmp_ipv6_hoplimitThis example shows the ndd module, /dev/icmp, used to set the icmp_ipv6_hoplimit.
Exit Status
The following exit values are returned: AttributesSee attributes(5) for descriptions of the following attributes:
See Alsoifconfig(1M), in.routed(1M), ndd(1M), netstat(1M), rpcinfo(1M), traceroute(1M), attributes(5), icmp(7P), icmp6(7P) Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Attributes | See Also |
||||||||