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