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