1 Star 0 Fork 4.9K

bill / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ping6.md 6.61 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

ping6

Command Function

This command is used to test whether the IPv6 network connection is normal.

Syntax

ping6 [-c count] [-I interface / sourceAddress] destination

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

-c count

Indicates the number of execution times. If this parameter is not specified, the default value is 4.

1~65535

-I interface

Performs an IPv6 ping operation for a specified NIC.

N/A

-I sourceAddress

Indicates the source IPv6 address to be pinged.

N/A

destination

Indicates the IP address of the destination host.

N/A

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

  1. 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
  2. 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
  3. 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
  4. 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
1
https://gitee.com/ximeibaba/docs.git
git@gitee.com:ximeibaba/docs.git
ximeibaba
docs
docs
master

搜索帮助