Parameter | Description | Value |
---|---|---|
-a source-ip |
Specifies the source address of an MPLS echo request packet to be sent. If no source address is specified, the MPLS LSR-ID through which an MPLS echo request packet is sent will be used. |
The value is in dotted decimal notation. |
-c count |
Specifies the number of times an MPLS echo request packet will be sent. In the case of a poor network quality, you can set this parameter to a comparatively large value to test the network quality based on the packet loss percentage. |
The value is an integer ranging from 1 to 4294967295. The default value is 5. |
-exp exp-value |
Specifies an EXP value of the MPLS echo request packet to be sent. |
The value is an integer that ranges from 0 to 7. The default value is 0. |
-h ttl-value |
Specifies a TTL value. If the TTL value in a packet is reduced to 0 during forwarding, the router that receives the packet sends a timeout packet to the source, indicating that the destination is unreachable. |
The value is an integer ranging from 1 to 255. The default value is 255. |
-m interval |
Specifies an interval at which MPLS echo request packets are sent. After the ping lsp command is run, the device sends an MPLS echo request packet and by default waits for 2000 ms before sending the next MPLS echo request packet if no reply is received. You can use this parameter to set the packet sending interval as required. Setting this parameter to less than 2000 ms is not recommended on an unstable network. |
The value is an integer ranging from 1 to 10000. The default value is 200. |
-r reply-mode |
Specifies a mode in which the peer sends MPLS echo reply packets in response. |
The value is an integer ranging from 1 to 4. The default value is 2. |
-s packet-size |
Specifies a packet payload length, excluding the IP header and UDP header. |
The value is an integer ranging from 65 to 9600, in bytes. The default value is 100. |
-t time-out |
Specifies a 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. The default value is 2000. |
-v |
Specifies the verbose information. |
- |
-g |
Indicates MPLS packet fragmentation. |
- |
vpn-instance vpn-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters. It cannot contain spaces. The VPN instance name cannot be <b>_public_</b>. If the character string is quoted by double quotation marks, the character string can contain spaces. |
bgp destination-iphost |
Specifies the destination IPv4 address or host name of a BGP LSP. |
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 |
Specifies the destination address in the IP header of an MPLS ping packet with the prefix of 127.0.0.0/8. |
The value is in dotted decimal notation. The default value is 127.0.0.1. |
nexthop nexthop-address |
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. |
Usage Scenario
The ping lsp command can be used to check the connectivity of LSPs on an MPLS network, and the tracert lsp command can be used to locate the faulty node.
BGP LSP: You can run the ping lsp bgp destination-iphost mask-length [ ip-address ] [ nexthop nexthop-address ] command on the ingress to initiate a ping test to the egress to check the connectivity of a BGP LSP carrying IPv4 packets.Prerequisites
Before using the ping lsp command, ensure that the MPLS module works 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.
<HUAWEI> ping lsp -v ip 3.3.3.3 32
LSP PING FEC: IPV4 PREFIX 3.3.3.3/32 : 100 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=100 Sequence=1 time = 4 ms Return Code 3, Subcode 1
Reply from 3.3.3.3: bytes=100 Sequence=2 time = 4 ms Return Code 3, Subcode 1
Reply from 3.3.3.3: bytes=100 Sequence=3 time = 4 ms Return Code 3, Subcode 1
Reply from 3.3.3.3: bytes=100 Sequence=4 time = 4 ms Return Code 3, Subcode 1
Reply from 3.3.3.3: bytes=100 Sequence=5 time = 5 ms Return Code 3, Subcode 1
--- FEC: IPV4 PREFIX 3.3.3.3/32/ ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss round-trip min/avg/max = 4/4/5 ms
<HUAWEI> ping lsp -c 3 segment-routing auto-tunnel Tunnel10 version draft4
LSP PING FEC: AUTO TE TUNNEL IPV4 SESSION QUERY Tunnel10 : 100 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=100 Sequence=1 time=11 ms
Reply from 10.1.1.2: bytes=100 Sequence=2 time=9 ms
Reply from 10.1.1.2: bytes=100 Sequence=3 time=6 ms
--- FEC: AUTO TE TUNNEL IPV4 SESSION QUERY Tunnel10 ping statistics ---
3 packet(s) transmitted
3 packet(s) received
0.00% packet loss
round-trip min/avg/max = 6/8/11 ms
<HUAWEI> ping lsp segment-routing ip 3.3.3.9 32 version draft2
LSP PING FEC: SEGMENT ROUTING IPV4 PREFIX 3.3.3.9/32 : 100 data bytes, press CTRL_C to break
Reply from 3.3.3.9: bytes=100 Sequence=1 time=13 ms
Reply from 3.3.3.9: bytes=100 Sequence=2 time=9 ms
Reply from 3.3.3.9: bytes=100 Sequence=3 time=2 ms
Reply from 3.3.3.9: bytes=100 Sequence=4 time=3 ms
Reply from 3.3.3.9: bytes=100 Sequence=5 time=6 ms
--- FEC: SEGMENT ROUTING IPV4 PREFIX 3.3.3.9/32 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/6/13 ms
<HUAWEI> ping lsp sr-te policy policy-name test
LSP PING FEC: Nil FEC : 100 data bytes, press CTRL_C to break
sr-te policy segment list:
Preference : 300; Path Type: main; Protocol-Origin : local; Originator: 0, 0.0.0.0; Discriminator: 300; Segment-List ID : 1; Xcindex : 1
Reply from 3.3.3.9: bytes=100 Sequence=1 time=13 ms
Reply from 3.3.3.9: bytes=100 Sequence=2 time=9 ms
Reply from 3.3.3.9: bytes=100 Sequence=3 time=2 ms
Reply from 3.3.3.9: bytes=100 Sequence=4 time=3 ms
Reply from 3.3.3.9: bytes=100 Sequence=5 time=6 ms
--- FEC: Nil FEC ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/6/13 ms
sr-te policy segment list:
Preference : 400; Path Type: backup; Protocol-Origin : local; Originator: 0, 0.0.0.0; Discriminator: 400; Segment-List ID : 2; Xcindex : 2
Reply from 3.3.3.9: bytes=100 Sequence=1 time=13 ms
Reply from 3.3.3.9: bytes=100 Sequence=2 time=9 ms
Reply from 3.3.3.9: bytes=100 Sequence=3 time=2 ms
Reply from 3.3.3.9: bytes=100 Sequence=4 time=3 ms
Reply from 3.3.3.9: bytes=100 Sequence=5 time=6 ms
--- FEC: Nil FEC ping statistics ---
5 packet(s) transmitted
5 packet(s) received 0.00% packet loss
<HUAWEI> ping lsp -s 2000 -g ip 4.4.4.9 32
LSP PING FEC: IPV4 PREFIX 4.4.4.9/32 : 2000 data bytes, press CTRL_C to break
Reply from 4.4.4.9: bytes=2000 Sequence=1 time = 11 ms
Reply from 4.4.4.9: bytes=2000 Sequence=2 time = 6 ms
Reply from 4.4.4.9: bytes=2000 Sequence=3 time = 6 ms
Reply from 4.4.4.9: bytes=2000 Sequence=4 time = 6 ms
Reply from 4.4.4.9: bytes=2000 Sequence=5 time = 12 ms
--- FEC: IPV4 PREFIX 4.4.4.9/32 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss round-trip min/avg/max = 6/10/12 ms
<HUAWEI> ping lsp -c 3 segment-routing te ipv6 Tunnel 1 nil-fec
LSP PING FEC: SEGMENT ROUTING TE IPV6 SESSION QUERY Tunnel1 : 100 data bytes, press CTRL_C to break
Reply from 2001:db8:1::1
bytes=100 Sequence=1 time=13 ms
Reply from 2001:db8:1::1
bytes=100 Sequence=2 time=2 ms
Reply from 2001:db8:1::1
bytes=100 Sequence=3 time=3 ms
--- FEC: SEGMENT ROUTING TE IPV6 SESSION QUERY Tunnel1 ping statistics ---
3 packet(s) transmitted
3 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/6/13 ms
<HUAWEI> ping lsp general labels 200001 -i GigabitEthernet 0/1/21 nexthop 10.1.1.2 LSP PING FEC: Nil FEC : 100 data bytes, press CTRL_C to break Reply from 3.3.3.9: bytes=100 Sequence=1 time=13 ms Reply from 3.3.3.9: bytes=100 Sequence=2 time=9 ms Reply from 3.3.3.9: bytes=100 Sequence=3 time=2 ms Reply from 3.3.3.9: bytes=100 Sequence=4 time=3 ms Reply from 3.3.3.9: bytes=100 Sequence=5 time=6 ms --- FEC: Nil FEC ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 2/6/13 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 1.1.1.1: bytes=100 Sequence=1 time = 4 ms
Reply from 1.1.1.1: bytes=100 Sequence=2 time = 2 ms
Reply from 1.1.1.1: bytes=100 Sequence=3 time = 2 ms
Reply from 1.1.1.1: bytes=100 Sequence=4 time = 2 ms
Reply from 1.1.1.1: bytes=100 Sequence=5 time = 2 ms
--- FEC: RSVP IPV4 SESSION QUERY Tunnel1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss round-trip min/avg/max = 2/2/4 ms
<HUAWEI> ping lsp -c 10 -s 200 ip 1.1.1.1 32
LSP PING FEC: IPV4 PREFIX 1.1.1.1/32 : 200 data bytes, press CTRL_C to break
Reply from 1.1.1.1: bytes=200 Sequence=1 time = 11 ms
Reply from 1.1.1.1: bytes=200 Sequence=2 time = 6 ms
Reply from 1.1.1.1: bytes=200 Sequence=3 time = 6 ms
Reply from 1.1.1.1: bytes=200 Sequence=4 time = 6 ms
Reply from 1.1.1.1: bytes=200 Sequence=5 time = 12 ms
Reply from 1.1.1.1: bytes=200 Sequence=6 time = 9 ms
Reply from 1.1.1.1: bytes=200 Sequence=7 time = 12 ms
Reply from 1.1.1.1: bytes=200 Sequence=8 time = 9 ms
Reply from 1.1.1.1: bytes=200 Sequence=9 time = 12 ms
Reply from 1.1.1.1: bytes=200 Sequence=10 time = 12 ms
--- FEC: IPV4 PREFIX 1.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 -c 3 segment-routing te Tunnel10
LSP PING FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel10 : 100 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=100 Sequence=1 time=11 ms
Reply from 10.1.1.2: bytes=100 Sequence=2 time=9 ms
Reply from 10.1.1.2: bytes=100 Sequence=3 time=6 ms
--- FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel10 ping statistics ---
3 packet(s) transmitted
3 packet(s) received
0.00% packet loss
round-trip min/avg/max = 6/8/11 ms
Item | Description |
---|---|
FEC: xxxx ping statistics | Ping statistics.
|
press CTRL_C to break | Instruction on how to stop the ongoing ping test. |
Reply from x.x.x.x | Response from the destination node to each MPLS echo request packet.
If no MPLS echo reply packet is received after the timeout period expires, "Request time out" is displayed. |
Return Code | Return code. The meaning of the value is as follows:
|
Subcode | Number of labels. Usually, the value is 1. |
Preference | The preference of path. |
Path Type | The types of path: main path / slave path. |
Protocol-Origin | Protocol source:
|
Segment-List ID | Segment list ID. |
xx data bytes | Length of a sent packet, in bytes. |
Originator | Indicates the IP address of the end. |
Discriminator | Identifier. |
XcIndex | Index of Xc. |