Update from Vernon Schryver, fixing the kluge to flush the route cache.

This commit is contained in:
christos 1997-06-01 19:34:46 +00:00
parent 079405ea2a
commit 01bf6a0596
2 changed files with 347 additions and 351 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ping.8,v 1.14 1997/04/10 06:16:06 mikel Exp $
.\" $NetBSD: ping.8,v 1.15 1997/06/01 19:34:46 christos Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -46,15 +46,14 @@ packets to network hosts
.Op Fl dfnoqrvDPQRL
.Op Fl c Ar count
.Op Fl g Ar gateway
.Op Fl i Ar wait
.Op Fl i Ar interval
.Op Fl I Ar ifaddr
.Op Fl l Ar preload
.Op Fl p Ar pattern
.Op Fl s Ar packetsize
.Op Fl t Ar ttl
.Op Fl t Ar tos
.Op Fl T Ar ttl
.Op Fl w Ar maxwait
.Op Fl I Ar ifaddr
.Op Fl S Ar ifaddr
.Op Fl T Ar tos
.Ar host
.Sh DESCRIPTION
.Nm Ping
@ -87,7 +86,8 @@ option on the socket being used.
.It Fl D
Set the
.Dv Don't Fragment
bit.
bit in the IP header.
This can be used to determine the path MTU.
.It Fl f
Flood ping.
Outputs packets as fast as they come back or one hundred times per second,
@ -102,9 +102,13 @@ Only the super-user may use this option.
.Bf -emphasis
This can be very hard on a network and should be used with caution.
.Ef
.It Fl i Ar wait
.It Fl g Ar gateway
Use Lose Source Routing to send the ECHO_REQUEST packets via
.Ar gateway .
.TP
.It Fl i Ar internal
Wait
.Ar wait
.Ar internal
seconds
.Em between sending each packet .
The default is to wait for one second between each packet,
@ -112,6 +116,9 @@ except when the -f option is used the wait interval is 0.01 seconds.
.It Fl I Ar ifaddr
Send multicast datagrams on the network interface specified by the
interface's hostname or IP address.
.It Fl h Ar host
is an alternate way of specifying the target host instead of as the
last argument.
.It Fl l Ar preload
If
.Ar preload
@ -119,9 +126,12 @@ is specified,
.Nm ping
sends that many packets as fast as possible before falling into its normal
mode of behavior.
.It Fl L
Disable loopback when sending to multicast destinations,
so the transmitting host doesn't see the ICMP requests.
.It Fl n
Numeric output only.
No attempt will be made to lookup symbolic names for host addresses.
No attempt will be made to look up symbolic names for host addresses.
.It Fl o
Exit successfully after receiving one reply packet.
.It Fl p Ar pattern
@ -131,10 +141,17 @@ For example,
.Dq Li \-p ff
will cause the sent packet to be filled with all
ones.
.It Fl P
Use a psuedo-random sequence for the data instead of the default,
fixed sequence of incrementing 8-bit integers.
This is useful to foil compression on PPP and other links.
.It Fl q
Quiet output.
Nothing is displayed except the summary lines at startup time and
when finished.
.It Fl Q
Do not display responses such as Network Unreachable ICMP messages
concerning the ECHO_REQUESTs sent.
.It Fl R
Record route.
Includes the
@ -152,30 +169,26 @@ If the host is not on a directly-attached network, an error is returned.
This option can be used to ping a local host through an interface
that has no route through it (e.g., after the interface was dropped by
.Xr routed 8 ) .
.It Fl S Ar ifaddr
Specify the interface to transmit from on machines with multiple
interfaces. For unicast pings.
.It Fl R
Record Route. Includes the RECORD_ROUTE option in the ECHO_REQUEST
packet and displays the route buffer on returned packets.
Note that the IP header is only large enough for eight such routes,
and only six when using the
.Fl g
option.
Many hosts ignore or discard this option.
.It Fl s Ar packetsize
Specifies the number of data bytes to be sent.
Specifies the number of data bytes to be sent.
The default is 56, which translates into 64
.Tn ICMP
data bytes when combined
with the 8 bytes of
.Tn ICMP
header data. The maximum allowed value is 65468 bytes.
header data. If the
.Fl D
or
.Fl T
options are specified, or the
.Fl t
option to a unicast destination, a raw socket will be used and the 8 bytes of
header data are included in
.Ar packetsize .
.It Fl t Ar ttl
.It Fl T Ar ttl
Use the specified time-to-live.
.It Fl T Ar tos
Use the specified type of service.
.It Fl t Ar tos
Use the specified hexadecimal type of service.
.It Fl v
Verbose output.
.Tn ICMP
@ -187,18 +200,6 @@ Specifies the number of seconds to wait for a response to a packet
before transmitting the next one. The default is 10.
.El
.Pp
In addition, the following options may be used for multicast pings:
.Bl -tag -width Ds
.It Fl L
Disable the loopback, so the transmitting host doesn't see the ICMP
requests.
.It Fl R
Record Route. Includes the RECORD_ROUTE option in the ECHO_REQUEST
packet and displays the route buffer on returned packets. Note that
the IP header is only large enough for six such routes. Many hosts
ignore or discard this option.
.El
.Pp
When using
.Nm ping
for fault isolation, it should first be run on the local host, to verify
@ -226,9 +227,9 @@ for more information).
continually sends one datagram per second, and prints one line of
output for every ECHO_RESPONSE returned. On a trusted system with IP
Security Options enabled, if the network idiom is not MONO,
.Nm
.Nm
also prints a second line containing the hexadecimal representation
of the IP security option in the ECHO_RESPONSE. If the
of the IP security option in the ECHO_RESPONSE. If the
.Fl c
count option is given, only that number of requests is sent. No
output is produced if there is no response. Round-trip times and
@ -242,7 +243,7 @@ summary is displayed. When not using the
.Fl f
(flood) option, the first interrupt, usually generated by control-C or DEL,
causes
.Nm
.Nm
to wait for its outstanding requests to return. It will wait no longer
than the longest round trip time encountered by previous, successful pings.
The second interrupt stops ping immediately.
@ -275,8 +276,8 @@ header).
.Pp
If the data space is at least eight bytes large,
.Nm ping
uses the first eight bytes of this space to include a timestamp which
it uses in the computation of round trip times.
uses the first eight bytes of this space to include a timestamp to compute
round trip times.
If less than eight bytes of pad are specified, no round trip times are
given.
.Sh DUPLICATE AND DAMAGED PACKETS
@ -386,8 +387,8 @@ Others may use completely wild values.
.El
.Sh EXIT STATUS
.Nm
returns 0 on success (the host is alive), and non zero if the arguments are
incorrect or the host is not responding.
returns 0 on success (the host is alive),
and non-zero if the arguments are incorrect or the host is not responding.
.Sh BUGS
Many Hosts and Gateways ignore the
.Tn RECORD_ROUTE

File diff suppressed because it is too large Load Diff