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 | -g ] * ip destination-iphost mask-length [ ip-address ] [ nexthop nexthopAddr ] [ remote remoteAddress ]
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 | -g ] * te { { tunnelName | ifType ifNum } [ hot-standby | primary ] [ compatible-mode ] | auto-tunnel autoTunnelName }
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g | -r reply-mode ] * segment-routing { { auto-tunnel srAutoTnlName [ version { draft2 | draft4 } ] } | te { tunnelName | ifType ifNum } [ draft2 ] } [ remote remoteAddress ] [ hot-standby | primary ]
ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -g ] * general labels [ mplsLabel1 [ mplsLabel2 [ mplsLabel3 [ mplsLabel4 [ mplsLabel5 [ mplsLabel6 [ mplsLabel7 [ mplsLabel8 [ mplsLabel9 [ mplsLabel10 [ mplsLabel11 [ mplsLabel12 [ mplsLabel13 ] ] ] ] ] ] ] ] ] ] ] ] ] -i { outIfName | outIfType outIfNum } nexthop nexthopAddr
Parameter | Description | Value |
---|---|---|
-a source-ip |
Specifies the source address of MPLS Echo Request packets to be sent. If no source address is specified, the MPLS LSR ID is used as the source address of the MPLS Echo Request packet. |
The value is in dotted decimal notation. |
-c count |
Specifies the number of MPLS Echo Request packets 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 rate. |
The value is an integer ranging from 1 to 4294967295. |
-exp exp-value |
Specifies the EXP value of MPLS Echo Request packets to be sent. |
The value is an integer ranging from 0 to 7. |
-h ttl-value |
Specifies the TTL value. If the TTL value in a packet is reduced to 0 during forwarding, the router that the packet reaches sends an ICMP timeout packet to the source, indicating that the destination is unreachable. |
The value is an integer ranging from 1 to 255. |
-m interval |
Specifies the time to wait before sending the next MPLS Echo Request packet. |
The value is an integer ranging from 1 to 10000, in milliseconds. |
-r reply-mode |
Specifies the mode in which the peer returns MPLS Echo Reply packets. |
The value is a decimal integer ranging from 1 to 4. The default value is 2.
|
-s packet-size |
Indicates the length of the sent payload packet, that is, the length of the packet excluding the IP header and UDP header. |
The value is an integer ranging from 65 to 9600, in bytes. |
-t time-out |
Specifies the timeout period for waiting for an MPLS Echo Reply packet after an MPLS Echo Request packet is sent. |
The value is an integer ranging from 0 to 65535, in milliseconds. |
-v |
Specifies output details. |
- |
-g |
Indicates MPLS packet fragmentation. |
- |
ip destination-iphost |
Specifies the IPv4 address or host name of the peer. |
If the value is an IP address, it is in dotted decimal notation. If the value is a host name, it is a string of 1 to 255 case-sensitive characters, spaces not supported. |
mask-length |
Specifies the mask length of the destination address. |
The value is an integer ranging from 0 to 32. |
ip-address |
Indicates the destination address in the IP header of an MPLS ping packet with the prefix of 127.0.0.0/8. The destination address in the IP header can be changed to trace test packets. |
The value is in dotted decimal notation. The default value is 127.0.0.1. |
nexthop nexthopAddr |
Specifies an IP address for the next hop. This parameter is used when the ingress node has one or more next hops. You can specify this parameter to select one tunnel for connectivity check. |
The value is in dotted decimal notation. |
remote remoteAddress |
Specifies the IP address of the L3VPN remote PE. It is mainly used in the SR-MPLS and LDP tunnel interworking scenario. |
The value is in dotted decimal notation. |
te tunnelName |
Specifies the name of a TE tunnel interface. |
The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces. |
ifType |
Specifies an interface type. |
- |
ifNum |
Specifies the number of an interface. |
The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces. |
hot-standby |
Indicates that the bypass LSP of the tunnel is detected. |
- |
primary |
Indicates that the primary LSP of a tunnel is monitored. |
- |
compatible-mode |
Specifies the interworking compatibility mode. |
- |
auto-tunnel autoTunnelName |
Specifies the name of a dynamic tunnel interface. |
The value is a string of 1 to 31 case-sensitive characters. It cannot contain spaces. |
auto-tunnel srAutoTnlName |
Specifies the name of an automatically generated TE tunnel interface. |
The value is a string of 1 to 255 case-sensitive characters. It cannot contain spaces. |
segment-routing |
Specifies a segment routing scenario. |
- |
version |
Specifies the command application version. |
- |
draft2 |
Indicates that the command application version is draft2. In the SR MPLS scenario, to check LSP connectivity in compliance with the Draft-ietf-mpls-spring-lsp-ping-02 protocol draft, specify this parameter. |
- |
draft4 |
Indicates that the command application version is draft4. In the SR MPLS scenario, to check LSP connectivity in compliance with the Draft-kumarkini-mpls-spring-lsp-ping-04 protocol draft, specify this parameter. |
- |
general |
Indicates general ping detection. |
- |
labels mplsLabel1 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel2 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel3 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel4 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel5 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel6 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel7 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel8 |
Specifies an MPLS label. |
The value is an integer ranging from 0 to 1048575. |
mplsLabel9 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel10 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel11 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel12 |
Specifies an MPLS label. |
The value is an integer that ranges from 0 to 1048575. |
mplsLabel13 |
Specifies an MPLS label. |
The value is an integer ranging from 0 to 1048575. |
-i outIfName |
Specifies an interface name. |
The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces. |
outIfType |
Specifies an interface type. |
- |
outIfNum |
Specifies the number of an interface. |
The value is a string of 1 to 63 case-insensitive characters. It cannot contain spaces. |
Usage Scenario
If a fault occurs on an LSP on an MPLS network, run the ping lsp command to check the network connectivity, and then run the tracert lsp command to locate the fault.
The ping lsp command uses MPLS Echo Request packets and MPLS Echo Reply packets to detect the connectivity of LSPs. The packets are sent in UDP packets and the port number is 3503. The receiver distinguishes these two types of packets from other packets based on the port number. An MPLS Echo Request packet carries the FEC information to be checked and is sent along the same LSP as other packets that belong to this FEC. In this manner, the LSP is checked. MPLS Echo Request packets are forwarded to the destination using MPLS, whereas MPLS Echo Reply packets are forwarded to the source using IP. LSP ping can be used to check the following types of links:Prerequisites
Before running the ping lsp command, ensure that the MPLS module has been enabled and is working properly.
Configuration Impact
To prevent the egress from forwarding a received MPLS Echo Request packet to other nodes, you can set the destination address in the IP header of the packet to 127.0.0.1/8 (the local loopback address) and the TTL value to 1.
Precautions
During an L3VPN LSP ping test, if the destination of a ping operation is a CE address, the ping can succeed even when the link between the CE and PE is faulty, because it is the end-to-end link between PEs that is detected.
<HUAWEI> ping lsp -c 10 -s 200 ip 4.4.4.9 32
LSP PING FEC: IPV4 PREFIX 4.4.4.9/32 : 200 data bytes, press CTRL_C to break
Reply from 4.4.4.9: bytes=200 Sequence=1 time = 11 ms
Reply from 4.4.4.9: bytes=200 Sequence=2 time = 6 ms
Reply from 4.4.4.9: bytes=200 Sequence=3 time = 6 ms
Reply from 4.4.4.9: bytes=200 Sequence=4 time = 6 ms
Reply from 4.4.4.9: bytes=200 Sequence=5 time = 12 ms
Reply from 4.4.4.9: bytes=200 Sequence=6 time = 9 ms
Reply from 4.4.4.9: bytes=200 Sequence=7 time = 12 ms
Reply from 4.4.4.9: bytes=200 Sequence=8 time = 9 ms
Reply from 4.4.4.9: bytes=200 Sequence=9 time = 12 ms
Reply from 4.4.4.9: bytes=200 Sequence=10 time = 12 ms
--- FEC: IPV4 PREFIX 4.4.4.9/32 ping statistics ---
10 packet(s) transmitted
10 packet(s) received
0.00% packet loss
round-trip min/avg/max = 6/10/12 ms
Item | Description |
---|---|
FEC: xxxx ping statistics | Statistics collected after the ping test is performed on the destination host, including:
|
press CTRL_C to break | You can press CTRL+C to stop the ongoing ping test. |
Reply from x.x.x.x | Response from the destination host to each Echo Request packet:
|
xx data bytes | Length of a sent packet, in bytes. |