ping lsp (All views)

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 | -s packet-size | -t time-out | -v | -g ] * segment-routing ip destination-iphost mask-length [ flex-algo flex-algo-id ] [ version draft2 ] [ bypass ] [ remote remote-ip ]

ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * sr-te policy { policy-name policyname | endpoint-ip endpoint-ip color colorid | binding-sid bsid }

ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * segment-routing ip destination-iphost mask-length [ flex-algo flex-algo-id ] [ version draft2 ] [ bypass ] [ remote-fec { ldp remoteipaddr remotemasklen | nil } ]

Parameters

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 is used as the source IP 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. The default value is 5.

-exp exp-value

Specifies the EXP value of MPLS Echo Request packets to be sent. The value is an integer that ranges from 0 to 7.

The value is an integer that ranges from 0 to 7. The default value is 0.

-h ttl-value

Specifies the TTL value. If the TTL value is reduced to 0 during packet forwarding, the router that the packet reaches 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 the time to wait before sending the next MPLS Echo Request packet. After sending an MPLS Echo Request packet, the device waits for a reply. By default, the device waits for 2000 ms 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 time. If the network quality is poor, you are advised to set this parameter to a value greater than or equal to 2000 ms.

The value is an integer ranging from 1 to 10000. The default value is 200.

-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 detailed output information.

-

-g

Specifies MPLS packet fragmentation.

-

segment-routing

Specifies a segment routing scenario.

-

ip destination-iphost

Specifies the IPv4 address of the peer.

The value is in dotted decimal notation.

mask-length

Specifies the mask of the destination IPv4 address.

The value is an integer ranging from 0 to 32.

flex-algo flex-algo-id

Specifies the Flex-Algo ID. If a Flex-Algo SR-MPLS BE LSP is used, you need to specify flex-algo-id to initiate a test.

The value is an integer that ranges from 128 to 255.

version

Specifies the version of the used protocol 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.

-

bypass

Indicates the bypass flag.

-

remote remote-ip

Specifies the IP address of a remote PE. It is mainly used in the SR-MPLS and LDP tunnel interworking scenario.

The value is in dotted decimal notation.

sr-te

Specifies the LSP ping type as SR-MPLS TE Policy.

-

policy

Specifies the LSP ping type as SR-MPLS TE Policy.

-

policy-name policyname

Specifies the name of a policy.

The value is a string of 1 to 31 case-sensitive characters. It cannot contain spaces.

endpoint-ip endpoint-ip

Specifies the destination IPv4 address of an SR-MPLS TE policy tunnel.

The value is in dotted decimal notation.

color colorid

Specifies the color ID of an SR-MPLS TE policy.

The value is an integer ranging from 0 to 4294967295.

binding-sid bsid

Specifies the ID of a segment bound to an SR-MPLS TE policy.

The value is an integer ranging from 16 to 1048575.

remote-fec

Indicates the remote FEC type. This parameter is used in scenarios where a device running an earlier version interworks with a device running a later version. This parameter specifies the FEC that can be identified by a device running an earlier version to implement interworking with a device running a later version.

-

ldp remotemasklen

Specifies the mask length for the IP address of a remote LDP FEC.

The value is an integer ranging from 0 to 32.

remoteipaddr

Specifies the IP address of a remote LDP FEC.

The value is in dotted decimal notation.

nil

Specifies the Nil FEC type.

-

Views

All views

Default Level

0: Visit level

Task Name and Operations

Task Name Operations
sla execute

Usage Guidelines

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:

  • SR-MPLS BE IPv4 ping: If an SR-MPLS BE IPv4 tunnel is to be tested, run the ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * segment-routing ip destination-address mask-length version draft2 [ remote remote-ip ] command to check the connectivity of the SR-MPLS BE IPv4 tunnel.
  • To test the connectivity of an SR-MPLS BE tunnel connected with an LDP LSP, run the ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * segment-routing ip destination-address mask-length version draft2 remote remote-ip command on the ingress to ping the egress of the LDP LSP. When performing a ping test between an SR-MPLS BE tunnel and an LDP LSP, specify a remote IP address using the remote remote-ip parameter.
  • In an SR-MPLS BE and LDP interworking scenario, if the LDP end does not support interworking, run the ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * segment-routing ip destination-address mask-length version draft2 remote-fec { ldp remoteipaddr remotemasklen | nil } command on the ingress to ping the egress of the LDP tunnel to check the connectivity of the SR-MPLS BE and LDP interworking scenario.
  • SR-MPLS TE Policy LSP Ping: If the type of the tunnel to be monitored is SR-MPLS TE Policy, run the ping lsp [ -a source-ip | -c count | -exp exp-value | -h ttl-value | -m interval | -s packet-size | -t time-out | -v | -g ] * sr-te policy { policy-name policyname | endpoint-ip endpoint-ip color colorid | binding-sid bsid } command to initiate a ping test to the egress to monitor the connectivity of the SR-MPLS TE Policy tunnel.

Prerequisites

Before using the ping lsp command, ensure that the MPLS module has been enabled and is working properly.

Configuration Impact

  • To prevent the egress node from forwarding the received MPLS Echo Request message to other nodes, the destination address in the IP header of the message is set to 127.0.0.1/8 (the local loopback address) and the TTL value in the IP header is set to 1.
  • During an SR-MPLS TE Policy ping test, if the list in the policy changes, the ping operation cannot detect the change. In this case, you are advised to press Ctrl+C to stop the test and then start the test again.
  • SR-MPLS TE Policy Ping checks the connectivity of all lists in a policy.

Example

# 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's 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's 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 an Flex-Algo SR-MPLS BE IPv4 tunnel.
<HUAWEI> ping lsp segment-routing ip 10.4.4.4 32 flex-algo 128
  LSP PING FEC: SEGMENT ROUTING IPV4 PREFIX 10.4.4.4/32 FLEX-ALGO: 128 : 100  data bytes, press CTRL_C to break
    Reply from 10.4.4.4: bytes=100 Sequence=1 time=3 ms
    Reply from 10.4.4.4: bytes=100 Sequence=2 time=4 ms
    Reply from 10.4.4.4: bytes=100 Sequence=3 time=3 ms
    Reply from 10.4.4.4: bytes=100 Sequence=4 time=3 ms
    Reply from 10.4.4.4: bytes=100 Sequence=5 time=3 ms

  --- FEC: SEGMENT ROUTING IPV4 PREFIX 10.4.4.4/32 FLEX-ALGO: 128 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 3/3/4 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
Table 1 Description of the ping lsp (All views) 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.

Preference

Path priority.

Path Type

Path type, which can be primary or backup.

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

IP address of the.

Discriminator

Identifier.

XcIndex

XC index.

Return Code

Return code. The meanings of different return values are as follows:

  • 0: No return code is available.
  • 1: An incorrect request is received.
  • 2: An unknown TLV is received.
  • 3: There is an outbound interface of an LSP.
  • 4: No mapping exists on the responding device.
  • 5: The mapping does not match that on the downstream device.
  • 6: An unknown upstream interface exists.
  • 7: The value is reserved.
  • 8: indicates label switching.
  • 9: indicates label switching without MPLS forwarding.
  • 10: indicates no label mapping.
  • 11: indicates the entity without a label.
  • 12: The protocol is not loaded to the interface.
  • 13: The ping operation is terminated too early because the label is shortened.
Subcode

Subcode, indicating the layer of the label. Generally, the value is 1.

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