]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/ping/ping.8
ping: add a ping6 hard link for backwards compatibility
[FreeBSD/FreeBSD.git] / sbin / ping / ping.8
1 .\" Copyright (c) 1985, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)ping.8      8.2 (Berkeley) 12/11/93
29 .\" $FreeBSD$
30 .\"
31 .Dd November 26, 2020
32 .Dt PING 8
33 .Os
34 .Sh NAME
35 .Nm ping
36 .Nd send
37 .Tn ICMP
38 or
39 .Tn ICMPv6 ECHO_REQUEST
40 packets to network hosts
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl 4AaDdfHnoQqRrv
44 .Op Fl C Ar pcp
45 .Op Fl c Ar count
46 .Op Fl G Ar sweepmaxsize
47 .Op Fl g Ar sweepminsize
48 .Op Fl h Ar sweepincrsize
49 .Op Fl i Ar wait
50 .Op Fl l Ar preload
51 .Op Fl M Cm mask | time
52 .Op Fl m Ar ttl
53 .Op Fl P Ar policy
54 .Op Fl p Ar pattern
55 .Op Fl S Ar src_addr
56 .Op Fl s Ar packetsize
57 .Op Fl t Ar timeout
58 .Op Fl W Ar waittime
59 .Op Fl z Ar tos
60 .Ar IPv4-host
61 .Nm
62 .Op Fl 4AaDdfHLnoQqRrv
63 .Op Fl C Ar pcp
64 .Op Fl c Ar count
65 .Op Fl I Ar iface
66 .Op Fl i Ar wait
67 .Op Fl l Ar preload
68 .Op Fl M Cm mask | time
69 .Op Fl m Ar ttl
70 .Op Fl P Ar policy
71 .Op Fl p Ar pattern
72 .Op Fl S Ar src_addr
73 .Op Fl s Ar packetsize
74 .Op Fl T Ar ttl
75 .Op Fl t Ar timeout
76 .Op Fl W Ar waittime
77 .Op Fl z Ar tos
78 .Ar IPv4-mcast-group
79 .Nm
80 .Op Fl 6AaDdEfHNnOoquvYyZ
81 .Op Fl b Ar bufsiz
82 .Op Fl c Ar count
83 .Op Fl e Ar gateway
84 .Op Fl I Ar interface
85 .Op Fl i Ar wait
86 .Op Fl k Ar addrtype
87 .Op Fl l Ar preload
88 .Op Fl m Ar hoplimit
89 .Op Fl P Ar policy
90 .Op Fl p Ar pattern
91 .Op Fl S Ar sourceaddr
92 .Op Fl s Ar packetsize
93 .Op Fl t Ar timeout
94 .Op Fl W Ar waittime
95 .Op Ar IPv6-hops ...
96 .Ar IPv6-host
97 .Sh DESCRIPTION
98 The
99 .Nm
100 utility invoked with an IPv4 target
101 .Ns ( Ar IPv4-host No or Ar IPv4-mcast-group Ns )
102 uses the
103 .Tn ICMP
104 .No protocol Ap s mandatory
105 .Tn ECHO_REQUEST
106 datagram to elicit an
107 .Tn ICMP ECHO_RESPONSE
108 from a host or gateway.
109 .Tn ECHO_REQUEST
110 datagrams
111 .Pq Dq pings
112 have an IP and
113 .Tn ICMP
114 header, followed by a
115 .Dq struct timeval
116 and then an arbitrary number of
117 .Dq pad
118 bytes used to fill out the packet.
119 .Pp
120 When invoked with an IPv6 target
121 .Ns ( Ar IPv6-host Ns ) Ns ,
122 it uses the
123 .Tn ICMPv6
124 protocol's mandatory
125 .Tn ICMP6_ECHO_REQUEST
126 datagram to elicit an
127 .Tn ICMP6_ECHO_REPLY
128 .Ns .
129 .Tn ICMP6_ECHO_REQUEST
130 datagrams have an IPv6 header and
131 .Tn ICMPv6
132 header formatted as documented in RFC 2463.
133 .Pp
134 When invoked with a hostname, the version to which the target is
135 resolved first is used. In that case, the options and arguments used
136 must be valid for the specific IP version, otherwise
137 .Nm
138 exits with an error. If the target is resolved to both IPv4 and IPv6,
139 the specific IP version can be requested by
140 .Fl 4
141 or
142 .Fl 6
143 options, respectively.
144 For backwards-compatibility, ICMPv6 can also be selected by invoking the binary
145 as
146 .Nm ping6 .
147 .Ss Options common to both IPv4 and IPv6 targets
148 .Bl -tag -width indent
149 .It Fl A
150 Audible.
151 Output a bell
152 .Tn ( ASCII
153 0x07)
154 character when no packet is received before the next packet
155 is transmitted.
156 To cater for round-trip times that are longer than the interval
157 between transmissions, further missing packets cause a bell only
158 if the maximum number of unreceived packets has increased.
159 .It Fl a
160 Audible.
161 Include a bell
162 .Tn ( ASCII
163 0x07)
164 character in the output when any packet is received.
165 .It Fl C Ar pcp
166 Add an 802.1p Ethernet Priority Code Point when sending a packet.
167 0..7 uses that specific PCP, -1 uses the interface default PCP (or none).
168 .It Fl c Ar count
169 Stop after sending
170 (and receiving)
171 .Ar count
172 .Tn ECHO_RESPONSE
173 packets.
174 If this option is not specified,
175 .Nm
176 will operate until interrupted.
177 .Pp
178 For an IPv4 target, if this option is specified in conjunction with ping sweeps,
179 each sweep will consist of
180 .Ar count
181 packets.
182 .It Fl D
183 Disable fragmentation.
184 .It Fl d
185 Set the
186 .Dv SO_DEBUG
187 option on the socket being used.
188 .It Fl f
189 Flood ping.
190 Outputs packets as fast as they come back or one hundred times per second,
191 whichever is more.
192 For every
193 .Tn ECHO_REQUEST
194 sent a period
195 .Dq .\&
196 is printed, while for every
197 .Tn ECHO_REPLY
198 received a backspace is printed.
199 This provides a rapid display of how many packets are being dropped.
200 Only the super-user may use this option.
201 .Bf -emphasis
202 This can be very hard on a network and should be used with caution.
203 .Ef
204 .It Fl H
205 Hostname output.
206 Try to do a reverse DNS lookup when displaying addresses.
207 This is the opposite of the
208 .Fl n
209 option.
210 .It Fl I Ar iface
211 For an IPv4 target,
212 .Ar iface
213 is an IP address indentifying an interface from which the packets will
214 be sent. This flag applies only if the ping target is a multicast
215 address.
216 .Pp
217 For an IPv6 target,
218 .Ar iface
219 is a name of an interface (e.g. `em0') from which the packets will be
220 sent. This flag applies if the ping target is a multicast address, or
221 link-local/site-local unicast address.
222 .It Fl i Ar wait
223 Wait
224 .Ar wait
225 seconds
226 .Em between sending each packet .
227 The default is to wait for one second between each packet.
228 The wait time may be fractional, but only the super-user may specify
229 values less than 1 second.
230 This option is incompatible with the
231 .Fl f
232 option.
233 .It Fl l Ar preload
234 If
235 .Ar preload
236 is specified,
237 .Nm
238 sends that many packets as fast as possible before falling into its normal
239 mode of behavior.
240 Only the super-user may use this option.
241 .It Fl m Ar ttl
242 For an IPv4 target, set the IP Time To Live for outgoing packets.
243 If not specified, the kernel uses the value of the
244 .Va net.inet.ip.ttl
245 MIB variable.
246 .Pp
247 For an IPv6 target, set the IPv6 hoplimit.
248 .It Fl n
249 Numeric output only.
250 No attempt will be made to lookup symbolic names for host addresses.
251 This is the opposite of
252 .Fl H ,
253 and it is the default behavior.
254 .It Fl o
255 Exit successfully after receiving one reply packet.
256 .It Fl P Ar policy
257 .Ar policy
258 specifies IPsec policy for the ping session.
259 For details please refer to
260 .Xr ipsec 4
261 and
262 .Xr ipsec_set_policy 3 .
263 .It Fl p Ar pattern
264 You may specify up to 16
265 .Dq pad
266 bytes to fill out the packet you send.
267 This is useful for diagnosing data-dependent problems in a network.
268 For example,
269 .Dq Li \-p ff
270 will cause the sent packet to be filled with all
271 ones.
272 .It Fl q
273 Quiet output.
274 Nothing is displayed except the summary lines at startup time and
275 when finished.
276 .It Fl S Ar src_addr
277 Use the following IP address as the source address in outgoing packets.
278 On hosts with more than one IP address, this option can be used to
279 force the source address to be something other than the IP address
280 of the interface the probe packet is sent on.
281 .Pp
282 For IPv4, if the IP address is not one of this machine's interface
283 addresses, an error is returned and nothing is sent.
284 .Pp
285 For IPv6, the source address must be one of the unicast addresses of
286 the sending node, and must be numeric.
287 .It Fl s Ar packetsize
288 Specify the number of data bytes to be sent.
289 The default is 56, which translates into 64
290 .Tn ICMP
291 data bytes when combined
292 with the 8 bytes of
293 .Tn ICMP
294 header data.
295 .Pp
296 For IPv4, only the super-user may specify values more than default.
297 This option cannot be used with ping sweeps.
298 .Pp
299 For IPv6, you may need to specify
300 .Fl b
301 as well to extend socket buffer size.
302 .It Fl t Ar timeout
303 Specify a timeout, in seconds, before ping exits regardless of how
304 many packets have been received.
305 .It Fl v
306 Verbose output.
307 .Tn ICMP
308 packets other than
309 .Tn ECHO_RESPONSE
310 that are received are listed.
311 .It Fl W Ar waittime
312 Time in milliseconds to wait for a reply for each packet sent.
313 If a reply arrives later, the packet is not printed as replied, but
314 considered as replied when calculating statistics.
315 .El
316 .Ss Options only for IPv4 targets
317 .Bl -tag -width indent
318 .It Fl 4
319 Use IPv4 regardless of how the target is resolved.
320 .It Fl G Ar sweepmaxsize
321 Specify the maximum size of
322 .Tn ICMP
323 payload when sending sweeping pings.
324 This option is required for ping sweeps.
325 .It Fl g Ar sweepminsize
326 Specify the size of
327 .Tn ICMP
328 payload to start with when sending sweeping pings.
329 The default value is 0.
330 .It Fl h Ar sweepincrsize
331 Specify the number of bytes to increment the size of
332 .Tn ICMP
333 payload after
334 each sweep when sending sweeping pings.
335 The default value is 1.
336 .It Fl L
337 Suppress loopback of multicast packets.
338 This flag only applies if the ping destination is a multicast address.
339 .It Fl M Cm mask | time
340 Use
341 .Dv ICMP_MASKREQ
342 or
343 .Dv ICMP_TSTAMP
344 instead of
345 .Dv ICMP_ECHO .
346 For
347 .Cm mask ,
348 print the netmask of the remote machine.
349 Set the
350 .Va net.inet.icmp.maskrepl
351 MIB variable to enable
352 .Dv ICMP_MASKREPLY
353 and
354 .Va net.inet.icmp.maskfake
355 if you want to override the netmask in the response.
356 For
357 .Cm time ,
358 print the origination, reception and transmission timestamps.
359 Set the
360 .Va net.inet.icmp.tstamprepl
361 MIB variable to enable or disable
362 .Dv ICMP_TSTAMPREPLY .
363 .It Fl Q
364 Somewhat quiet output.
365 .No Don Ap t
366 display ICMP error messages that are in response to our query messages.
367 Originally, the
368 .Fl v
369 flag was required to display such errors, but
370 .Fl v
371 displays all ICMP error messages.
372 On a busy machine, this output can be overbearing.
373 Without the
374 .Fl Q
375 flag,
376 .Nm
377 prints out any ICMP error messages caused by its own ECHO_REQUEST
378 messages.
379 .It Fl R
380 Record route.
381 Includes the
382 .Tn RECORD_ROUTE
383 option in the
384 .Tn ECHO_REQUEST
385 packet and displays
386 the route buffer on returned packets.
387 Note that the IP header is only large enough for nine such routes;
388 the
389 .Xr traceroute 8
390 command is usually better at determining the route packets take to a
391 particular destination.
392 If more routes come back than should, such as due to an illegal spoofed
393 packet, ping will print the route list and then truncate it at the correct
394 spot.
395 Many hosts ignore or discard the
396 .Tn RECORD_ROUTE
397 option.
398 .It Fl r
399 Bypass the normal routing tables and send directly to a host on an attached
400 network.
401 If the host is not on a directly-attached network, an error is returned.
402 This option can be used to ping a local host through an interface
403 that has no route through it
404 (e.g., after the interface was dropped by
405 .Xr routed 8 ) .
406 .It Fl T Ar ttl
407 Set the IP Time To Live for multicasted packets.
408 This flag only applies if the ping destination is a multicast address.
409 .It Fl z Ar tos
410 Use the specified type of service.
411 .It Ar IPv4-host
412 hostname or IPv4 address of the final destination node.
413 .It Ar IPv4-mcast-group
414 IPv4 multicast address of the final destination nodes.
415 .El
416 .Ss Options only for IPv6 targets
417 .Bl -tag -width indent
418 .It Fl 6
419 Use IPv6 regardless of how the target is resolved.
420 .It Fl b Ar bufsiz
421 Set socket buffer size.
422 .It Fl e Ar gateway
423 Specifies to use
424 .Ar gateway
425 as the next hop to the destination.
426 The gateway must be a neighbor of the sending node.
427 .It Fl k Ar addrtype
428 Generate ICMPv6 Node Information Node Addresses query, rather than echo-request.
429 .Ar addrtype
430 must be a string constructed of the following characters.
431 .Bl -tag -width Ds -compact
432 .It Ic a
433 requests unicast addresses from all of the responder's interfaces.
434 If the character is omitted,
435 only those addresses which belong to the interface which has the
436 responder's address are requests.
437 .It Ic c
438 requests responder's IPv4-compatible and IPv4-mapped addresses.
439 .It Ic g
440 requests responder's global-scope addresses.
441 .It Ic s
442 requests responder's site-local addresses.
443 .It Ic l
444 requests responder's link-local addresses.
445 .It Ic A
446 requests responder's anycast addresses.
447 Without this character, the responder will return unicast addresses only.
448 With this character, the responder will return anycast addresses only.
449 Note that the specification does not specify how to get responder's
450 anycast addresses.
451 This is an experimental option.
452 .El
453 .It Fl N
454 Probe node information multicast group address
455 .Pq Li ff02::2:ffxx:xxxx .
456 .Ar host
457 must be string hostname of the target
458 (must not be a numeric IPv6 address).
459 Node information multicast group will be computed based on given
460 .Ar host ,
461 and will be used as the final destination.
462 Since node information multicast group is a link-local multicast group,
463 outgoing interface needs to be specified by
464 .Fl I
465 option.
466 .Pp
467 When specified twice, the address
468 .Pq Li ff02::2:xxxx:xxxx
469 is used instead.
470 The former is in RFC 4620, the latter is in an old Internet Draft
471 draft-ietf-ipngwg-icmp-name-lookup.
472 Note that KAME-derived implementations including
473 .Fx
474 use the latter.
475 .It Fl O
476 Generate ICMPv6 Node Information supported query types query,
477 rather than echo-request.
478 .Fl s
479 has no effect if
480 .Fl O
481 is specified.
482 .It Fl u
483 By default,
484 .Nm
485 asks the kernel to fragment packets to fit into the minimum IPv6 MTU.
486 The
487 .Fl u
488 option
489 will suppress the behavior in the following two levels:
490 when the option is specified once, the behavior will be disabled for
491 unicast packets.
492 When the option is more than once, it will be disabled for both
493 unicast and multicast packets.
494 .It Fl Y
495 Same as
496 .Fl y ,
497 but with old packet format based on 03 draft.
498 This option is present for backward compatibility.
499 .Fl s
500 has no effect if
501 .Fl y
502 is specified.
503 .It Fl y
504 Generate ICMPv6 Node Information DNS Name query, rather than echo-request.
505 .Fl s
506 has no effect if
507 .Fl y
508 is specified.
509 .It Ar IPv6-hops
510 IPv6 addresses for intermediate nodes,
511 which will be put into type 0 routing header.
512 .It Ar IPv6-host
513 IPv6 address of the final destination node.
514 .El
515 .Ss Experimental options only for IPv6 target
516 .Bl -tag -width indent
517 .It Fl E
518 Enables transport-mode IPsec encapsulated security payload.
519 .It Fl Z
520 Enables transport-mode IPsec authentication header.
521 .El
522 .Pp
523 When using
524 .Nm
525 for fault isolation, it should first be run on the local host, to verify
526 that the local network interface is up and running.
527 Then, hosts and gateways further and further away should be
528 .Dq pinged .
529 Round-trip times and packet loss statistics are computed.
530 If duplicate packets are received, they are not included in the packet
531 loss calculation, although the round trip time of these packets is used
532 in calculating the round-trip time statistics.
533 When the specified number of packets have been sent
534 (and received)
535 or if the program is terminated with a
536 .Dv SIGINT ,
537 a brief summary is displayed, showing the number of packets sent and
538 received, and the minimum, mean, maximum, and standard deviation of
539 the round-trip times.
540 .Pp
541 If
542 .Nm
543 receives a
544 .Dv SIGINFO
545 (see the
546 .Cm status
547 argument for
548 .Xr stty 1 )
549 signal, the current number of packets sent and received, and the
550 minimum, mean, maximum, and standard deviation of the round-trip times
551 will be written to the standard output.
552 .Pp
553 This program is intended for use in network testing, measurement and
554 management.
555 Because of the load it can impose on the network, it is unwise to use
556 .Nm
557 during normal operations or from automated scripts.
558 .Sh ICMP PACKET DETAILS
559 An IP header without options is 20 bytes.
560 An
561 .Tn ICMP
562 .Tn ECHO_REQUEST
563 packet contains an additional 8 bytes worth of
564 .Tn ICMP
565 header followed by an arbitrary amount of data.
566 When a
567 .Ar packetsize
568 is given, this indicated the size of this extra piece of data
569 (the default is 56).
570 Thus the amount of data received inside of an IP packet of type
571 .Tn ICMP
572 .Tn ECHO_REPLY
573 will always be 8 bytes more than the requested data space
574 (the
575 .Tn ICMP
576 header).
577 .Pp
578 If the data space is at least eight bytes large,
579 .Nm
580 uses the first eight bytes of this space to include a timestamp which
581 it uses in the computation of round trip times.
582 If less than eight bytes of pad are specified, no round trip times are
583 given.
584 .Sh DUPLICATE AND DAMAGED PACKETS
585 The
586 .Nm
587 utility will report duplicate and damaged packets.
588 Duplicate packets should never occur when pinging a unicast address,
589 and seem to be caused by
590 inappropriate link-level retransmissions.
591 Duplicates may occur in many situations and are rarely
592 (if ever)
593 a good sign, although the presence of low levels of duplicates may not
594 always be cause for alarm.
595 Duplicates are expected when pinging a broadcast or multicast address,
596 since they are not really duplicates but replies from different hosts
597 to the same request.
598 .Pp
599 Damaged packets are obviously serious cause for alarm and often
600 indicate broken hardware somewhere in the
601 .Nm
602 packet's path (in the network or in the hosts).
603 .Sh TRYING DIFFERENT DATA PATTERNS
604 The
605 (inter)network
606 layer should never treat packets differently depending on the data
607 contained in the data portion.
608 Unfortunately, data-dependent problems have been known to sneak into
609 networks and remain undetected for long periods of time.
610 In many cases the particular pattern that will have problems is something
611 that does not have sufficient
612 .Dq transitions ,
613 such as all ones or all zeros, or a pattern right at the edge, such as
614 almost all zeros.
615 It is not
616 necessarily enough to specify a data pattern of all zeros (for example)
617 on the command line because the pattern that is of interest is
618 at the data link level, and the relationship between what you type and
619 what the controllers transmit can be complicated.
620 .Pp
621 This means that if you have a data-dependent problem you will probably
622 have to do a lot of testing to find it.
623 If you are lucky, you may manage to find a file that either
624 cannot
625 be sent across your network or that takes much longer to transfer than
626 other similar length files.
627 You can then examine this file for repeated patterns that you can test
628 using the
629 .Fl p
630 option of
631 .Nm .
632 .Sh IPv4 TTL DETAILS
633 The
634 .Tn TTL
635 value of an IP packet represents the maximum number of IP routers
636 that the packet can go through before being thrown away.
637 In current practice you can expect each router in the Internet to decrement
638 the
639 .Tn TTL
640 field by exactly one.
641 .Pp
642 The
643 .Tn TCP/IP
644 specification recommends setting the
645 .Tn TTL
646 field for
647 .Tn IP
648 packets to 64, but many systems use smaller values
649 .No ( Bx 4.3
650 uses 30,
651 .Bx 4.2
652 used 15).
653 .Pp
654 The maximum possible value of this field is 255, and most
655 .Ux
656 systems set
657 the
658 .Tn TTL
659 field of
660 .Tn ICMP ECHO_REQUEST
661 packets to 255.
662 This is why you will find you can
663 .Dq ping
664 some hosts, but not reach them with
665 .Xr telnet 1
666 or
667 .Xr ftp 1 .
668 .Pp
669 In normal operation
670 .Nm
671 prints the ttl value from the packet it receives.
672 When a remote system receives a ping packet, it can do one of three things
673 with the
674 .Tn TTL
675 field in its response:
676 .Bl -bullet
677 .It
678 Not change it; this is what
679 .Bx
680 systems did before the
681 .Bx 4.3 tahoe
682 release.
683 In this case the
684 .Tn TTL
685 value in the received packet will be 255 minus the
686 number of routers in the round-trip path.
687 .It
688 Set it to 255; this is what current
689 .Bx
690 systems do.
691 In this case the
692 .Tn TTL
693 value in the received packet will be 255 minus the
694 number of routers in the path
695 .Em from
696 the remote system
697 .Em to
698 the
699 .Nm Ns Em ing
700 host.
701 .It
702 Set it to some other value.
703 Some machines use the same value for
704 .Tn ICMP
705 packets that they use for
706 .Tn TCP
707 packets, for example either 30 or 60.
708 Others may use completely wild values.
709 .El
710 .Sh EXIT STATUS
711 The
712 .Nm
713 utility exits with one of the following values:
714 .Bl -tag -width indent
715 .It 0
716 At least one response was heard from the specified
717 .Ar host .
718 .It 2
719 The transmission was successful but no responses were received.
720 .It any other value
721 An error occurred.
722 .El
723 .Sh EXAMPLES
724 The following will send ICMPv6 echo request to
725 .Li dst.foo.com .
726 .Bd -literal -offset indent
727 ping -6 -n dst.foo.com
728 .Ed
729 .Pp
730 The following will probe hostnames for all nodes on the network link attached to
731 .Li wi0
732 interface.
733 The address
734 .Li ff02::1
735 is named the link-local all-node multicast address, and the packet would
736 reach every node on the network link.
737 .Bd -literal -offset indent
738 ping -6 -y ff02::1%wi0
739 .Ed
740 .Pp
741 The following will probe addresses assigned to the destination node,
742 .Li dst.foo.com .
743 .Bd -literal -offset indent
744 ping -6 -k agl dst.foo.com
745 .Ed
746 .Sh SEE ALSO
747 .Xr netstat 1 ,
748 .Xr icmp 4 ,
749 .Xr icmp6 4 ,
750 .Xr inet6 4 ,
751 .Xr ip6 4 ,
752 .Xr ifconfig 8 ,
753 .Xr routed 8 ,
754 .Xr traceroute 8
755 .Xr traceroute6 8
756 .Rs
757 .%A A. Conta
758 .%A S. Deering
759 .%T "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification"
760 .%N RFC 2463
761 .%D December 1998
762 .Re
763 .Rs
764 .%A Matt Crawford
765 .%T "IPv6 Node Information Queries"
766 .%N draft-ietf-ipngwg-icmp-name-lookups-09.txt
767 .%D May 2002
768 .%O work in progress material
769 .Re
770 .Sh HISTORY
771 The
772 .Nm
773 utility appeared in
774 .Bx 4.3 .
775 The
776 .Nm ping6
777 utility with IPv6 support first appeared in the WIDE Hydrangea IPv6
778 protocol stack kit.
779 .Pp
780 IPv6 and IPsec support based on the KAME Project
781 .Pq Pa http://www.kame.net/
782 stack was initially integrated into
783 .Fx 4.0 .
784 .Pp
785 The
786 .Nm ping6
787 utility was merged to
788 .Nm
789 in Google Summer of Code 2019.
790 .Sh AUTHORS
791 The original
792 .Nm
793 utility was written by
794 .An Mike Muuss
795 while at the US Army Ballistics
796 Research Laboratory.
797 .Sh BUGS
798 Many Hosts and Gateways ignore the IPv4
799 .Tn RECORD_ROUTE
800 option.
801 .Pp
802 The maximum IP header length is too small for options like
803 .Tn RECORD_ROUTE
804 to be completely useful.
805 .No There Ap s
806 not much that can be done about this, however.
807 .Pp
808 Flood pinging is not recommended in general, and flood pinging the
809 broadcast address should only be done under very controlled conditions.
810 .Pp
811 The
812 .Fl v
813 option is not worth much on busy hosts.