The ping ipv6-sid command tests the connectivity of an SRv6 network based on a specified SID.
ping ipv6-sid [ -a source-ipv6-address | -c echo-number | -m wait-time | -s packetsize | -t timeout | -tc traffic-class-value ] * [ segment-by-segment ] sid1 [ sid2 [ sid3 [ sid4 [ sid5 [ sid6 [ sid7 [ sid8 [ sid9 [ sid10 [ sid11 ] ] ] ] ] ] ] ] ] ] [ network-slice sliceid [ force-match-slice ] ]
Parameter | Description | Value |
---|---|---|
-a source-ipv6-address |
Specifies a source IPv6 address for ICMPv6 Echo Request messages to be sent. If no source IPv6 address is specified, the address configured using the encapsulation source-address command is preferentially used in SRv6 BE scenarios. In other scenarios, 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 X:X:X:X:X:X:X:X. |
-c echo-number |
Specifies the number of ICMPv6 Echo Request messages to be sent. When the network quality is poor, you can increase the number of sent packets to detect the network quality based on the packet loss ratio. |
The value is an integer ranging from 1 to 4294967295. The default value is 5. |
-m wait-time |
Specifies the time to wait before sending the next ICMPv6 Echo Request message. After sending an ICMPv6 Echo Request packet, the ping ipv6-sid waits for an ICMPv6 Echo Reply packet. By default, an ICMPv6 Echo Request packet is sent 500 ms after an ICMPv6 Echo Request packet is sent. You can use the -m parameter to set the sending interval. If the network quality is poor, you are advised to set this parameter to a value greater than or equal to 2000 ms. |
The value is an integer ranging from 1 to 10000, in milliseconds. The default value is 500. |
-s packetsize |
Specifies the length of an ICMPv6 Echo Request packet, excluding the IP header and ICMPv6 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 ICMPv6 Echo Reply message after an ICMPv6 Echo Request message is sent. After the ping ipv6-sid command is run, an ICMPv6 Echo Request packet is sent to a destination address and waits for a response. If the ICMPv6 Echo Request packet reaches the destination address and an ICMPv6 Echo Reply packet is sent to the source address within a valid time (before timeout), the destination address is reachable. If no response is received within the timeout period, a timeout message is displayed on the sender. In normal cases, a response is received within 1 to 10 seconds after an ICMPv6 Echo Request message is sent. When the network transmission rate is low, you can use this parameter to increase the timeout period for responding to ICMPv6 Echo Request packets. |
The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 2000 milliseconds. |
-tc traffic-class-value |
Specifies the traffic class of ICMPv6 Echo Request packets. |
The value is an integer ranging from 0 to 255. The default value is 0. |
segment-by-segment |
Indicates segment-by-segment detection on an SRv6 network. |
- |
sid1 |
Specifies an SRv6 SID. |
The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. A maximum of 11 SRv6 SIDs can be specified, which are separated by spaces. The first specified SID is the outer SID. |
network-slice sliceid |
Specifies the ID of a network slice. |
The value is an integer ranging from 1 to 4294967295. The default value is 0. |
force-match-slice |
Indicates that network slices are forcibly matched. This parameter is valid only for the segment list with slice attributes. |
- |
Usage Scenario
On an SRv6 network, if data forwarding fails over SRv6, the control plane for SRv6 establishment cannot detect this failure, making network maintenance difficult.
The ping ipv6-sid command is the most common debugging tool used to test an SRv6 network. It can test:Prerequisites
The intermediate device is enabled to respond to ICMPv6 packets.
Precautions
If an exception occurs during the execution of the ping ipv6-sid command, you can press Ctrl+C to stop the execution.
<HUAWEI> ping ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3
PING ipv6-sid 2001:DB8:10::1 2001:DB8:20::2 2001:DB8:30::3 : 56 data bytes, press CTRL_C to break
Reply from 2001:DB8:30::3
bytes=56 Sequence=1 hop limit=64 time=2 ms
Reply from 2001:DB8:30::3
bytes=56 Sequence=2 hop limit=64 time=1 ms
Reply from 2001:DB8:30::3
bytes=56 Sequence=3 hop limit=64 time=1 ms
Reply from 2001:DB8:30::3
bytes=56 Sequence=4 hop limit=64 time=1 ms
Reply from 2001:DB8:30::3
bytes=56 Sequence=5 hop limit=64 time=1 ms
--- ipv6-sid ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max=1/1/2 ms
Item | Description |
---|---|
ipv6-sid ping statistics | Statistics collected after a ping test is performed on the destination device, including:
|
PING ipv6-sid HH:HH::HH:H | SRv6 SID of the destination device. |
press CTRL_C to break | You can press CTRL+C to terminate the ongoing SRv6 SID ping test. |
Reply from HH:HH::HH:H | Response from the destination device to each ICMPv6 Echo Request packet:
If no response packet is received after the timeout period expires, the message "Request time out" is displayed. |
x data bytes | Length of the sent ICMPv6 Echo Request packet. |