Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures
obsoletes
- rfc-4379 — Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures
- rfc-6424 — Mechanism for Performing Label Switched Path Ping (LSP Ping) over MPLS Tunnels
- rfc-6829 — Label Switched Path (LSP) Ping for Pseudowire Forwarding Equivalence Classes (FECs) Advertised over IPv6
- rfc-7537 — IANA Registries for LSP Ping Code Points
updated by
- rfc-8611 — Label Switched Path (LSP) Ping and Traceroute Multipath Support for Link Aggregation Group (LAG) Interfaces
- rfc-9041 — Updating the MPLS Label Switched Paths (LSPs) Ping Parameters IANA Registry
- rfc-9570 — Deprecating the Use of Router Alert in LSP Ping
updates
- rfc-1122 — Requirements for Internet Hosts - Communication Layers
Extracted elements (27)
Private address space was rejected as a destination for MPLS echo requests because IPv4 VPNs (the primary MPLS service) commonly use private addresses, creating ambiguity. IPv4 link-local addresses were also rejected because a broken LSP could deliver a diagnostic packet to a router that had a link-local address assigned to the receiving interface, and older routers may incorrectly forward link-local-addressed packets toward the default route.
The 127/8 address range was chosen for MPLS echo request destination addresses because RFC 1122 requires hosts to discard such packets (preventing unintended delivery), RFC 1812 prohibits routers from IP-forwarding them (preventing escaped diagnostic packets from traversing the network), and the 16M address space provides sufficient diversity to exercise all ECMP paths via varied IP destination addresses.
The DDMAP TLV was designed to replace the deprecated Downstream Mapping (DSMAP) TLV by converting its variable-length and optional fields into sub-TLVs. This refactoring enables per-downstream Return Code reporting required for P2MP and ECMP scenarios, and improves extensibility without revising the fixed portion of the structure.
The Nil FEC sub-TLV (sub-type 16) was introduced to handle labels from the reserved range (e.g., Router Alert, Explicit Null) added to the label stack for diagnostic purposes such as influencing load-balancing. Since these labels have no explicit FEC, the Nil FEC placeholder allows proper validation of the full label stack.
In tunneled or stitched LSP scenarios, a transit node running only RSVP (not LDP) cannot validate an LDP FEC carried in the echo request; the MPLS echo request must carry sufficient information for any transit node to perform FEC validation and detect misrouted echo requests.
The echo reply MUST use the same IP version as the received echo request (IPv4 in response to IPv4, IPv6 in response to IPv6). Reply Mode 3 (UDP with Router Alert) requires all intermediate routers to understand and correctly forward MPLS echo reply packets.
An MPLS echo request MUST include a Target FEC Stack TLV describing the FEC stack being tested.
For IPv4 encapsulation, the generic IPv4 Router Alert Option (value 0x0, RFC 2113) SHOULD be used. For IPv6 encapsulation, the MPLS OAM IPv6 Router Alert Option value 69 (RFC 7506) MUST be used so transit routers examine the packet for MPLS OAM purposes.
If the T (Respond Only If TTL Expired) flag is set in an incoming echo request and the incoming MPLS label TTL is greater than 1, the receiving node MUST drop the echo request and MUST NOT send any echo reply. The T flag MUST NOT be set in echo reply packets; if set in a reply, it MUST be ignored.
Must-Be-Zero (MBZ) fields MUST be set to zero when sent and ignored on receipt throughout the protocol.
TLV types with the high-order bit = 0 (types < 32768) are mandatory: an implementation MUST either support them or return Return Code 2 ('One or more of the TLVs was not understood'). TLV types >= 32768 (high-order bit = 1) are optional and SHOULD be ignored if not understood.
When an LSR does not know the downstream neighbor's IP address, it MUST set Address Type to IPv4/IPv6 Unnumbered, Downstream Address to 127.0.0.1 (IPv4) or 0::1 (IPv6), and interface index to 0. An LSR receiving one of these addresses MUST bypass interface verification but continue label validation.
When the DDMAP Return Code is set to a non-zero value in the DDMAP TLV by the receiver, the receiver MUST also set the echo reply header Return Code to 14 ('See DDMAP TLV for Return Code and Return Subcode'). Return Code 14 MUST be used when there are multiple downstreams (e.g., P2MP or ECMP) requiring per-downstream Return Codes.
Fifteen Return Codes (0–15) are defined, including: 0 (No Return Code), 3 (Egress for FEC at stack-depth <RSC>), 4 (No mapping for FEC), 8 (Label switched at stack-depth <RSC>), 10 (Mapping mismatch), 11 (No label entry), 13 (Premature termination), 14 (See DDMAP TLV), and 15 (Label switched with FEC change). Return Code 14 MUST only appear in echo reply messages.
The 16-bit Global Flags field has three defined bits: V (Validate FEC Stack) — receiver performs FEC Stack validation if set; T (Respond Only If TTL Expired) — receiver drops request and suppresses reply if MPLS TTL > 1; R (Validate Reverse Path) — receiver should return reverse-path FEC info. All remaining bits MUST be zero on send and ignored on receipt.
The Downstream Detailed Mapping (DDMAP) TLV (type 20) carries: 2-octet MTU, 1-octet Address Type (IPv4/IPv6 numbered/unnumbered), 1-octet DS Flags (I=request Interface and Label Stack object; N=treat as non-IP packet), 4- or 16-octet Downstream Address, 4- or 16-octet Downstream Interface Address, Return Code, Return Subcode, and a list of sub-TLVs. It replaces the deprecated DSMAP TLV.
The FEC Stack Change sub-TLV (sub-type 3 within DDMAP) signals that the downstream FEC Stack differs from the echo request. It carries Operation Type (1=Push, 2=Pop), Address Type (0=Unspecified, 1=IPv4, 2=IPv6), FEC-TLV length, Remote Peer Address (0/4/16 octets), and an optional FEC TLV. The FEC TLV MUST be present for PUSH operations.
The Label Stack sub-TLV (sub-type 2 within DDMAP) lists downstream label/protocol pairs for a given interface. Each entry is 4 octets: 24-bit downstream label (20-bit value + 3-bit TC + 1-bit S) and 8-bit Protocol (0=Unknown, 1=Static, 2=BGP, 3=LDP, 4=RSVP-TE). Implicit Null labels are explicitly included. This sub-TLV MUST be included when DDMAP appears in an echo reply.
The Multipath Data sub-TLV (sub-type 1 within DDMAP) encodes the set of addresses or labels that exercise a specific ECMP path using Multipath Types: 0 (no multipath/empty), 2 (explicit IP addresses), 4 (IP address low/high ranges), 8 (bit-masked IP address set, max prefix 27 bits), 9 (bit-masked label set). IPv4 multipath addresses are drawn from 127/8; IPv6 from 0:0:0:0:0:FFFF:7F00:0/104.
The Target FEC Stack TLV (type 1) is a list of sub-TLVs identifying the FEC stack under test, with one sub-TLV per label stack level. Defined sub-types include LDP IPv4/IPv6 prefix (1,2), RSVP IPv4/IPv6 LSP (3,4), VPN IPv4/IPv6 prefix (6,7), L2 VPN endpoint (8), FEC 128/129 Pseudowire IPv4 and IPv6 variants (10,11,24,25), BGP labeled IPv4/IPv6 prefix (12,13), Generic IPv4/IPv6 prefix (14,15), and Nil FEC (16).
Two Message Types are defined: 1 (MPLS Echo Request) and 2 (MPLS Echo Reply). Four Reply Modes are defined: 1 (Do not reply), 2 (Reply via IPv4/IPv6 UDP), 3 (Reply via UDP with Router Alert), 4 (Reply via application-level control channel).
IANA has assigned UDP and TCP port 3503 for MPLS LSP ping (Section 6.1) and updated the IPv4 Special-Purpose Address Registry to document the use of 127/8 by MPLS LSP ping (Section 6.3), which updates RFC 1122.
RFC 8029 consolidates and updates the 'MPLS LSP Ping Parameters' IANA registry group, comprising sub-registries for: Message Types, Reply Modes, Return Codes (Section 6.2.1); TLVs and sub-TLVs (Section 6.2.2); Global Flags (Section 6.2.3); Downstream Detailed Mapping Address Type (Section 6.2.4); DS Flags (Section 6.2.5); Multipath Types (Section 6.2.6); Pad Type (Section 6.2.7); Interface and Label Stack Address Type (Section 6.2.8). It obsoletes registries from RFCs 4379, 6424, 6829, and 7537.
LSP ping packets can be used for denial-of-service attacks; implementations should rate-limit processing of echo requests and apply access control to restrict which sources may send MPLS echo requests. The diagnostic nature of the protocol means exposure should be limited to authorized network operators.
The use of 127/8 as the MPLS echo request destination ensures that if a diagnostic packet escapes a broken LSP and reaches a host, the host discards it silently per RFC 1122, and routers will not IP-forward it per RFC 1812; this limits the blast radius of misdirected OAM traffic and prevents diagnostic packets from being delivered to end users of MPLS services.
MPLS echo request/reply is a UDP packet with a 32-octet fixed header: 2-octet Version Number (currently 1), 2-octet Global Flags, 1-octet Message Type, 1-octet Reply Mode, 1-octet Return Code, 1-octet Return Subcode, 4-octet Sender's Handle, 4-octet Sequence Number, and two 8-octet NTP-format timestamps (TimeStamp Sent and TimeStamp Received). A variable-length TLV section follows.
TLVs use a 4-octet header consisting of a 2-octet Type and a 2-octet Length (length of Value field in octets); the Value field is zero-padded to a 4-octet boundary. TLVs may nest sub-TLVs, which must also be 4-octet aligned with independent types.