ping6
句法
ping6 {< IPv6-ADDR>|<主机名>} [data-fill<模式>|datagram-size |interval|repetitions |timeout|vrrp |VRF ]
Description
Pings the specified IPv6 address or hostname with or without optional parameters.The VRRP option is provided to self-ping the configured link-local address on the VRRP group.
命令上下文
Operator (>
) or Manager (#
)
Parameters
-
IPv6-ADDR
-
Selects the IPv6 address to ping.
-
主机名
-
Selects the hostname to ping. Range: 1-256 characters
-
data-fill<模式>
-
Specifies the data pattern in hexadecimal digits to send. A maximum of 16 "pad" bytes can be specified to fill out the ICMP packet. Default: AB
-
datagram-size
-
Specifies the ping datagram size. Range: 0-65399, default: 100.
-
interval
-
Specifies the interval between successive ping requests in seconds. Range: 1-60 seconds, default: 1 second.
-
repetitions
-
Specifies the number of packets to send. Range: 1-10000 packets, default: Five packets.
-
timeout
-
Specifies the ping timeout in seconds. Range: 1-60 seconds, default: 2 seconds.
-
vrrp
-
Specifies the VRRP group ID.
-
VRF
-
指定要使用的虚拟路由和转发(VRF)。如果没有提供此选项,则使用默认的VRF。
Authority
Operators or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.
Examples
ping ipv6地址:
switch#ping6 2020::2PING 2020::2(2020::2) 100 data bytes 108 bytes from 2020::2: icmp_seq=1 ttl=64 time=0.386 ms 108 bytes from 2020::2: icmp_seq=2 ttl=64 time=0.235 ms 108 bytes from 2020::2: icmp_seq=3 ttl=64 time=0.249 ms 108 bytes from 2020::2: icmp_seq=4 ttl=64 time=0.240 ms 108 bytes from 2020::2: icmp_seq=5 ttl=64 time=0.252 ms --- 2020::2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4000ms rtt min/avg/max/mdev = 0.235/0.272/0.386/0.059 ms
ping本地主机:
switch#ping6 localhostPING localhost(localhost) 100 data bytes 108 bytes from localhost: icmp_seq=1 ttl=64 time=0.093 ms 108 bytes from localhost: icmp_seq=2 ttl=64 time=0.051 ms 108 bytes from localhost: icmp_seq=3 ttl=64 time=0.055 ms 108 bytes from localhost: icmp_seq=4 ttl=64 time=0.046 ms 108 bytes from localhost: icmp_seq=5 ttl=64 time=0.048 ms --- localhost ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.046/0.058/0.093/0.019 ms
Pinging a server with a data pattern:
switch#ping6 2020::2 data-fill abPATTERN: 0xab PING 2020::2(2020::2) 100 data bytes 108 bytes from 2020::2: icmp_seq=1 ttl=64 time=0.038 ms 108 bytes from 2020::2: icmp_seq=2 ttl=64 time=0.074 ms 108 bytes from 2020::2: icmp_seq=3 ttl=64 time=0.076 ms 108 bytes from 2020::2: icmp_seq=4 ttl=64 time=0.075 ms 108 bytes from 2020::2: icmp_seq=5 ttl=64 time=0.077 ms --- 2020::2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 0.038/0.068/0.077/0.015 ms
Pinging a server with a datagram size:
switch#ping6 2020 :: 2数据报尺度200PING 2020::2(2020::2) 200 data bytes 208 bytes from 2020::2: icmp_seq=1 ttl=64 time=0.037 ms 208 bytes from 2020::2: icmp_seq=2 ttl=64 time=0.076 ms 208 bytes from 2020::2: icmp_seq=3 ttl=64 time=0.076 ms 208 bytes from 2020::2: icmp_seq=4 ttl=64 time=0.077 ms 208 bytes from 2020::2: icmp_seq=5 ttl=64 time=0.066 ms --- 2020::2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 0.037/0.066/0.077/0.016 ms
使用指定间隔的服务器进行ping:
switch#ping6 2020::2 interval 5PING 2020::2(2020::2) 100 data bytes 108 bytes from 2020::2: icmp_seq=1 ttl=64 time=0.043 ms 108 bytes from 2020::2: icmp_seq=2 ttl=64 time=0.075 ms 108 bytes from 2020::2: icmp_seq=3 ttl=64 time=0.074 ms 108 bytes from 2020::2: icmp_seq=4 ttl=64 time=0.075 ms 108 bytes from 2020::2: icmp_seq=5 ttl=64 time=0.075 ms --- 2020::2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 19999ms rtt min/avg/max/mdev = 0.043/0.068/0.075/0.014 ms
使用指定数量的数据包ping服务器:
switch#ping6 2020::2 repetitions 6PING 2020::2(2020::2) 100 data bytes 108 bytes from 2020::2: icmp_seq=1 ttl=64 time=0.039 ms 108 bytes from 2020::2: icmp_seq=2 ttl=64 time=0.070 ms 108 bytes from 2020::2: icmp_seq=3 ttl=64 time=0.076 ms 108 bytes from 2020::2: icmp_seq=4 ttl=64 time=0.076 ms 108 bytes from 2020::2: icmp_seq=5 ttl=64 time=0.071 ms 108 bytes from 2020::2: icmp_seq=6 ttl=64 time=0.078 ms --- 2020::2 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 4999ms rtt min/avg/max/mdev = 0.039/0.068/0.078/0.015 ms
switch#ping6 localhost多联机红PING localhost(localhost) 100 data bytes 108 bytes from localhost: icmp_seq=1 ttl=64 time=0.038 ms 108 bytes from localhost: icmp_seq=2 ttl=64 time=0.050 ms 108 bytes from localhost: icmp_seq=3 ttl=64 time=0.039 ms 108 bytes from localhost: icmp_seq=4 ttl=64 time=0.040 ms 108 bytes from localhost: icmp_seq=5 ttl=64 time=0.027 ms --- localhost ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4001ms rtt min/avg/max/mdev = 0.027/0.038/0.050/0.010 ms
switch#Ping6 Local -Host VRF MGMTping localhost(localhost)100个数据字节108字节来自LocalHost:icmp_seq = 1 ttl = 64 ttl = 64 time = 0.032 ms 108字节来自LocalHost:localhost:icmp_seq = 2 ttl = 2 ttl = 64 time = 0.022 ms 108 bytes = 0.022 ms 108 bytes from localhost from localhost:icmp_seq = 64 time = 3 tttl = 64 time=0.040 ms 108 bytes from localhost: icmp_seq=4 ttl=64 time=0.022 ms 108 bytes from localhost: icmp_seq=5 ttl=64 time=0.046 ms --- localhost ping statistics --- 5 packets transmitted, 5 received, 0百分比丢失,时间3998ms RTT最小/AVG/MAX/MDEV = 0.022/0.032/0.046/0.010 ms