The ping ipv6 command checks whether a specified IPv6 address is reachable and exports corresponding statistics.
ping ipv6 [ -a source-ipv6-address | -c count | -h ttl-value | -m time | -name | -s packetsize | -t timeout | -tc traffic-class-value | vpn-instance vpn-instance-name ] * host [ -i interface-type interface-number ]
Parameter | Description | Value |
---|---|---|
-a source-ipv6-address | Specifies a source IPv6 address for sending ICMPv6 Echo Request messages. If no source IPv6 address is specified, the IPv6 address of the outbound interface is used as the source address for sending ICMPv6 Echo Request messages. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
-c count | Specifies the number of times for sending ICMPv6 Echo Request messages. You can increase the number of outgoing packets to detect the network quality based on the packet loss rate. |
The value is an integer that ranges from 1 to 4294967295. The default value is 5. |
-h ttl-value | Specifies the TTL value. If the TTL field is reduced to 0 during message forwarding, the Layer 3 switch that the message reaches sends an ICMPv6 timeout message to the source host, indicating that the destination host is unreachable. |
The value is an integer that ranges from 1 to 255. The default value is 255. |
-m time | Specifies the time to wait before sending the next ICMPv6
Echo Request message. Each time the source sends an ICMPv6 Echo Request message using the ping ipv6 command, the source waits a period of time (2000 ms by default) before sending the next ICMPv6 Echo Request message. You can set the time to wait before sending the next ICMPv6 Echo Request message using the parameter time. In the case of poor network condition, the value should be equal to or larger than 2000, in milliseconds. |
The value is an integer that ranges from 1 to 10000, in milliseconds. The default value is 2000. |
-name | Displays the name of the destination host. | - |
-s packetsize | Specifies the length of an ICMPv6 Echo Request message, excluding the IP header and ICMPv6 header. |
The value is an integer that ranges from 20 to 9600, in bytes. The default value is 56. |
-t timeout | Specifies the timeout period to wait for an ICMPv6 Echo Reply message after an ICMPv6 Echo Request message is sent. After the ping ipv6 command is run, the source sends an ICMPv6 Echo Request message to a destination and waits for an ICMPv6 Echo Reply message. If the destination, after receiving the ICMPv6 Echo Request message, returns an ICMPv6 Echo Reply message to the source within the period specified by the parameter timeout, the destination is reachable. If the destination does not return an ICMPv6 Echo Reply message within the specified period, the source displays that the message times out. Normally, the source receives an ICMPv6 Echo Reply message within 1 to 10 seconds after sending an ICMPv6 Echo Request message. If the transmission speed is low, properly prolong the timeout period. |
The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 2000. |
-tc traffic-class-value | Specifies the traffic classification in the ICMPv6 Echo Request message. To configure traffic control for ICMPv6 packets, set the parameter traffic-class-value. |
The value is an integer that ranges from 0 to 255. The default value is 0. |
vpn-instance vpn-instance-name | Specifies the name of a VPN instance for the IPv6 address family. |
The value must be an existing VPN instance name. |
host | Specifies the host name or IPv6 address of the destination host. |
The value is a string of 1 to 255 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The IPv6 address is a 32–bit string in hexadecimal format, namely, the format X:X:X:X:X:X:X:X. |
-i interface-type interface-number | Specifies the outbound interface for sending ICMPv6 Echo Request messages. |
- |
Usage Scenario
Check the protocol stack on the local device. You can run the ping ipv6 IPv6-loopback-address command to check whether the TCP/IP protocol stack works properly on the local device.
Check whether the destination IPv6 host is reachable on an IPv6 network. You can run the ping ipv6 host command to send an ICMPv6 Echo Request message to the destination host. If a reply is received, the destination host is reachable.
Check whether the peer is reachable on a Layer 3 VPN. On a Layer 3 VPN, devices may not have routing information about each other. Therefore, you cannot use the ping ipv6 host command to check whether the peer is reachable. When a VPN instance name is specified, you can run the ping ipv6 vpn-instance vpn-instance-name host command to send an ICMPv6 Echo Request message to the peer. If the peer returns an ICMPv6 Echo Reply message, the peer is reachable.
In the case of an unstable network, you can run the ping ipv6 -c count -t timeout host command to check the quality of the network between the local device and the peer. By analyzing the packet loss rate and average delay in the command output, you can evaluate the network quality. If the network is unreliable, set the packet transmission count (-c) and timeout (-t) to the upper limits. This makes the test result accurate.
Prerequisites
Precautions
# Check whether the host with the IPv6 address as FC00::1 is reachable.
<HUAWEI> ping ipv6 FC00::1
PING FC00::1 : 56 data bytes, press CTRL_C to break
Reply from FC00::1
bytes=56 Sequence=1 hop limit=64 time=115 ms
Reply from FC00::1
bytes=56 Sequence=2 hop limit=64 time=1 ms
Reply from FC00::1
bytes=56 Sequence=3 hop limit=64 time=1 ms
Reply from FC00::1
bytes=56 Sequence=4 hop limit=64 time=1 ms
Reply from FC00::1
bytes=56 Sequence=5 hop limit=64 time=1 ms
---FC00::1 ping statistics---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max=1/23/115 ms
Item |
Description |
---|---|
PING HH:HH::HH:H |
IPv6 address of the destination host. |
x data bytes |
Length of a sent ICMPv6 Echo Request message. |
press CTRL_C to break |
The ongoing IPv6 ping test is terminated after you press Ctrl+C. |
Reply from HH:HH::HH:H |
The destination host responds to the ICMPv6 Echo Request
message with an ICMPv6 Echo Reply message that contains the following
items:
|
HH:HH::HH:H ping statistics |
Statistics collected after the IPv6 ping test on the destination
host. The statistics include the following information:
|