Enhance your Career in Networking With IPinBits!!!​

MPLS ping – checking connectivity in MPLS network

So in our last ARTICLE about ping, we talked about how ping is used for checking connectivity for IP networks. How do we check connectivity when we have MPLS network, well simple IP ping will not work here as that will only confirm the IP connectivity. Consider following situation :-
1. Ping is ok from A to B.
2. Traceroute is also fine.
3. But still your MPLS traffic is getting dropped.

 As MPLS maintains LSP (label switch path) we need something more than IP PING – and that tool is MPLS ping. MPLS ping doesn’t check about the network connectivity instead it will check the MPLS connectivity. There is a interesting condition when troubleshooting MPLS networks :
1. First check your IP connectivity using IP ping/traceroute.
2. If IP connectivity is okay only then jump to MPLS troubleshooting.

MPLS ping is also known as LSP PING. This article is based on RFC-4379 “Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures”. 

MPLS ping doesn’t use normal ICMP echo request/reply instead it uses MPLS ECHO Req/Reply.  

Now enough of boring theory, let’s fire up our lab nodes and check the real time action, i will explain rest steps in the lab only.

R1, R2 and R3 are in MPLS domain and running LDP in-between them. Let’s See R1 label bindings for R3 loopback

R1 has LIB entry for and has label 17. Let’s see if our MPLS ping is getting successful or not

R1# ping mpls ipv4
Sending 5, 100-byte MPLS Echos to,
     timeout is 2 seconds, send interval is 0 msec:
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unlabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0
Type escape sequence to abort.
Success rate is 100 percent (5/5), round-trip min/avg/max = 10/10/13 ms

So MPLS connectivity is okay, Let see on the packet level, This packet capture is between R1 and R2, we see there are 5 MPLS echo Req and 5 MPLS echo Reply :-
Let’s explore the MPLS ECHO REQUEST MESSAGE:-The following process happens when you use MPLS PING :-
1. When you specify a destination address (FEC) for MPLS ping, it could be a VPNv4 prefix or global routing prefix. Here we are pinging IPv4 (
2. This FEC must have a label learned via LDP/RSVP/STATIC .Here in our lab the has a label 17.
3. The router looks up the FEC in local LFIB and builds the label stack corresponding to the proper LSP.
4. MPLS Header will have TTL 255 and contains label for that FEC.
5. Now router will create a special IP/UDP packet under MPLS header with Source address ( as Router’s egress Interface IP and destination address in range of range ( It is used to ensure that no router in between reply the ECHO Request.
6. The IP packet has Router alert option enabled 
7. This special IP packet has TTL of 1 and UDP port 3503. Now if we focus on the MPLS ECHO (Last section of Packet capture it has following fields :-

  1.  Version – Current RFC has defined version as 1.
  2. Global Flags – All Flags except Validate FEC Stack (V flag) is always 0. The V flag is used when you want to verify the FEC Stack on remote router.
  3. The Message Type is one of the following:
    1. MPLS echo request
    2. MPLS echo reply
  4. The Reply Mode can take one of the following values:
    1. Do not reply – Used to check one way communication.
    2. Reply via an IPv4/IPv6 UDP packet – Most of the times we see this option.
    3. Reply via an IPv4/IPv6 UDP packet with Router Alert – We use this option when normal IP path is deemed unreliable
    4.  Reply via application level control channel – Used with application level control.
  5. Return Codes and Return Sub codes – If passed it is set to 0. For details list of Return codes see RFC 4379.
  6. Sequence number – It is self explanatory.
  7. Timestamp sent/Received – Time when ECHO req and echo reply are registered on router in NTP time format.
  8. Rest fields are TLV, in our case our TLV contains :-
    1. Vendor info
    2. TARGETEED FEC STACK, it contains the FEC info (whether LDP ipv4/ipv6, RSVP, VPN etc.)
      1. FEC info

 This was all about the MPLS ECHO, Now let’s see the MPLS ECHO REPLY

It is same as MPLS ECHO REQUEST but contains Return code.

Happy Learning !!!

Related blog posts