1.\" $KAME: ping6.8,v 1.22 2000/05/31 17:00:07 itojun Exp $
| 1.\" $KAME: ping6.8,v 1.39 2001/04/04 00:08:34 itojun Exp $
|
2.\" 3.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 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. 17.\" 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 28.\" SUCH DAMAGE. 29.\"
| 2.\" 3.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 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. 17.\" 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 28.\" SUCH DAMAGE. 29.\"
|
30.\" $FreeBSD: head/sbin/ping6/ping6.8 72914 2001-02-22 19:00:51Z ume $
| 30.\" $FreeBSD: head/sbin/ping6/ping6.8 78064 2001-06-11 12:39:29Z ume $
|
31.\" 32.Dd May 17, 1998 33.Dt PING6 8 34.Os 35.Sh NAME 36.Nm ping6 37.Nd send 38.Tn ICMPv6 ECHO_REQUEST 39packets to network hosts 40.Sh SYNOPSIS 41.Nm 42.\" without ipsec, or new ipsec
| 31.\" 32.Dd May 17, 1998 33.Dt PING6 8 34.Os 35.Sh NAME 36.Nm ping6 37.Nd send 38.Tn ICMPv6 ECHO_REQUEST 39packets to network hosts 40.Sh SYNOPSIS 41.Nm 42.\" without ipsec, or new ipsec
|
43.Op Fl dfHnNqRvw
| 43.Op Fl dfHnNqRtvw
|
44.\" old ipsec
| 44.\" old ipsec
|
45.\" .Op Fl AdEfnNqRvw
| 45.\" .Op Fl AdEfnNqRtvw
|
46.Bk -words 47.Op Fl a Ar addrtype 48.Ek 49.Bk -words 50.Op Fl b Ar bufsiz 51.Ek 52.Bk -words 53.Op Fl c Ar count 54.Ek 55.Bk -words 56.Op Fl h Ar hoplimit 57.Ek 58.Bk -words 59.Op Fl I Ar interface 60.Ek 61.Bk -words 62.Op Fl i Ar wait 63.Ek 64.Bk -words 65.Op Fl l Ar preload 66.Ek 67.Bk -words 68.Op Fl p Ar pattern 69.Ek 70.Bk -words 71.\" new ipsec 72.Op Fl P Ar policy 73.Ek 74.Bk -words 75.Op Fl S Ar sourceaddr 76.Ek 77.Bk -words 78.Op Fl s Ar packetsize 79.Ek 80.Bk -words 81.Op Ar hops...\& 82.Ek 83.Bk -words 84.Ar host 85.Ek 86.Sh DESCRIPTION 87.Nm 88uses the 89.Tn ICMPv6 90protocol's mandatory 91.Tn ICMP6_ECHO_REQUEST 92datagram to elicit an 93.Tn ICMP6_ECHO_REPLY 94from a host or gateway. 95.Tn ICMP6_ECHO_REQUEST 96datagrams (``pings'') have an IPv6 header, 97and 98.Tn ICMPv6 99header formatted as documented in RFC2463. 100The options are as follows: 101.Bl -tag -width Ds 102.\" old ipsec 103.\" .It Fl A 104.\" Enables transport-mode IPsec authentication header 105.\" .Pq experimental . 106.It Fl a Ar addrtype 107Generate ICMPv6 Node Information Node Addresses query, rather than echo-request. 108.Ar addrtype 109must be a string constructed of the following characters. 110.Bl -tag -width Ds -compact 111.It Ic a 112requests all the responder's unicast addresses. 113If the charater is ommited, 114only those addresses which belong to the interface which has the 115responder's address are requests. 116.It Ic c 117requests responder's IPv4-compatible and IPv4-mapped addresses. 118.It Ic g 119requests responder's global-scope addresses. 120.It Ic s 121requests responder's site-local addresses. 122.It Ic l 123requests responder's link-local addresses. 124.It Ic A 125requests responder's anycast addresses. 126Without this character, the responder will return unicast addresses only. 127With this character, the responder will return anycast addresses only. 128Note that the specification does not specify how to get responder's 129anycast addresses. 130This is an experimental option. 131.El 132.It Fl b Ar bufsiz 133Set socket buffer size. 134.It Fl c Ar count 135Stop after sending 136.Pq and receiving 137.Ar count 138.Tn ECHO_RESPONSE 139packets. 140.It Fl d 141Set the 142.Dv SO_DEBUG 143option on the socket being used. 144.\" .It Fl E 145.\" Enables transport-mode IPsec encapsulated security payload 146.\" .Pq experimental . 147.It Fl f 148Flood ping. 149Outputs packets as fast as they come back or one hundred times per second, 150whichever is more. 151For every 152.Tn ECHO_REQUEST 153sent a period 154.Dq .\& 155is printed, while for every 156.Tn ECHO_REPLY 157received a backspace is printed. 158This provides a rapid display of how many packets are being dropped. 159Only the super-user may use this option. 160.Bf -emphasis 161This can be very hard on a network and should be used with caution. 162.Ef 163.It Fl H 164Specifies to try reverse-lookup of IPv6 addresses. 165The 166.Nm 167command does not try reverse-lookup unless the option is specified. 168.It Fl h Ar hoplimit 169Set the IPv6 hoplimit. 170.It Fl I Ar interface 171Source packets with the given interface address. 172This flag applies if the ping destination is a multicast address, 173or link-local/site-local unicast address. 174.It Fl i Ar wait 175Wait 176.Ar wait 177seconds 178.Em between sending each packet . 179The default is to wait for one second between each packet. 180This option is incompatible with the 181.Fl f 182option. 183.It Fl l Ar preload 184If 185.Ar preload 186is specified,
| 46.Bk -words 47.Op Fl a Ar addrtype 48.Ek 49.Bk -words 50.Op Fl b Ar bufsiz 51.Ek 52.Bk -words 53.Op Fl c Ar count 54.Ek 55.Bk -words 56.Op Fl h Ar hoplimit 57.Ek 58.Bk -words 59.Op Fl I Ar interface 60.Ek 61.Bk -words 62.Op Fl i Ar wait 63.Ek 64.Bk -words 65.Op Fl l Ar preload 66.Ek 67.Bk -words 68.Op Fl p Ar pattern 69.Ek 70.Bk -words 71.\" new ipsec 72.Op Fl P Ar policy 73.Ek 74.Bk -words 75.Op Fl S Ar sourceaddr 76.Ek 77.Bk -words 78.Op Fl s Ar packetsize 79.Ek 80.Bk -words 81.Op Ar hops...\& 82.Ek 83.Bk -words 84.Ar host 85.Ek 86.Sh DESCRIPTION 87.Nm 88uses the 89.Tn ICMPv6 90protocol's mandatory 91.Tn ICMP6_ECHO_REQUEST 92datagram to elicit an 93.Tn ICMP6_ECHO_REPLY 94from a host or gateway. 95.Tn ICMP6_ECHO_REQUEST 96datagrams (``pings'') have an IPv6 header, 97and 98.Tn ICMPv6 99header formatted as documented in RFC2463. 100The options are as follows: 101.Bl -tag -width Ds 102.\" old ipsec 103.\" .It Fl A 104.\" Enables transport-mode IPsec authentication header 105.\" .Pq experimental . 106.It Fl a Ar addrtype 107Generate ICMPv6 Node Information Node Addresses query, rather than echo-request. 108.Ar addrtype 109must be a string constructed of the following characters. 110.Bl -tag -width Ds -compact 111.It Ic a 112requests all the responder's unicast addresses. 113If the charater is ommited, 114only those addresses which belong to the interface which has the 115responder's address are requests. 116.It Ic c 117requests responder's IPv4-compatible and IPv4-mapped addresses. 118.It Ic g 119requests responder's global-scope addresses. 120.It Ic s 121requests responder's site-local addresses. 122.It Ic l 123requests responder's link-local addresses. 124.It Ic A 125requests responder's anycast addresses. 126Without this character, the responder will return unicast addresses only. 127With this character, the responder will return anycast addresses only. 128Note that the specification does not specify how to get responder's 129anycast addresses. 130This is an experimental option. 131.El 132.It Fl b Ar bufsiz 133Set socket buffer size. 134.It Fl c Ar count 135Stop after sending 136.Pq and receiving 137.Ar count 138.Tn ECHO_RESPONSE 139packets. 140.It Fl d 141Set the 142.Dv SO_DEBUG 143option on the socket being used. 144.\" .It Fl E 145.\" Enables transport-mode IPsec encapsulated security payload 146.\" .Pq experimental . 147.It Fl f 148Flood ping. 149Outputs packets as fast as they come back or one hundred times per second, 150whichever is more. 151For every 152.Tn ECHO_REQUEST 153sent a period 154.Dq .\& 155is printed, while for every 156.Tn ECHO_REPLY 157received a backspace is printed. 158This provides a rapid display of how many packets are being dropped. 159Only the super-user may use this option. 160.Bf -emphasis 161This can be very hard on a network and should be used with caution. 162.Ef 163.It Fl H 164Specifies to try reverse-lookup of IPv6 addresses. 165The 166.Nm 167command does not try reverse-lookup unless the option is specified. 168.It Fl h Ar hoplimit 169Set the IPv6 hoplimit. 170.It Fl I Ar interface 171Source packets with the given interface address. 172This flag applies if the ping destination is a multicast address, 173or link-local/site-local unicast address. 174.It Fl i Ar wait 175Wait 176.Ar wait 177seconds 178.Em between sending each packet . 179The default is to wait for one second between each packet. 180This option is incompatible with the 181.Fl f 182option. 183.It Fl l Ar preload 184If 185.Ar preload 186is specified,
|
187.Nm ping
| 187.Nm
|
188sends that many packets as fast as possible before falling into its normal 189mode of behavior. 190Only the super-user may use this option. 191.It Fl n 192Numeric output only.
| 188sends that many packets as fast as possible before falling into its normal 189mode of behavior. 190Only the super-user may use this option. 191.It Fl n 192Numeric output only.
|
193No attempt will be made to lookup symbolic names for host addresses.
| 193No attempt will be made to lookup symbolic names from addresses in the reply.
|
194.It Fl N 195Probe node information multicast group 196.Pq Li ff02::2:xxxx:xxxx . 197.Ar host 198must be string hostname of the target 199.Pq must not be a numeric IPv6 address . 200Node information multicast group will be computed based on given 201.Ar host , 202and will be used as the final destination. 203Since node information multicast group is a link-local multicast group, 204destination link needs to be specified by 205.Fl I 206option. 207.It Fl p Ar pattern 208You may specify up to 16 209.Dq pad 210bytes to fill out the packet you send. 211This is useful for diagnosing data-dependent problems in a network. 212For example, 213.Dq Li \-p ff 214will cause the sent packet to be filled with all 215ones.
| 194.It Fl N 195Probe node information multicast group 196.Pq Li ff02::2:xxxx:xxxx . 197.Ar host 198must be string hostname of the target 199.Pq must not be a numeric IPv6 address . 200Node information multicast group will be computed based on given 201.Ar host , 202and will be used as the final destination. 203Since node information multicast group is a link-local multicast group, 204destination link needs to be specified by 205.Fl I 206option. 207.It Fl p Ar pattern 208You may specify up to 16 209.Dq pad 210bytes to fill out the packet you send. 211This is useful for diagnosing data-dependent problems in a network. 212For example, 213.Dq Li \-p ff 214will cause the sent packet to be filled with all 215ones.
|
216.Fl Q 217flag, 218.Nm 219prints out any ICMP error messages caused by its own ECHO_REQUEST 220messages.
| |
221.\" new ipsec 222.It Fl P Ar policy 223.Ar policy 224specifies IPsec policy to be used for the probe. 225.It Fl q 226Quiet output. 227Nothing is displayed except the summary lines at startup time and 228when finished. 229.It Fl R 230Make the kernel believe that the target 231.Ar host 232.Po 233or the first 234.Ar hop 235if you specify 236.Ar hops 237.Pc 238is reachable, by injecting upper-layer reachability confirmation hint. 239The option is meaningful only if the target 240.Ar host 241.Pq or the first hop 242is a neighbor. 243.It Fl S Ar sourceaddr 244Specifies the source address of request packets. 245The source address must be one of the unicast addresses of the sending node. 246If the outgoing interface is specified by the 247.Fl I 248option as well, 249.Ar sourceaddr 250needs to be an address assigned to the specified interface. 251.It Fl s Ar packetsize 252Specifies the number of data bytes to be sent. 253The default is 56, which translates into 64 254.Tn ICMP 255data bytes when combined 256with the 8 bytes of 257.Tn ICMP 258header data. 259You may need to specify 260.Fl b 261as well to extend socket buffer size.
| 216.\" new ipsec 217.It Fl P Ar policy 218.Ar policy 219specifies IPsec policy to be used for the probe. 220.It Fl q 221Quiet output. 222Nothing is displayed except the summary lines at startup time and 223when finished. 224.It Fl R 225Make the kernel believe that the target 226.Ar host 227.Po 228or the first 229.Ar hop 230if you specify 231.Ar hops 232.Pc 233is reachable, by injecting upper-layer reachability confirmation hint. 234The option is meaningful only if the target 235.Ar host 236.Pq or the first hop 237is a neighbor. 238.It Fl S Ar sourceaddr 239Specifies the source address of request packets. 240The source address must be one of the unicast addresses of the sending node. 241If the outgoing interface is specified by the 242.Fl I 243option as well, 244.Ar sourceaddr 245needs to be an address assigned to the specified interface. 246.It Fl s Ar packetsize 247Specifies the number of data bytes to be sent. 248The default is 56, which translates into 64 249.Tn ICMP 250data bytes when combined 251with the 8 bytes of 252.Tn ICMP 253header data. 254You may need to specify 255.Fl b 256as well to extend socket buffer size.
|
| 257.It Fl t 258Generate ICMPv6 Node Information supported query types query, 259rather than echo-request. 260.Fl s 261has no effect if 262.Fl t 263is specified.
|
262.It Fl v 263Verbose output. 264.Tn ICMP 265packets other than 266.Tn ECHO_RESPONSE 267that are received are listed. 268.It Fl w
| 264.It Fl v 265Verbose output. 266.Tn ICMP 267packets other than 268.Tn ECHO_RESPONSE 269that are received are listed. 270.It Fl w
|
269Generate ICMPv6 Node Information FQDN query, rather than echo-request.
| 271Generate ICMPv6 Node Information DNS Name query, rather than echo-request.
|
270.Fl s 271has no effect if 272.Fl w 273is specified. 274.It Fl W 275Same as 276.Fl w , 277but with old packet format based on 03 draft. 278This option is present for backward compatibility. 279.Fl s 280has no effect if 281.Fl w 282is specified. 283.It Ar hops 284IPv6 addresses for intermediate nodes, 285which will be put into type 0 routing header. 286.It Ar host 287IPv6 adddress of the final destination node. 288.El 289.Pp 290When using 291.Nm 292for fault isolation, it should first be run on the local host, to verify 293that the local network interface is up and running. 294Then, hosts and gateways further and further away should be 295.Dq pinged . 296Round-trip times and packet loss statistics are computed. 297If duplicate packets are received, they are not included in the packet 298loss calculation, although the round trip time of these packets is used 299in calculating the round-trip time statistics. 300When the specified number of packets have been sent 301.Pq and received 302or if the program is terminated with a 303.Dv SIGINT , 304a brief summary is displayed, showing the number of packets sent and 305received, and the minimum, maximum, mean, and standard deviation of 306the round-trip times. 307.Pp 308This program is intended for use in network testing, measurement and 309management. 310Because of the load it can impose on the network, it is unwise to use 311.Nm 312during normal operations or from automated scripts. 313.\" .Sh ICMP PACKET DETAILS 314.\" An IP header without options is 20 bytes. 315.\" An 316.\" .Tn ICMP 317.\" .Tn ECHO_REQUEST 318.\" packet contains an additional 8 bytes worth of 319.\" .Tn ICMP 320.\" header followed by an arbitrary amount of data. 321.\" When a 322.\" .Ar packetsize 323.\" is given, this indicated the size of this extra piece of data 324.\" .Pq the default is 56 . 325.\" Thus the amount of data received inside of an IP packet of type 326.\" .Tn ICMP 327.\" .Tn ECHO_REPLY 328.\" will always be 8 bytes more than the requested data space 329.\" .Pq the Tn ICMP header . 330.\" .Pp 331.\" If the data space is at least eight bytes large, 332.\" .Nm 333.\" uses the first eight bytes of this space to include a timestamp which 334.\" it uses in the computation of round trip times. 335.\" If less than eight bytes of pad are specified, no round trip times are 336.\" given. 337.Sh DUPLICATE AND DAMAGED PACKETS
| 272.Fl s 273has no effect if 274.Fl w 275is specified. 276.It Fl W 277Same as 278.Fl w , 279but with old packet format based on 03 draft. 280This option is present for backward compatibility. 281.Fl s 282has no effect if 283.Fl w 284is specified. 285.It Ar hops 286IPv6 addresses for intermediate nodes, 287which will be put into type 0 routing header. 288.It Ar host 289IPv6 adddress of the final destination node. 290.El 291.Pp 292When using 293.Nm 294for fault isolation, it should first be run on the local host, to verify 295that the local network interface is up and running. 296Then, hosts and gateways further and further away should be 297.Dq pinged . 298Round-trip times and packet loss statistics are computed. 299If duplicate packets are received, they are not included in the packet 300loss calculation, although the round trip time of these packets is used 301in calculating the round-trip time statistics. 302When the specified number of packets have been sent 303.Pq and received 304or if the program is terminated with a 305.Dv SIGINT , 306a brief summary is displayed, showing the number of packets sent and 307received, and the minimum, maximum, mean, and standard deviation of 308the round-trip times. 309.Pp 310This program is intended for use in network testing, measurement and 311management. 312Because of the load it can impose on the network, it is unwise to use 313.Nm 314during normal operations or from automated scripts. 315.\" .Sh ICMP PACKET DETAILS 316.\" An IP header without options is 20 bytes. 317.\" An 318.\" .Tn ICMP 319.\" .Tn ECHO_REQUEST 320.\" packet contains an additional 8 bytes worth of 321.\" .Tn ICMP 322.\" header followed by an arbitrary amount of data. 323.\" When a 324.\" .Ar packetsize 325.\" is given, this indicated the size of this extra piece of data 326.\" .Pq the default is 56 . 327.\" Thus the amount of data received inside of an IP packet of type 328.\" .Tn ICMP 329.\" .Tn ECHO_REPLY 330.\" will always be 8 bytes more than the requested data space 331.\" .Pq the Tn ICMP header . 332.\" .Pp 333.\" If the data space is at least eight bytes large, 334.\" .Nm 335.\" uses the first eight bytes of this space to include a timestamp which 336.\" it uses in the computation of round trip times. 337.\" If less than eight bytes of pad are specified, no round trip times are 338.\" given. 339.Sh DUPLICATE AND DAMAGED PACKETS
|
338.Nm Ping6
| 340.Nm
|
339will report duplicate and damaged packets. 340Duplicate packets should never occur when pinging a unicast address, 341and seem to be caused by 342inappropriate link-level retransmissions. 343Duplicates may occur in many situations and are rarely 344.Pq if ever 345a good sign, although the presence of low levels of duplicates may not 346always be cause for alarm. 347Duplicates are expected when pinging a broadcast or multicast address, 348since they are not really duplicates but replies from different hosts 349to the same request. 350.Pp 351Damaged packets are obviously serious cause for alarm and often 352indicate broken hardware somewhere in the
| 341will report duplicate and damaged packets. 342Duplicate packets should never occur when pinging a unicast address, 343and seem to be caused by 344inappropriate link-level retransmissions. 345Duplicates may occur in many situations and are rarely 346.Pq if ever 347a good sign, although the presence of low levels of duplicates may not 348always be cause for alarm. 349Duplicates are expected when pinging a broadcast or multicast address, 350since they are not really duplicates but replies from different hosts 351to the same request. 352.Pp 353Damaged packets are obviously serious cause for alarm and often 354indicate broken hardware somewhere in the
|
353.Nm ping
| 355.Nm
|
354packet's path 355.Pq in the network or in the hosts . 356.Sh TRYING DIFFERENT DATA PATTERNS 357The 358(inter)network 359layer should never treat packets differently depending on the data 360contained in the data portion. 361Unfortunately, data-dependent problems have been known to sneak into 362networks and remain undetected for long periods of time. 363In many cases the particular pattern that will have problems is something 364that does not have sufficient 365.Dq transitions , 366such as all ones or all zeros, or a pattern right at the edge, such as 367almost all zeros. 368It is not 369necessarily enough to specify a data pattern of all zeros (for example) 370on the command line because the pattern that is of interest is 371at the data link level, and the relationship between what you type and 372what the controllers transmit can be complicated. 373.Pp 374This means that if you have a data-dependent problem you will probably 375have to do a lot of testing to find it. 376If you are lucky, you may manage to find a file that either 377cannot 378be sent across your network or that takes much longer to transfer than 379other similar length files. 380You can then examine this file for repeated patterns that you can test 381using the 382.Fl p 383option of 384.Nm . 385.Sh RETURN VALUES 386.Nm 387returns 0 on success (the host is alive), 388and non-zero if the arguments are incorrect or the host is not responding.
| 356packet's path 357.Pq in the network or in the hosts . 358.Sh TRYING DIFFERENT DATA PATTERNS 359The 360(inter)network 361layer should never treat packets differently depending on the data 362contained in the data portion. 363Unfortunately, data-dependent problems have been known to sneak into 364networks and remain undetected for long periods of time. 365In many cases the particular pattern that will have problems is something 366that does not have sufficient 367.Dq transitions , 368such as all ones or all zeros, or a pattern right at the edge, such as 369almost all zeros. 370It is not 371necessarily enough to specify a data pattern of all zeros (for example) 372on the command line because the pattern that is of interest is 373at the data link level, and the relationship between what you type and 374what the controllers transmit can be complicated. 375.Pp 376This means that if you have a data-dependent problem you will probably 377have to do a lot of testing to find it. 378If you are lucky, you may manage to find a file that either 379cannot 380be sent across your network or that takes much longer to transfer than 381other similar length files. 382You can then examine this file for repeated patterns that you can test 383using the 384.Fl p 385option of 386.Nm . 387.Sh RETURN VALUES 388.Nm 389returns 0 on success (the host is alive), 390and non-zero if the arguments are incorrect or the host is not responding.
|
| 391.Sh EXAMPLES 392Normally, 393.Xr ping6 8 394works just like 395.Xr ping 8 396would work; the following will send ICMPv6 echo request to 397.Li dst.foo.com . 398.Bd -literal -offset indent 399ping6 -n dst.foo.com 400.Ed 401.Pp 402The following will probe hostnames for all nodes on the network link attached to 403.Li wi0 404interface. 405The address 406.Li ff02::1 407is named the link-local all-node multicast address, and the packet would 408reach every node on the network link. 409.Bd -literal -offset indent 410ping6 -w ff02::1%wi0 411.Ed 412.Pp 413The following will probe addresses assigned to the destination node, 414.Li dst.foo.com . 415.Bd -literal -offset indent 416ping6 -a agl dst.foo.com 417.Ed 418.Pp
|
389.Sh SEE ALSO 390.Xr netstat 1 ,
| 419.Sh SEE ALSO 420.Xr netstat 1 ,
|
| 421.Xr icmp6 4 , 422.Xr inet6 4 , 423.Xr ip6 4 ,
|
391.Xr ifconfig 8 , 392.Xr ping 8 , 393.Xr routed 8 , 394.Xr traceroute 8 , 395.Xr traceroute6 8 396.Rs 397.%A A. Conta 398.%A S. Deering 399.%T "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification" 400.%N RFC2463 401.%D December 1998 402.Re 403.Rs 404.%A Matt Crawford 405.%T "IPv6 Node Information Queries"
| 424.Xr ifconfig 8 , 425.Xr ping 8 , 426.Xr routed 8 , 427.Xr traceroute 8 , 428.Xr traceroute6 8 429.Rs 430.%A A. Conta 431.%A S. Deering 432.%T "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification" 433.%N RFC2463 434.%D December 1998 435.Re 436.Rs 437.%A Matt Crawford 438.%T "IPv6 Node Information Queries"
|
406.%N draft-ietf-ipngwg-icmp-name-lookups-05.txt 407.%D October 22, 1999
| 439.%N draft-ietf-ipngwg-icmp-name-lookups-07.txt 440.%D August 2000
|
408.%O work in progress material 409.Re 410.Sh BUGS 411There have been many discussions on why we separate 412.Xr ping6 8 413and 414.Xr ping 8 . 415Some people argued that it would be more convenient to uniform the 416ping command for both IPv4 and IPv6. 417The followings are an answer to the request. 418.Pp 419From a developer's point of view: 420since the underling API is totally different between IPv4 and IPv6, 421we would end up having two types of code base. 422There would actually be less benefit to uniform the two commands 423into a single command from the developer's standpoint. 424.Pp 425From an operator's point of view: unlike ordinary network applications 426like remote login tools, we are usually aware of address family when using 427network management tools. 428We do not just want to know the reachability to the host, but want to know the 429reachability to the host via a particular network protocol such as 430IPv6. 431Thus, even if we had a unified 432.Xr ping 8 433command for both IPv4 and IPv6, we would usually type a 434.Fl 6 435or 436.Fl 4 437option (or something like those) to specify the particular address family. 438This essentially means that we have two different commands. 439.Sh HISTORY 440The
| 441.%O work in progress material 442.Re 443.Sh BUGS 444There have been many discussions on why we separate 445.Xr ping6 8 446and 447.Xr ping 8 . 448Some people argued that it would be more convenient to uniform the 449ping command for both IPv4 and IPv6. 450The followings are an answer to the request. 451.Pp 452From a developer's point of view: 453since the underling API is totally different between IPv4 and IPv6, 454we would end up having two types of code base. 455There would actually be less benefit to uniform the two commands 456into a single command from the developer's standpoint. 457.Pp 458From an operator's point of view: unlike ordinary network applications 459like remote login tools, we are usually aware of address family when using 460network management tools. 461We do not just want to know the reachability to the host, but want to know the 462reachability to the host via a particular network protocol such as 463IPv6. 464Thus, even if we had a unified 465.Xr ping 8 466command for both IPv4 and IPv6, we would usually type a 467.Fl 6 468or 469.Fl 4 470option (or something like those) to specify the particular address family. 471This essentially means that we have two different commands. 472.Sh HISTORY 473The
|
441.Nm ping
| 474.Xr ping 8
|
442command appeared in 443.Bx 4.3 . 444The 445.Nm 446command with IPv6 support first appeared in WIDE Hydrangea IPv6 protocol stack 447kit. 448.Pp 449IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack 450was initially integrated into 451.Fx 4.0
| 475command appeared in 476.Bx 4.3 . 477The 478.Nm 479command with IPv6 support first appeared in WIDE Hydrangea IPv6 protocol stack 480kit. 481.Pp 482IPv6 and IPsec support based on the KAME Project (http://www.kame.net/) stack 483was initially integrated into 484.Fx 4.0
|