ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -r reply-mode | -s packet-size | -t time-out | -v ] * ip destination-address mask-length [ ip-address ] [ nexthop nexthop-address | draft6 ]
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -r reply-mode | -s packet-size | -t time-out | -v ] * te tunnel interface-number [ hot-standby | primary ] [ draft6 ]
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -r reply-mode | -s packet-size | -t time-out | -v ] * vpn-instance vpn-name remote remote-address mask-length [ vpn-frr-path ]
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -r reply-mode | -s packet-size | -t time-out | -v ] * bgp destination-address mask-length [ ip-address ]
Parameter | Description | Value |
---|---|---|
-a source-ip |
Specifies the source IP address of MPLS Echo Request packets to be sent. If the source IP address is not specified, the IP address of the outbound interface from which MPLS Echo Request packets are sent is used as the source IP address. NOTE:
If an E2E BGP LSP has been established between two devices and the LSR ID is not used on the ingress, to run the ping lsp command with bgp specified on the ingress, you must specify -a source-ip as the IP address used for establishing the E2E BGP LSP. |
- |
-c count |
Specifies the number of MPLS Echo Request packets to be sent. In the case of poor network quality, you can set this parameter to a comparatively large value to check 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. |
-exp exp-value |
Specifies the EXP value of MPLS Echo Request packets to be sent. 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. |
-h ttl-value |
Specifies the value of the TTL. Each time the ping lsp command is run, an MPLS Echo Request packet carrying a sequence number is sent. The sequence number of the MPLS Echo Request packet starts from 1 and is increased by 1. By default, a maximum of five MPLS Echo Request packets are sent. You can set the number of MPLS Echo Request packets to be sent through the parameter ttl-value. If the destination is reachable, the source can receive five MPLS Echo Reply packets from the destination, with sequence numbers corresponding to those of MPLS Echo Request packets. If the TTL field is decreased to 0 during packet forwarding, the switch that the packet reaches sends an MPLS timeout packet to the source, indicating that the destination is unreachable. |
The value is an integer that ranges from 1 to 255. The default value is 64. |
-m interval |
Specifies the time to wait before sending the next MPLS Echo Request packet. Each time the source sends an MPLS Echo Request packet using the ping lsp command, the source waits a period of time (2000 ms by default) before sending the next MPLS Echo Request packet. You can set the time to wait before sending the next ICMP Echo Request message using the parameter interval. 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. |
-r reply-mode |
Specifies the mode in which the peer returns MPLS Echo Reply packets. |
The value is an integer that ranges from 1 to 4. The default value is 2.
|
-s packet-size |
Indicates the length of the payload in a packet, excluding the IP header and UDP header. |
The value is an integer that ranges from 65 to 8100, in bytes. The default value is 100. The configured value must be smaller than the MTU of the interface. |
-t time-out |
Indicates the timeout period to wait for an MPLS Echo Reply packet after an MPLS Echo Request packet is sent. |
The value is an integer that ranges from 0 to 65535, in milliseconds. The default value is 2000. |
-v |
Displays MPLS Echo Reply packets not for the local user. By default, only MPLS Echo Reply packets for the local user are displayed.
|
By default, the system displays only the MPLS Echo Reply packets received by the local user. |
ip destination-address mask-length |
Specifies the IPv4 address and mask length of the destination. |
The destination IPv4 address is in dotted decimal notation. The mask length is an integer that ranges from 0 to 32. |
ip-address |
Specifies the destination IP address carried in the IP header of an MPLS Echo Request packet. |
The value is in dotted decimal notation. By default, the destination IP address carried in the IP header of an MPLS Echo Request packet is 127.0.0.1. |
nexthop nexthop-address |
Specifies the IP address of the next hop. |
The value is in dotted decimal notation. |
draft6 |
Specifies the version of the ping lsp command. If this parameter is specified, the ping operation is performed according to "draft-ietf-mpls-lsp-ping-06". By default, the ping operation is performed according to RFC 4379. |
- |
te tunnel interface-number |
Specifies the number of a tunnel interface. |
- |
hot-standby |
Indicates that the hot-standby CR-LSP is to be detected. |
- |
primary |
Indicates that the primary CR-LSP is to be monitored. |
- |
vpn-instance vpn-name |
Specifies the name of a VPN instance. |
The value must be an existing VPN instance name. |
remote remote-address mask-length |
Specifies the destination IP address and mask of the VPN LSP to be monitored. |
The IP address is in dotted decimal notation. The mask length is an integer that ranges from 0 to 32. |
bgp destination-address mask-length |
Specifies the IP address and mask length of the BGP destination. |
- |
vpn-frr-path |
Specifies that the connectivity of the backup VPN FRR LSP will be checked. NOTE:
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730S-H, and S6730-H support this parameter. |
- |
Usage Scenario
On an MPLS network, you can run the ping lsp command to check LSP connectivity after an LSP is established.
The LSP ping uses Echo Request messages and MPLS Echo Reply messages to monitor the connectivity of LSPs. Both Echo Request and Echo Reply messages are encapsulated into UDP packets and transmitted through port 3503. The receiver distinguishes Echo Request and MPLS Echo Reply messages based on the port number. An Echo Request message carries FEC information to be monitored and travels along the same LSP as other packets with the same Forwarding Equivalence Class (FEC) to monitor the connectivity of the LSP. Echo Request messages are transmitted to the destination using MPLS, whereas MPLS Echo Reply messages are transmitted to the source using IP.
LDP LSP Ping: Run the ping lsp ip destination-address mask-length command on the ingress node to ping the egress node to monitor the connectivity of the LSP.
L3VPN LSP Ping: After a VPN is correctly configured, run the ping lsp vpn-instance vpn-name remote remote-address mask-length command on the ingress node to ping the egress node to monitor the connectivity of the VPN LSP established using BGP.
If the ping lsp command detects a fault on an LSP that packets transmitted along this LSP cannot reach the egress node, you can run the tracert lsp command to locate the fault.
Prerequisites
Before running the ping lsp command, ensure that the MPLS module is working properly.
Precautions
To prevent the egress node from forwarding the received MPLS Echo Request packet to other nodes, the destination address in the IP header of the Echo Request packet is set to 127.0.0.1/8 (the local loopback address), and the TTL value contained in the IP header is set to 1.
# Ping 10.1.1.1/32 by sending ten 200-byte MPLS Echo Request packets.
<HUAWEI> ping lsp -c 10 -s 200 ip 10.1.1.1 32
LSP PING FEC: IPV4 PREFIX 10.1.1.1/32/ : 200 data bytes, press CTRL_C to break
Reply from 10.1.1.1: bytes=200 Sequence=1 time = 11 ms
Reply from 10.1.1.1: bytes=200 Sequence=2 time = 6 ms
Reply from 10.1.1.1: bytes=200 Sequence=3 time = 6 ms
Reply from 10.1.1.1: bytes=200 Sequence=4 time = 6 ms
Reply from 10.1.1.1: bytes=200 Sequence=5 time = 12 ms
Reply from 10.1.1.1: bytes=200 Sequence=6 time = 9 ms
Reply from 10.1.1.1: bytes=200 Sequence=7 time = 12 ms
Reply from 10.1.1.1: bytes=200 Sequence=8 time = 9 ms
Reply from 10.1.1.1: bytes=200 Sequence=9 time = 12 ms
Reply from 10.1.1.1: bytes=200 Sequence=10 time = 12 ms
--- FEC: IPV4 PREFIX 10.1.1.1/32 ping statistics ---
10 packet(s) transmitted
10 packet(s) received
0.00% packet loss
round-trip min/avg/max = 6/10/12 ms
<HUAWEI> ping lsp te tunnel 1 LSP PING FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1 : 100 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=100 Sequence=1 time = 50 ms Reply from 10.1.1.2: bytes=100 Sequence=2 time = 28 ms Reply from 10.1.1.2: bytes=100 Sequence=3 time = 33 ms Reply from 10.1.1.2: bytes=100 Sequence=4 time = 52 ms Reply from 10.1.1.2: bytes=100 Sequence=5 time = 8 ms --- FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 8/34/52 ms
<HUAWEI> ping lsp -v ip 10.2.1.1 32
LSP PING FEC: IPV4 PREFIX 10.2.1.1/32 : 100 data bytes, press CTRL_C to break
Reply from 10.2.1.1: bytes=100 Sequence=1 time = 4 ms Return Code 3, Subcode 1
Reply from 10.2.1.1: bytes=100 Sequence=2 time = 4 ms Return Code 3, Subcode 1
Reply from 10.2.1.1: bytes=100 Sequence=3 time = 4 ms Return Code 3, Subcode 1
Reply from 10.2.1.1: bytes=100 Sequence=4 time = 4 ms Return Code 3, Subcode 1
Reply from 10.2.1.1: bytes=100 Sequence=5 time = 5 ms Return Code 3, Subcode 1
--- FEC: IPV4 PREFIX 10.2.1.1/32 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 4/4/5 ms
Item |
Description |
---|---|
Reply from |
IP address in an Echo Reply packet. |
bytes |
Length of an Echo Reply packet. |
Sequence |
Serial number of an Echo Reply packet. |
time |
RTT of an Echo Reply packet. |
Return Code |
Return code. The meaning of each value is as follows:
|
Subcode |
Number of labels. Usually, the value is 1. |
xxx ping statistics |
Statistics collected after the ping test. The statistics include the following information:
|