1 .\" $KAME: ping6.8,v 1.43 2001/06/28 06:54:29 suz Exp $
3 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the project nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" $FreeBSD: src/sbin/ping6/ping6.8,v 1.3.2.12 2003/02/24 00:56:42 trhodes Exp $
31 .\" $DragonFly: src/sbin/ping6/ping6.8,v 1.7 2007/11/23 23:16:36 swildner Exp $
39 .Tn ICMPv6 ECHO_REQUEST
40 packets to network hosts
43 .\" without ipsec, or new ipsec
46 .\" .Op Fl AdEfnNqRtvwW
76 .Op Fl S Ar sourceaddr
79 .Op Fl s Ar packetsize
93 .Tn ICMP6_ECHO_REQUEST
96 from a host or gateway.
97 .Tn ICMP6_ECHO_REQUEST
98 datagrams (``pings'') have an IPv6 header,
101 header formatted as documented in RFC 2463.
102 The options are as follows:
106 .\" Enables transport-mode IPsec authentication header
109 Generate ICMPv6 Node Information Node Addresses query, rather than echo-request.
111 must be a string constructed of the following characters.
112 .Bl -tag -width Ds -compact
114 requests all the responder's unicast addresses.
115 If the character is omitted,
116 only those addresses which belong to the interface which has the
117 responder's address are requests.
119 requests responder's IPv4-compatible and IPv4-mapped addresses.
121 requests responder's global-scope addresses.
123 requests responder's site-local addresses.
125 requests responder's link-local addresses.
127 requests responder's anycast addresses.
128 Without this character, the responder will return unicast addresses only.
129 With this character, the responder will return anycast addresses only.
130 Note that the specification does not specify how to get responder's
132 This is an experimental option.
135 Set socket buffer size.
145 option on the socket being used.
147 .\" Enables transport-mode IPsec encapsulated security payload
151 Outputs packets as fast as they come back or one hundred times per second,
157 is printed, while for every
159 received a backspace is printed.
160 This provides a rapid display of how many packets are being dropped.
161 Only the super-user may use this option.
163 This can be very hard on a network and should be used with caution.
166 Specifies to try reverse-lookup of IPv6 addresses.
169 utility does not try reverse-lookup unless the option is specified.
171 Set the IPv6 hoplimit.
172 .It Fl I Ar interface
173 Source packets with the given interface address.
174 This flag applies if the ping destination is a multicast address,
175 or link-local/site-local unicast address.
180 .Em between sending each packet .
181 The default is to wait for one second between each packet.
182 This option is incompatible with the
190 sends that many packets as fast as possible before falling into its normal
192 Only the super-user may use this option.
195 No attempt will be made to lookup symbolic names from addresses in the reply.
197 Probe node information multicast group
198 .Pq Li ff02::2:xxxx:xxxx .
200 must be string hostname of the target
201 (must not be a numeric IPv6 address).
202 Node information multicast group will be computed based on given
204 and will be used as the final destination.
205 Since node information multicast group is a link-local multicast group,
206 destination link needs to be specified by
210 You may specify up to 16
212 bytes to fill out the packet you send.
213 This is useful for diagnosing data-dependent problems in a network.
216 will cause the sent packet to be filled with all
221 specifies IPsec policy to be used for the probe.
224 Nothing is displayed except the summary lines at startup time and
227 Make the kernel believe that the target
233 is reachable, by injecting upper-layer reachability confirmation hint.
234 The option is meaningful only if the target
238 .It Fl S Ar sourceaddr
239 Specifies the source address of request packets.
240 The source address must be one of the unicast addresses of the sending node.
241 If the outgoing interface is specified by the
245 needs to be an address assigned to the specified interface.
246 .It Fl s Ar packetsize
247 Specifies the number of data bytes to be sent.
248 The default is 56, which translates into 64
250 data bytes when combined
254 You may need to specify
256 as well to extend socket buffer size.
258 Generate ICMPv6 Node Information supported query types query,
259 rather than echo-request.
269 that are received are listed.
271 Generate ICMPv6 Node Information DNS Name query, rather than echo-request.
279 but with old packet format based on 03 draft.
280 This option is present for backward compatibility.
286 IPv6 addresses for intermediate nodes,
287 which will be put into type 0 routing header.
289 IPv6 address of the final destination node.
294 for fault isolation, it should first be run on the local host, to verify
295 that the local network interface is up and running.
296 Then, hosts and gateways further and further away should be
298 Round-trip times and packet loss statistics are computed.
299 If duplicate packets are received, they are not included in the packet
300 loss calculation, although the round trip time of these packets is used
301 in calculating the round-trip time statistics.
302 When the specified number of packets have been sent
304 or if the program is terminated with a
306 a brief summary is displayed, showing the number of packets sent and
307 received, and the minimum, mean, maximum, and standard deviation of
308 the round-trip times.
318 signal, the current number of packets sent and received, and the
319 minimum, mean, maximum, and standard deviation of the round-trip times
320 will be written to the standard output in the same format as the
321 standard completion message.
323 This program is intended for use in network testing, measurement and
325 Because of the load it can impose on the network, it is unwise to use
327 during normal operations or from automated scripts.
328 .\" .Sh ICMP PACKET DETAILS
329 .\" An IP header without options is 20 bytes.
333 .\" packet contains an additional 8 bytes worth of
335 .\" header followed by an arbitrary amount of data.
338 .\" is given, this indicated the size of this extra piece of data
339 .\" (the default is 56).
340 .\" Thus the amount of data received inside of an IP packet of type
343 .\" will always be 8 bytes more than the requested data space
348 .\" If the data space is at least eight bytes large,
350 .\" uses the first eight bytes of this space to include a timestamp which
351 .\" it uses in the computation of round trip times.
352 .\" If less than eight bytes of pad are specified, no round trip times are
354 .Sh DUPLICATE AND DAMAGED PACKETS
357 utility will report duplicate and damaged packets.
358 Duplicate packets should never occur when pinging a unicast address,
359 and seem to be caused by
360 inappropriate link-level retransmissions.
361 Duplicates may occur in many situations and are rarely
363 a good sign, although the presence of low levels of duplicates may not
364 always be cause for alarm.
365 Duplicates are expected when pinging a broadcast or multicast address,
366 since they are not really duplicates but replies from different hosts
369 Damaged packets are obviously serious cause for alarm and often
370 indicate broken hardware somewhere in the
373 (in the network or in the hosts).
374 .Sh TRYING DIFFERENT DATA PATTERNS
377 layer should never treat packets differently depending on the data
378 contained in the data portion.
379 Unfortunately, data-dependent problems have been known to sneak into
380 networks and remain undetected for long periods of time.
381 In many cases the particular pattern that will have problems is something
382 that does not have sufficient
384 such as all ones or all zeros, or a pattern right at the edge, such as
387 necessarily enough to specify a data pattern of all zeros (for example)
388 on the command line because the pattern that is of interest is
389 at the data link level, and the relationship between what you type and
390 what the controllers transmit can be complicated.
392 This means that if you have a data-dependent problem you will probably
393 have to do a lot of testing to find it.
394 If you are lucky, you may manage to find a file that either
396 be sent across your network or that takes much longer to transfer than
397 other similar length files.
398 You can then examine this file for repeated patterns that you can test
408 would work; the following will send ICMPv6 echo request to
410 .Bd -literal -offset indent
414 The following will probe hostnames for all nodes on the network link attached to
419 is named the link-local all-node multicast address, and the packet would
420 reach every node on the network link.
421 .Bd -literal -offset indent
425 The following will probe addresses assigned to the destination node,
427 .Bd -literal -offset indent
428 ping6 -a agl dst.foo.com
433 utility returns 0 on success (the host is alive),
434 and non-zero if the arguments are incorrect or the host is not responding.
448 .%T "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification"
454 .%T "IPv6 Node Information Queries"
455 .%N draft-ietf-ipngwg-icmp-name-lookups-07.txt
457 .%O work in progress material
466 utility with IPv6 support first appeared in WIDE Hydrangea IPv6 protocol stack
469 IPv6 and IPsec support based on the KAME Project
470 .Pa ( http://www.kame.net/ )
471 stack was initially integrated into
474 There have been many discussions on why we separate
478 Some people argued that it would be more convenient to uniform the
479 ping command for both IPv4 and IPv6.
480 The followings are an answer to the request.
482 From a developer's point of view:
483 since the underling raw sockets API is totally different between IPv4
484 and IPv6, we would end up having two types of code base.
485 There would actually be less benefit to uniform the two commands
486 into a single command from the developer's standpoint.
488 From an operator's point of view: unlike ordinary network applications
489 like remote login tools, we are usually aware of address family when using
490 network management tools.
491 We do not just want to know the reachability to the host, but want to know the
492 reachability to the host via a particular network protocol such as
494 Thus, even if we had a unified
496 command for both IPv4 and IPv6, we would usually type a
500 option (or something like those) to specify the particular address family.
501 This essentially means that we have two different commands.