ping vc pw-type pw-id [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v ] * control-word [ remote remote-ip-address peer-pw-id | draft6 ] * [ ttl ttl-value ] [ pipe | uniform ]
ping vc pw-type pw-id [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v ] * control-word remote remote-ip-address peer-pw-id sender sender-address [ ttl ttl-value ] [ pipe | uniform ]
ping vc pw-type pw-id [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v ] * label-alert [ no-control-word ] [ remote remote-ip-address | draft6 ] * [ pipe | uniform ]
ping vc pw-type pw-id [ -c echo-number | -m time-value | -s data-bytes | -t timeout-value | -exp exp-value | -r reply-mode | -v ] * normal [ no-control-word ] [ remote remote-ip-address peer-pw-id ] [ ttl ttl-value ] [ pipe | uniform ]
Parameter | Description | Value |
---|---|---|
pw-type |
Specifies the encapsulation type of a local PW. |
Currently, PWs of the following types are supported: ethernet, vlan, and ip-interworking. |
pw-id |
Specifies the ID of a local PW. |
The value is an integer that ranges from 1 to 4294967295. |
-c echo-number |
Specifies the number of Echo Request messages to be sent. If the network works unstably, you can set this parameter to a larger value to test network quality based on the packet loss ratio. |
The value is an integer that ranges from 1 to 4294967295. The default value is 5. |
-m time-value |
Specifies the interval for sending Echo Request messages. Each time after the source sends an Echo Request message by using the ping vc command, it waits a period of time (2000 ms by default) before sending the next Echo Request message. You can set the interval for sending Echo Request messages through the parameter time-value. If the network works unstably, the value should be greater than or equal to 2000 ms. |
The value is an integer that ranges from 1 to 10000, in milliseconds. The default value is 2000. |
-s data-bytes |
Specifies the number of bytes of the sent Echo Request messages. |
The value is an integer that ranges from 65 to 8100, in bytes. The default value is 100. |
-t timeout-value |
Specifies the timeout period for sending Echo Request messages. |
The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 2000. |
-exp exp-value |
Specifies the EXP value of the sent Echo Request messages. NOTE:
If DSCP priority has been configured by running the set priority command, the exp-value parameter does not take effect. |
The value is an integer that ranges from 0 to 7. The default value is 0. |
-r reply-mode |
Specifies the mode in which the peer returns MPLS Echo Reply messages.
|
The value is an integer that ranges from 1 to 4. The default value is 2. |
-v |
Displays the detailed information. |
- |
no-control-word |
Disables the control word function. |
- |
control-word |
Enables the control word function. The switching node along a multi-segment PW does not transmit ping packets. When the control word function is enabled, you can ping only the termination node of the PW. Before using the control word to ping the PW, you must enable the control word for a PW. |
- |
remote |
Specifies information about the PW on the remote PE. Information specified by the remote PE is finally encapsulated into the ping packets. The PW can be searched on the remote PE based on the specified information. By default, information contained in the ping packets is the information about the PW on the local end, which applies to single-segment PWs. |
- |
peer-pw-id |
Specifies the ID of the PW on the peer. |
The value is an integer that ranges from 1 to 4294967295. By default, the peer PW ID is the same as the local PW ID. |
draft6 |
Specifies the version of the ping vc command. If this parameter is specified, the ping operation is performed based on "draft-ietf-mpls-lsp-ping-06". |
- |
pipe |
Specifies the pipe mode. When a probe packet passes through the MPLS domain, the entire MPLS domain is considered as one hop and the IP TTL of the probe packet is reduced by one on the ingress and egress respectively. |
- |
uniform |
Specifies the uniform mode. The IP TTL of the probe packet is reduced by one each time it passes through one hop in the MPLS domain. |
- |
remote-ip-address |
Specifies the remote IP address. By default, the system searches for the IP address of the next hop based on the PW on the local PE. In the case of a multi-segment PW, if the ping operation is performed in control word mode, the IP address of the termination node must be specified. In MPLS router alert mode, the IP address of any switching node or the termination node can be specified. Then, the Echo Request message is sent to the peer and then sent back. |
- |
label-alert |
Specifies the label alert mode. The switching node along a multi-segment PW sends ping packets forcibly. In MPLS router alert mode, you can ping any switching node along the PW. |
- |
normal |
Specifies the normal mode, that is, the TTL detection mode. In this mode, control word and router alert are not encapsulated in to MPLS Echo Request messages, and TTL values are used to detect PW connectivity. |
- |
ttl ttl-value |
Specifies the TTL value. |
The value is an integer that ranges from 1 to 255. The default value is 64. |
sender sender-address |
Specifies a source address. For end-to-end detection of a multi-segment PW, a source IP address needs to be specified for a public network device that communicates with the remote PE. Generally, the source IP address is the address of the adjacent SPE or UPE. |
- |
Usage Scenario
If a PW is Up, the ping vc command can be used to locate the fault on the PW. For example, a forwarding entry is abnormally lost or incorrect. The ping vc command can be used to check a PW in the following scenarios:
VLL networking
VPLS networking
If a PW fault is detected by using the ping vc command, the tracert vc command can be used to locate the fault. Both the ping vc command and the tracert vc command can properly check the connectivity of PWs and locate faults.
Prerequisites
The MPLS module has been enabled on the device and works properly.
Precautions
control-word is recommended to detect an entire PW. Even though label-alert can be used to check the entire PW, the whole process is the same as the forwarding process only when control-word is used.
When a PE is single-homed to an SPE and two multi-segment PWs are deployed for PW redundancy, end-to-end detection cannot be performed for the secondary PW if services are transmitted over the primary PW. If services are transmitted over the secondary PW, the primary PW can only be detected segment by segment.
# Run the ping vc command in label alert mode on the device to check the connectivity of an Ethernet PW.
<HUAWEI> ping vc ethernet 100 -c 10 -m 10 -s 65 -t 100 -v label-alert remote 2.2.2.2
Reply from 2.2.2.2: bytes=65 Sequence=1 time = 31 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=2 time = 15 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=3 time = 32 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=4 time = 15 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=5 time = 32 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=6 time = 15 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=7 time = 15 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=8 time = 16 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=9 time = 15 ms Return Code 3, Subcode 1
Reply from 2.2.2.2: bytes=65 Sequence=10 time = 32 ms Return Code 3, Subcode 1
--- FEC: FEC 128 PSEUDOWIRE (NEW). Type = ethernet, ID = 100 ping statistics
10 packet(s) transmitted
10 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/21/32 ms