ping lsp (General)

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 ] * 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

Parameters

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.

  • 1: no reply.
  • 2: The peer end responds with IPv4/IPv6 UDP packets.
  • 3: The peer end responds with an IPv4 or IPv6 UDP packet carrying the Router Alert Option.
  • 4: reply through the control channel of the application plane.
-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.

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:

  • LDP LSP ping: Run the ping lsp -c count -s packet-size ip destination-iphost mask-length command on the ingress to initiate a ping test to the egress to check the connectivity of the LSP. If multiple tunnels work in load balancing mode on the ingress, you can specify the nexthop parameter to check the connectivity of a specified LSP.
  • TE tunnel ping: If a tunnel exists, you can run the ping lsp te interface-number command on the ingress to initiate a ping test to the egress to check the connectivity of the TE tunnel.
  • TE auto tunnel ping: If an auto tunnel exists, run the ping lsp te auto-tunnel auto-tunnelName command to initiate a ping from the ingress to the egress to check the connectivity of the auto tunnel.
  • SR-MPLS TE IPv4 Ping: If the type of the tunnel to be detected is SR-MPLS TE IPv4:
  • To check the connectivity of a dynamically created SR-MPLS TE tunnel, 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 auto-tunnel auto-tunnelname version { draft2 | draft4 } [ remote remote-address ] [ hot-standby ] command with auto-tunnelname specified on the ingress to initiate a ping test to the egress.
  • To check the connectivity of a manually configured tunnel: 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 te Tunnel interface-number [ draft2 ] [ remote remote-address ] [ hot-standby ] command to initiate a ping test to the egress to check the connectivity of the manually configured SR-MPLS TE tunnel.
  • General LSP ping test: Specify the outbound interface, next hop, and label information on the ingress and run the ping lsp general labels command to check LSP connectivity.
  • To check the connectivity of an LDP LSP connected with an SR-MPLS BE tunnel, run the 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 nexthop-address ] [ remote remote-address ] command on the ingress to initiate a ping test to the egress of the SR-MPLS BE tunnel.
  • If the LDP end does not support interworking, you can run the 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 nexthop-address ] [ remote remote-address ] command on the ingress to initiate a ping test to the egress of the SR-MPLS BE tunnel to check the connectivity of an LDP LSP connected with an SR-MPLS BE tunnel.

    You need to run the lspv echo-reply fec-validation ldp disable command on the SR-MPLS BE end to disable the LSPV response end from checking the LDP FEC.

    The tracert lsp command can be used to locate the fault when an LSP fails to forward data and the data traffic on the LSP cannot reach the egress. The LSP ping test and the LSP trace test can check the connectivity of LSPs and locate faults. In practice, when an MPLS forwarding path is incorrect, that is, traffic on an LSP is interrupted, you can use LSP ping and LSP tracert to locate the faulty LSR.

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.

Example

# Ping 4.4.4.9/32 by sending ten 200-byte MPLS echo request packets.
<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
Table 1 Description of the ping lsp (General) command output
Item Description
FEC: xxxx ping statistics

Statistics collected after the ping test is performed on the destination host, including:

  • packet(s) transmitted: indicates the number of sent Echo Request packets.
  • packet(s) received: indicates the number of received Echo Response packets.
  • % packet loss: indicates the percentage of the number of ICMP Echo Request messages with no responses to the total number of sent ICMP Echo Request messages.
  • round-trip min/avg/max: minimum, average, and maximum response time, in milliseconds.
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:

  • bytes: indicates the length of the ICMP Echo Reply message.
  • sequence: specifies the sequence number of the ICMP Echo Reply message.
  • time: indicates the response time, in ms. If no ICMP Echo Reply message is received after the timeout period expires, "Request time out" is displayed.
xx data bytes

Length of a sent packet, in bytes.

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