ping lsp

Function

The ping lsp command tests whether the LSP connectivity and LSP forwarding are normal.

Format

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 ] * bgp destination-iphost mask-length [ vpn-instance vpn-name ] [ ip-address ] [ nexthop nexthop-address ]

Parameters

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.

Views

All views

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
tailmode1 execute

Usage Guidelines

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.

Example

# Ping 3.3.3.3/32 and output detailed information.
<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
# Ping an SR-MPLS TE tunnel dynamically created.
<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
# Ping an SR-MPLS BE IPv4 tunnel and output detailed information.
<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
# Ping an SR-MPLS TE policy tunnel and output detailed information.
<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
# Ping 4.4.4.9/32 by sending 2000-byte MPLS echo request packets.
<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
# Ping an SRv6 TE Policy manually configured and output detailed information.
<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
# Initiate a general LSP ping test.
<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
# Ping an MPLS TE tunnel.
<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
# Ping 1.1.1.1/32 by sending ten 200-byte MPLS echo request packets.
<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
# Ping an SR-MPLS TE IPv4 tunnel manually configured and output detailed information.
<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
Table 1 Description of the ping lsp command output
Item Description
FEC: xxxx ping statistics

Ping statistics.

  • packet(s) transmitted: number of MPLS echo request packets sent.
  • packet(s) received: number of MPLS echo reply packets received.
  • % packet loss: percentage of the number of MPLS echo request packets with no responses to the total number of MPLS echo request packets sent.
  • round-trip min/avg/max: minimum, average, or maximum response time.
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.

  • bytes: length of an MPLS echo reply packet.
  • sequence: sequence number of an MPLS echo reply packet.
  • time: delay after which the destination node responds with an MPLS echo reply packet. The value is expressed in ms.

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:

  • 0: indicates no return code.
  • 1: indicates an incorrect request.
  • 2: indicates an unknown TLV.
  • 3: indicates an LSP outbound interface.
  • 4: indicates no mapping on the receiver.
  • 5: indicates that the mapping does not match that on the downstream device.
  • 6: indicates an unknown upstream interface.
  • 7: indicates an undefined reserved field.
  • 8: indicates label swapping.
  • 9: indicates label switching without MPLS forwarding.
  • 10: indicates no label mapping.
  • 11: indicates no label entity.
  • 12: indicates that no protocol is loaded on the interface.
  • 13: indicates that the ping operation is ended ahead of schedule due to shortened labels.
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:

  • pecp.
  • bgp.
  • local.
  • unknown.
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.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >