The ping ipv6 command checks whether the host is reachable. ICMPv6 echo request packets are sent out. If the host sends back the response packets, it indicates the host is reachable.
ping ipv6 [ -a source-ip-address | -c count | -m time | -s packetsize | -t timeout | -tc traffic-class-value | vpn-instance vpn-instance-name | -h hop-limit-value | -name ] * host [ -i interface-type interface-number ]
| Parameter | Description | Value |
|---|---|---|
-a source-ip-address |
Specifies a source IPv6 address of the Internet Control Message Protocol (ICMP) ECHO-REQUEST message. If the source IPv6 address is not specified, the IPv6 address of the outbound interface is used as the source IPv6 address of the ICMP ECHO-REQUEST message. |
- |
-c count |
Specifies the number of ICMP Echo-Request messages to be sent. ping command is run, an ICMP Echo-Request message carrying a sequence number is sent. The sequence number of the ICMP ECHO-REQUEST message starts from 1 and is increased by 1. By default, a maximum of five ICMP ECHO-REQUEST messages are sent. You can set the number of ICMP ECHO-REQUEST messages to be sent through the parameter count. If the destination is reachable, the source can receive five ICMP Echo Reply messages from the destination, with sequence numbers corresponding to those of ICMP ECHO-REQUEST messages. In the case of a poor network quality, you can set this parameter to a comparatively large value to check the network quality according to the packet loss percentage. |
The value is an integer ranging from 1 to 4294967295. The default value is 5. |
-m time |
Specifies a period for waiting for the next ICMP ECHO-REQUEST message. Each time the source sends an ICMP ECHO-REQUEST message through the ping command, it waits a period of time (500 ms by default) before sending the next ICMP ECHO-REQUEST message. You can set the period for waiting for the next ICMP ECHO-REQUEST message through the parameter time. In the case of poor network condition, the value should be greater than 500, in ms. |
The value is an integer ranging from 1 to 10000, in ms. The default value is 500. |
-s packetsize |
Specifies the length of an ICMP ECHO-REQUEST message, excluding the IP header and ICMP header. |
The value is an integer ranging from 20 to 9600, in bytes. The default value is 56. |
-t timeout |
Specifies the timeout period for waiting for an ICMP Echo Response message after an ICMP ECHO-REQUEST message is sent. After the ping command is run, the source sends an ICMP ECHO-REQUEST message to a destination and then waits for an ICMP Echo Response message. If the destination, after receiving the ICMP ECHO-REQUEST message, returns an ICMP Echo Response message to the source within the period specified by the parameter timeout, it indicates that the destination is reachable. If the destination does not return an ICMP Echo Response message within the specified period, the source displays that the message times out. Normally, the source receives an ICMP Echo Response message 1 to 10 seconds after sending an ICMP ECHO-REQUEST message. If the transmission speed is not satisfying, you can use this parameter to increase the timeout period for waiting for an ICMP Echo Response message after an ICMP ECHO-REQUEST message is sent. |
The value is an integer ranging from 0 to 65535, in ms. The default value is 2000. |
-tc traffic-class-value |
Specifies a traffic classification in the ICMP ECHO-REQUEST message. The value is an integer that ranges from 0 to 255. The default value is 0. |
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 the VPN instance. |
The value is a string of 1 to 31 characters, spaces not supported. |
-h hop-limit-value |
Specifies the value of the TTL. Each time if the TTL field is decreased to 0 during message forwarding, the router that the message reaches sends an ICMP timeout message to the source, indicating that the destination is unreachable. |
The value is an integer ranging from 1 to 255. |
-name |
Displays the host name of the destination address. |
- |
host |
Specifies a domain name or an IPv6 address of the destination host. |
The value is a string of 1 to 46 characters. If the parameter value is an IP address, set the format of the parameter to X:X:X:X:X:X:X:X. |
-i interface-type interface-number |
Specifies an interface for sending ICMP ECHO-REQUEST messages. |
- |
Options can be set to specify the number of echo request packets and size of packets to be sent to the ping target address. The timeout option specifies the time for which the program must wait for an echo response from the destination.
If the host name of the destination is specified, the DNS server looks up the IPv6 address for the host and then sends echo request packets to the destination.
If the IPv6 address of the destination host is a link-local address, specify the local outgoing interface name on which the echo requests are to be sent; otherwise, the ping fails.
# Ping the IPv6 address to check whether the host or device is reachable.
<sysname> ping ipv6 5f00:6d00:c01f::3
PING 5f00:6d00:c01f::3 : 56 data bytes, press CTRL_C to break
Reply from 5f00:6d00:c01f::3
bytes=56 Sequence=1 hop limit=64 time = 10 ms
Reply from 5f00:6d00:c01f::3
bytes=56 Sequence=2 hop limit=64 time = 1 ms
Reply from 5f00:6d00:c01f::3
bytes=56 Sequence=3 hop limit=64 time = 10 ms
Reply from 5f00:6d00:c01f::3
bytes=56 Sequence=4 hop limit=64 time = 10 ms
Reply from 5f00:6d00:c01f::3
bytes=56 Sequence=5 hop limit=64 time = 1 ms
--- 5f00:6d00:c01f::3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/6/10 ms