ping6
Command Function
This command is used to test an IPv6 network connection.
Syntax
ping6 [-c count] [-I interface / sourceAddress] destination
Parameters
Table 1 Parameter description
Specifies the number of execution times. If this parameter is not specified, the default value is 4. |
||
Usage
- If the destination IPv6 address is unreachable, the system displays a message indicating that the request times out.
- If no route is available to the destination IPv6 address, an error message is displayed.
- This command can be used only after the TCP/IP protocol stack is enabled.
Example
- ping6 2001:a:b:c:d:e:f:b
- ping6 -c 3 2001:a:b:c:d:e:f:b
- ping6 -I eth0 2001:a:b:c:d:e:f:b
- ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b
Output
-
Output of ping6 2001:a:b:c:d:e:f:b:
OHOS # ping6 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data. 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms --- 2001:a:b:c:d:e:f:b/64 ping statistics --- 4 packets transmitted, 4 received, 0.00% packet loss, time 20ms rtt min/avg/max = 0/0.00/0 ms
-
Output of ping6 -c 3 2001:a:b:c:d:e:f:b:
OHOS # ping6 -c 3 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data. 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms --- 2001:a:b:c:d:e:f:b/64 ping statistics --- 3 packets transmitted, 3 received, 0.00% packet loss, time 20ms rtt min/avg/max = 0/0.00/0 ms
-
Output of ping6 -I eth0 2001:a:b:c:d:e:f:b:
OHOS # ping6 -I eth0 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data. 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time=10 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms --- 2001:a:b:c:d:e:f:b/64 ping statistics --- 4 packets transmitted, 4 received, 0.00% packet loss, time 30msrtt min/avg/max = 0/2.50/10 ms
-
Output of ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b:
OHOS # ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data. 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms --- 2001:a:b:c:d:e:f:b/64 ping statistics --- 4 packets transmitted, 4 received, 0.00% packet loss, time 20msrtt min/avg/max = 0/0.00/0 ms