Commit | Line | Data |
---|---|---|
d1e77920 KB |
1 | .\" Copyright (c) 1985 The Regents of the University of California. |
2 | .\" All rights reserved. | |
9aecb40e | 3 | .\" |
d1e77920 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)ping.8 6.3 (Berkeley) %G% | |
9aecb40e KM |
17 | .\" |
18 | .TH PING 8 "" | |
19 | .UC 6 | |
20 | .SH NAME | |
21 | ping \- send ICMP ECHO_REQUEST packets to network hosts | |
22 | .SH SYNOPSIS | |
23 | .B /etc/ping | |
9aecb40e | 24 | [ |
d53739b5 MK |
25 | .B \-r |
26 | ] [ | |
27 | .B \-v | |
28 | ] | |
29 | .I host | |
30 | [ | |
31 | .I packetsize | |
32 | ] [ | |
33 | .I count | |
9aecb40e KM |
34 | ] |
35 | .SH DESCRIPTION | |
d53739b5 | 36 | The DARPA Internet is a large and complex aggregation of |
9aecb40e KM |
37 | network hardware, connected together by gateways. |
38 | Tracking a single-point hardware or software failure | |
39 | can often be difficult. | |
40 | .I Ping | |
d53739b5 MK |
41 | utilizes the |
42 | ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an | |
43 | ICMP ECHO_RESPONSE from a host or gateway. | |
9aecb40e KM |
44 | ECHO_REQUEST datagrams (``pings'') have an IP and ICMP header, |
45 | followed by a \fBstruct timeval\fR, and then an arbitrary number | |
46 | of ``pad'' bytes used to fill out the packet. | |
47 | Default datagram length is 64 bytes, but this may be changed | |
48 | using the command-line option. | |
d53739b5 MK |
49 | Other options are: |
50 | .TP | |
51 | .B \-r | |
52 | Bypass the normal routing tables and send directly to a host on an attached | |
53 | network. | |
54 | If the host is not on a directly-attached network, | |
55 | an error is returned. | |
56 | This option can be used to ping a local host through an interface | |
57 | that has no route through it (e.g., after the interface was dropped by | |
58 | .IR routed (8C)). | |
59 | .TP | |
60 | .B \-v | |
61 | Verbose output. ICMP packets other than ECHO RESPONSE that are received | |
62 | are listed. | |
9aecb40e KM |
63 | .PP |
64 | When using \fIping\fR for fault isolation, | |
65 | it should first be run on the local | |
66 | host, to verify that the local network interface is up and | |
d53739b5 MK |
67 | running. |
68 | Then, hosts and gateways further and further away | |
69 | should be ``pinged''. | |
70 | \fIPing\fR sends one datagram per second, and | |
9aecb40e | 71 | prints one line of output for every ECHO_RESPONSE returned. |
d53739b5 MK |
72 | No output is produced if there is no response. |
73 | If an optional | |
74 | .I count | |
75 | is given, only that number of requests is sent. | |
9aecb40e | 76 | Round-trip times and packet loss statistics are computed. |
d53739b5 MK |
77 | When all responses have been received or the program times out (with a |
78 | .I count | |
79 | specified), | |
80 | or if the program is terminated with a SIGINT, a brief | |
9aecb40e | 81 | summary is displayed. |
d53739b5 MK |
82 | .PP |
83 | This program is intended for use in network testing, measurement | |
84 | and management. | |
85 | It should be used primarily for manual fault isolation. | |
86 | Because of the load it could impose on the network, | |
87 | it is unwise to use | |
88 | .I ping | |
89 | during normal operations or from automated scripts. | |
9aecb40e KM |
90 | .SH AUTHOR |
91 | Mike Muuss | |
92 | .SH SEE ALSO | |
d1e77920 | 93 | netstat(1), ifconfig(8) |