idnits 2.17.1 draft-ietf-mpls-lsp-ping-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 19. -- Found old boilerplate from RFC 3978, Section 5.5 on line 2096. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2105. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2112. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2118. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == The page length should not exceed 58 lines per page, but there was 49 longer pages, the longest (page 2) being 60 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 9 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 1 instance of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 == There are 8 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 2005) is 6706 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'FEC-stack-depth' is mentioned on line 1627, but not defined == Unused Reference: 'BGP' is defined on line 1838, but no explicit reference was found in the text ** Obsolete normative reference: RFC 1771 (ref. 'BGP') (Obsoleted by RFC 4271) ** Obsolete normative reference: RFC 2434 (ref. 'IANA') (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2030 (ref. 'NTP') (Obsoleted by RFC 4330) ** Obsolete normative reference: RFC 1716 (ref. 'RFC1812') (Obsoleted by RFC 1812) ** Downref: Normative reference to an Informational RFC: RFC 4026 -- Obsolete informational reference (is this intentional?): RFC 3107 (ref. 'BGP-LABEL') (Obsoleted by RFC 8277) -- Obsolete informational reference (is this intentional?): RFC 3036 (ref. 'LDP') (Obsoleted by RFC 5036) == Outdated reference: A later version (-15) exists of draft-ietf-pwe3-vccv-07 == Outdated reference: A later version (-08) exists of draft-ietf-l2vpn-vpls-bgp-05 Summary: 8 errors (**), 0 flaws (~~), 9 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Kireeti Kompella 2 Internet Draft Juniper Networks, Inc. 3 Category: Standards Track 4 Expiration Date: June 2006 5 George Swallow 6 Cisco Systems, Inc. 8 December 2005 10 Detecting MPLS Data Plane Failures 12 draft-ietf-mpls-lsp-ping-12.txt 14 Status of this Memo 16 By submitting this Internet-Draft, each author represents that any 17 applicable patent or other IPR claims of which he or she is aware 18 have been or will be disclosed, and any of which he or she becomes 19 aware will be disclosed, in accordance with Section 6 of BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF), its areas, and its working groups. Note that 23 other groups may also distribute working documents as Internet- 24 Drafts. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/1id-abstracts.html 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html 37 Abstract 39 This document describes a simple and efficient mechanism that can be 40 used to detect data plane failures in Multi-Protocol Label Switching 41 (MPLS) Label Switched Paths (LSPs). There are two parts to this 42 document: information carried in an MPLS "echo request" and "echo 43 reply" for the purposes of fault detection and isolation; and 44 mechanisms for reliably sending the echo reply. 46 Contents 48 1 Introduction .............................................. 4 49 1.1 Conventions ............................................... 4 50 1.2 Structure of this document ................................ 4 51 1.3 Contributors .............................................. 5 52 2 Motivation ................................................ 5 53 2.1 Use of address range 127/8 ................................ 6 54 3 Packet Format ............................................. 7 55 3.1 Return Codes .............................................. 12 56 3.2 Target FEC Stack .......................................... 13 57 3.2.1 LDP IPv4 Prefix ........................................... 14 58 3.2.2 LDP IPv6 Prefix ........................................... 14 59 3.2.3 RSVP IPv4 LSP ............................................. 15 60 3.2.4 RSVP IPv6 LSP ............................................. 15 61 3.2.5 VPN IPv4 Prefix ........................................... 16 62 3.2.6 VPN IPv6 Prefix ........................................... 17 63 3.2.7 L2 VPN Endpoint ........................................... 17 64 3.2.8 FEC 128 Pseudowire (Deprecated) ........................... 18 65 3.2.9 FEC 128 Pseudowire (Current) .............................. 18 66 3.2.10 FEC 129 Pseudowire ........................................ 19 67 3.2.11 BGP Labeled IPv4 Prefix ................................... 19 68 3.2.12 BGP Labeled IPv6 Prefix ................................... 20 69 3.2.13 Generic IPv4 Prefix ....................................... 20 70 3.2.14 Generic IPv6 Prefix ....................................... 21 71 3.2.15 Nil FEC ................................................... 21 72 3.3 Downstream Mapping ........................................ 22 73 3.3.1 Multipath Information Encoding ............................ 26 74 3.3.2 Downstream Router and Interface ........................... 28 75 3.4 Pad TLV ................................................... 28 76 3.5 Vendor Enterprise Number .................................. 29 77 3.6 Interface and Label Stack ................................. 29 78 3.7 Errored TLVs .............................................. 31 79 3.8 Reply TOS Byte TLV ........................................ 31 80 4 Theory of Operation ....................................... 32 81 4.1 Dealing with Equal-Cost Multi-Path (ECMP) ................. 32 82 4.2 Testing LSPs That Are Used to Carry MPLS Payloads ......... 33 83 4.3 Sending an MPLS Echo Request .............................. 33 84 4.4 Receiving an MPLS Echo Request ............................ 34 85 4.4.1 FEC Validation ............................................ 40 86 4.5 Sending an MPLS Echo Reply ................................ 41 87 4.6 Receiving an MPLS Echo Reply .............................. 42 88 4.7 Issue with VPN IPv4 and IPv6 Prefixes ..................... 42 89 4.8 Non-compliant Routers ..................................... 43 90 5 References ................................................ 43 91 6 Security Considerations ................................... 44 92 7 IANA Considerations ....................................... 45 93 7.1 Message Types, Reply Modes, Return Codes .................. 46 94 7.2 TLVs ...................................................... 47 95 8 Acknowledgments ........................................... 48 97 1. Introduction 99 This document describes a simple and efficient mechanism that can be 100 used to detect data plane failures in MPLS LSPs. There are two parts 101 to this document: information carried in an MPLS "echo request" and 102 "echo reply"; and mechanisms for transporting the echo reply. The 103 first part aims at providing enough information to check correct 104 operation of the data plane, as well as a mechanism to verify the 105 data plane against the control plane, and thereby localize faults. 106 The second part suggests two methods of reliable reply channels for 107 the echo request message, for more robust fault isolation. 109 An important consideration in this design is that MPLS echo requests 110 follow the same data path that normal MPLS packets would traverse. 111 MPLS echo requests are meant primarily to validate the data plane, 112 and secondarily to verify the data plane against the control plane. 113 Mechanisms to check the control plane are valuable, but are not cov- 114 ered in this document. 116 This document makes special use of the address range 127/8. This is 117 an exception to the behavior defined in RFC1122 [RFC1122] and updates 118 that RFC. The motivation for this change and the details of this 119 exceptional use are discussed in section 2.1 below. 121 1.1. Conventions 123 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 124 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 125 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 127 The term "Must be Zero" (MBZ) is used in object descriptions for 128 reserved fields. These fields MUST be set to zero when sent and 129 ignored on receipt. 131 Terminology pertaining to L2 and L3 VPNs is defined in [RFC4026]. 133 1.2. Structure of this document 135 The body of this memo contains four main parts: motivation, MPLS echo 136 request/reply packet format, LSP ping operation, and a reliable 137 return path. It is suggested that first-time readers skip the actual 138 packet formats and read the Theory of Operation first; the document 139 is structured the way it is to avoid forward references. 141 1.3. Contributors 143 The following made vital contributions to all aspects of this docu- 144 ment, and much of the material came out of debate and discussion 145 among this group. 147 Ronald P. Bonica, Juniper Networks, Inc. 148 Dave Cooper, Global Crossing 149 Ping Pan, Hammerhead Systems 150 Nischal Sheth, Juniper Networks, Inc. 151 Sanjay Wadhwa, Juniper Networks, Inc. 153 2. Motivation 155 When an LSP fails to deliver user traffic, the failure cannot always 156 be detected by the MPLS control plane. There is a need to provide a 157 tool that would enable users to detect such traffic "black holes" or 158 misrouting within a reasonable period of time; and a mechanism to 159 isolate faults. 161 In this document, we describe a mechanism that accomplishes these 162 goals. This mechanism is modeled after the ping/traceroute paradigm: 163 ping (ICMP echo request [ICMP]) is used for connectivity checks, and 164 traceroute is used for hop-by-hop fault localization as well as path 165 tracing. This document specifies a "ping mode" and a "traceroute" 166 mode for testing MPLS LSPs. 168 The basic idea is to verify that packets that belong to a particular 169 Forwarding Equivalence Class (FEC) actually end their MPLS path on a 170 Label Switching Router (LSR) that is an egress for that FEC. This 171 document proposes that this test be carried out by sending a packet 172 (called an "MPLS echo request") along the same data path as other 173 packets belonging to this FEC. An MPLS echo request also carries 174 information about the FEC whose MPLS path is being verified. This 175 echo request is forwarded just like any other packet belonging to 176 that FEC. In "ping" mode (basic connectivity check), the packet 177 should reach the end of the path, at which point it is sent to the 178 control plane of the egress LSR, which then verifies whether it is 179 indeed an egress for the FEC. In "traceroute" mode (fault isola- 180 tion), the packet is sent to the control plane of each transit LSR, 181 which performs various checks that it is indeed a transit LSR for 182 this path; this LSR also returns further information that helps check 183 the control plane against the data plane, i.e., that forwarding 184 matches what the routing protocols determined as the path. 186 One way these tools can be used is to periodically ping a FEC to 187 ensure connectivity. If the ping fails, one can then initiate a 188 traceroute to determine where the fault lies. One can also periodi- 189 cally traceroute FECs to verify that forwarding matches the control 190 plane; however, this places a greater burden on transit LSRs and thus 191 should be used with caution. 193 2.1. Use of address range 127/8 195 As described above, LSP Ping is intended as a diagnostic tool. It is 196 intended to enable providers of an MPLS based service to isolate net- 197 work faults. In particular LSP Ping needs to diagnose situations 198 where the control and data planes are out of sync. It performs this 199 by routing an MPLS echo request packet based solely on its label 200 stack. That is the IP destination address is never used in a for- 201 warding decision. In fact, the sender of an MPLS echo request packet 202 may not know, a priori, the address of the router at the end of the 203 LSP. 205 Providers of MPLS based services also need the ability to trace all 206 of the possible paths that an LSP make take. Since most MPLS ser- 207 vices are based on IP unicast forwarding, these paths are subject to 208 equal cost multi-path load sharing (ECMP). 210 This leads to the following requirements: 212 1. Although the LSP in question may be broken in unknown ways, the 213 likelihood of a diagnostic packet being delivered to a user of an 214 MPLS service MUST be held to an absolute minimum. 216 2. If an LSP is broken in such a way that it prematurely terminates, 217 the diagnostic packet MUST NOT be IP forwarded. 219 3. A means of varying the diagnostic packets such that they exercise 220 all ECMP paths is thus REQUIRED. 222 Clearly using general unicast addresses satisfies neither of the 223 first two requirements. A number of other options for addresses were 224 considered, including a portion of the private address space (as 225 determined by the network operator) and the newly designated IPv4 226 link local addresses. Use of the private address space was deemed 227 ineffective since the leading MPLS based service is IPv4 Virtual Pri- 228 vate Networks (VPN). VPNs often used private addresses. 230 The IPv4 link local addresses are more attractive in that scope over 231 which they can be forwarded is limited. However, if one were to use 232 an address from this range, it would still be possible for the first 233 recipient of a diagnostic packet that "escaped" from a broken LSP to 234 have that addressed assigned to the interface on which it arrived and 235 thus could mistakenly receive such a packet. Further, the IPv4 link 236 local address range has only recently been allocated. Many deployed 237 routers would forward a packet with an address from that range toward 238 the default route. 240 The 127/8 range for IPv4 and that same range embedded in an IPv6 241 addresses for IPv6 was chosen for a number of reasons. 243 RFC1122 allocates the 127/8 as "Internal host loopback address" and 244 states that "Addresses of this form MUST NOT appear outside a host." 245 Thus the default behavior of hosts is to discard such packets. This 246 helps to ensure that if a diagnostic packet is mis-directed to a 247 host, it will be silently discarded. 249 RFC1812 [RFC1812] states that: 251 A router SHOULD NOT forward, except over a loopback interface, any 252 packet that has a destination address on network 127. A router 253 MAY have a switch that allows the network manager to disable these 254 checks. If such a switch is provided, it MUST default to perform- 255 ing the checks. 257 This helps to ensure that diagnostic packets are never IP forwarded. 259 The 127/8 address range provides 16M addresses allowing wide flexi- 260 bility in varying addresses to exercise ECMP paths. Finally, as an 261 implementation optimization, the 127/8 provides an easy means of 262 identifying possible LSP Packets. 264 3. Packet Format 266 An MPLS echo request is a (possibly labeled) IPv4 or IPv6 UDP packet; 267 the contents of the UDP packet have the following format: 269 0 1 2 3 270 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 271 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 272 | Version Number | Global Flags | 273 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 274 | Message Type | Reply mode | Return Code | Return Subcode| 275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 276 | Sender's Handle | 277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 278 | Sequence Number | 279 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 280 | TimeStamp Sent (seconds) | 281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 282 | TimeStamp Sent (microseconds) | 283 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 284 | TimeStamp Received (seconds) | 285 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 286 | TimeStamp Received (microseconds) | 287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 288 | TLVs ... | 289 . . 290 . . 291 . . 292 | | 293 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 295 The Version Number is currently 1. (Note: the Version Number is to 296 be incremented whenever a change is made that affects the ability of 297 an implementation to correctly parse or process an MPLS echo 298 request/reply. These changes include any syntactic or semantic 299 changes made to any of the fixed fields, or to any TLV or sub-TLV 300 assignment or format that is defined at a certain version number. 301 The Version Number may not need to be changed if an optional TLV or 302 sub-TLV is added.) 304 The Global Flags field is a bit vector with the following format: 306 0 1 307 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 308 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 309 | MBZ |V| 310 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 312 One flag is defined for now, the V bit; the rest MUST be set to zero 313 when sending, and ignored on receipt. 315 The V (Validate FEC Stack) flag is set to 1 if the sender wants the 316 receiver to perform FEC stack validation; if V is 0, the choice is 317 left to the receiver. 319 The Message Type is one of the following: 321 Value Meaning 322 ----- ------- 323 1 MPLS Echo Request 324 2 MPLS Echo Reply 326 The Reply Mode can take one of the following values: 328 Value Meaning 329 ----- ------- 330 1 Do not reply 331 2 Reply via an IPv4/IPv6 UDP packet 332 3 Reply via an IPv4/IPv6 UDP packet with Router Alert 333 4 Reply via application level control channel 335 An MPLS echo request with 1 (Do not reply) in the Reply Mode field 336 may be used for one-way connectivity tests; the receiving router may 337 log gaps in the sequence numbers and/or maintain delay/jitter statis- 338 tics. An MPLS echo request would normally have 2 (Reply via an 339 IPv4/IPv6 UDP packet) in the Reply Mode field. If the normal IP 340 return path is deemed unreliable, one may use 3 (Reply via an 341 IPv4/IPv6 UDP packet with Router Alert). Note that this requires 342 that all intermediate routers understand and know how to forward MPLS 343 echo replies. The echo reply uses the same IP version number as the 344 received echo request, i.e., an IPv4 encapsulated echo reply is sent 345 in response to an IPv4 encapsulated echo request. 347 Some applications support an IP control channel. One such example is 348 the associated control channel defined in Virtual Circuit Connectiv- 349 ity Verification [VCCV]. Any application which supports an IP con- 350 trol channel between its control entities may set the Reply Mode to 4 351 (Reply via application level control channel) to ensure that replies 352 use that same channel. Further definition of this codepoint is 353 application specific and thus beyond the scope of this document. 355 Return Codes and Subcodes are described in the next section. 357 the Sender's Handle is filled in by the sender, and returned 358 unchanged by the receiver in the echo reply (if any). There are no 359 semantics associated with this handle, although a sender may find 360 this useful for matching up requests with replies. 362 The Sequence Number is assigned by the sender of the MPLS echo 363 request, and can be (for example) used to detect missed replies. 365 The TimeStamp Sent is the time-of-day (in seconds and microseconds, 366 according to the sender's clock) in NTP format [NTP] when the MPLS 367 echo request is sent. The TimeStamp Received in an echo reply is the 368 time-of-day (according to the receiver's clock) in NTP format that 369 the corresponding echo request was received. 371 TLVs (Type-Length-Value tuples) have the following format: 373 0 1 2 3 374 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 376 | Type | Length | 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 378 | Value | 379 . . 380 . . 381 . . 382 | | 383 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 385 Types are defined below; Length is the length of the Value field in 386 octets. The Value field depends on the Type; it is zero padded to 387 align to a four-octet boundary. TLVs may be nested within other 388 TLVs, in which case the nested TLVs are called sub-TLVs. Sub-TLVs 389 have independent types and MUST also be four-octet aligned. 391 Two examples follow. The LDP IPv4 FEC sub-TLV has the following for- 392 mat: 394 0 1 2 3 395 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 396 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 397 | Type = 1 (LDP IPv4 FEC) | Length = 5 | 398 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 399 | IPv4 prefix | 400 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 401 | Prefix Length | Must Be Zero | 402 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 404 The Length for this TLV is 5. A Target FEC Stack TLV which contains 405 an LDP IPv4 FEC sub-TLV and a VPN IPv4 prefix sub-TLV has the format: 407 0 1 2 3 408 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 409 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 410 | Type = 1 (FEC TLV) | Length = 12 | 411 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 412 | sub-Type = 1 (LDP IPv4 FEC) | Length = 5 | 413 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 414 | IPv4 prefix | 415 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 416 | Prefix Length | Must Be Zero | 417 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 418 | sub-Type = 6 (VPN IPv4 prefix)| Length = 13 | 419 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 420 | Route Distinguisher | 421 | (8 octets) | 422 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 423 | IPv4 prefix | 424 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 425 | Prefix Length | Must Be Zero | 426 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 428 A description of the Types and Values of the top level TLVs for LSP 429 ping are given below: 431 Type # Value Field 432 ------ ----------- 433 1 Target FEC Stack 434 2 Downstream Mapping 435 3 Pad 436 4 Not Assigned 437 5 Vendor Enterprise Number 438 6 Not Assigned 439 7 Interface and Label Stack 440 8 Not Assigned 441 9 Errored TLVs 442 10 Reply TOS Byte 444 Types less than 32768 (i.e., with the high order bit equal to 0) are 445 mandatory TLVs that MUST either be supported by an implementation or 446 result in the return code of 2 ("One or more of the TLVs was not 447 understood") being sent in the echo response. 449 Types greater than or equal to 32768 (i.e., with the high order bit 450 equal to 1) are optional TLVs that SHOULD be ignored if the implemen- 451 tation does not understand or support them. 453 3.1. Return Codes 455 The Return Code is set to zero by the sender. The receiver can set 456 it to one of the values listed below. The notation refers to 457 the Return Subcode. This field is filled in with the stack-depth for 458 those codes which specify that. For all other codes the Return Sub- 459 code MUST be set to zero. 461 Value Meaning 462 ----- ------- 464 0 No return code 466 1 Malformed echo request received 468 2 One or more of the TLVs was not understood 470 3 Replying router is an egress for the FEC at stack 471 depth 473 4 Replying router has no mapping for the FEC at stack 474 depth 476 5 Downstream Mapping Mismatch (See Note 1) 478 6 Upstream Interface Index Unknown (See Note 1) 480 7 Reserved 482 8 Label switched at stack-depth 484 9 Label switched but no MPLS forwarding at stack-depth 485 487 10 Mapping for this FEC is not the given label at stack 488 depth 490 11 No label entry at stack-depth 492 12 Protocol not associated with interface at FEC stack 493 depth 495 13 Premature termination of ping due to label stack 496 shrinking to a single label 498 Note 1 500 The Return Subcode contains the point in the label stack where pro- 501 cessing was terminated. If the RSC is 0, no labels were processed. 502 Otherwise the packet would have been label switched at depth RSC. 504 3.2. Target FEC Stack 506 A Target FEC Stack is a list of sub-TLVs. The number of elements is 507 determined by looking at the sub-TLV length fields. 509 Sub-Type Length Value Field 510 -------- ------ ----------- 511 1 5 LDP IPv4 prefix 512 2 17 LDP IPv6 prefix 513 3 20 RSVP IPv4 LSP 514 4 56 RSVP IPv6 LSP 515 5 Not Assigned 516 6 13 VPN IPv4 prefix 517 7 25 VPN IPv6 prefix 518 8 14 L2 VPN endpoint 519 9 10 "FEC 128" Pseudowire (deprecated) 520 10 14 "FEC 128" Pseudowire 521 11 16+ "FEC 129" Pseudowire 522 12 5 BGP labeled IPv4 prefix 523 13 17 BGP labeled IPv6 prefix 524 14 5 Generic IPv4 prefix 525 15 17 Generic IPv6 prefix 526 16 4 Nil FEC 528 Other FEC Types will be defined as needed. 530 Note that this TLV defines a stack of FECs, the first FEC element 531 corresponding to the top of the label stack, etc. 533 An MPLS echo request MUST have a Target FEC Stack that describes the 534 FEC stack being tested. For example, if an LSR X has an LDP mapping 535 [see LDP] for 192.168.1.1 (say label 1001), then to verify that label 536 1001 does indeed reach an egress LSR that announced this prefix via 537 LDP, X can send an MPLS echo request with a FEC Stack TLV with one 538 FEC in it, namely of type LDP IPv4 prefix, with prefix 539 192.168.1.1/32, and send the echo request with a label of 1001. 541 Say LSR X wanted to verify that a label stack of <1001, 23456> is the 542 right label stack to use to reach a VPN IPv4 prefix [see section 543 3.2.5] of 10/8 in VPN foo. Say further that LSR Y with loopback 544 address 192.168.1.1 announced prefix 10/8 with Route Distinguisher 545 RD-foo-Y (which may in general be different from the Route Distin- 546 guisher that LSR X uses in its own advertisements for VPN foo), label 547 23456 and BGP nexthop 192.168.1.1 [see BGP]. Finally, suppose that 548 LSR X receives a label binding of 1001 for 192.168.1.1 via LDP. X 549 has two choices in sending an MPLS echo request: X can send an MPLS 550 echo request with a FEC Stack TLV with a single FEC of type VPN IPv4 551 prefix with a prefix of 10/8 and a Route Distinguisher of RD-foo-Y. 552 Alternatively, X can send a FEC Stack TLV with two FECs, the first of 553 type LDP IPv4 with a prefix of 192.168.1.1/32 and the second of type 554 of IP VPN with a prefix 10/8 with Route Distinguisher of RD-foo-Y. 555 In either case, the MPLS echo request would have a label stack of 556 <1001, 23456>. (Note: in this example, 1001 is the "outer" label and 557 23456 is the "inner" label.) 559 3.2.1. LDP IPv4 Prefix 561 The IPv4 Prefix FEC is defined in [LDP]. When a LDP IPv4 prefix is 562 encoded in a label stack, the following format is used. The value 563 consists of four octets of an IPv4 prefix followed by one octet of 564 prefix length in bits; the format is given below. The IPv4 prefix is 565 in network byte order; if the prefix is shorter than 32 bits, trail- 566 ing bits SHOULD be set to zero. See [LDP] for an example of a Map- 567 ping for an IPv4 FEC. 569 0 1 2 3 570 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 572 | IPv4 prefix | 573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 574 | Prefix Length | Must Be Zero | 575 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 577 3.2.2. LDP IPv6 Prefix 579 The IPv6 Prefix FEC is defined in [LDP]. When a LDP IPv6 prefix is 580 encoded in a label stack, the following format is used. The value 581 consists of sixteen octets of an IPv6 prefix followed by one octet of 582 prefix length in bits; the format is given below. The IPv6 prefix is 583 in network byte order; if the prefix is shorter than 128 bits, the 584 trailing bits SHOULD be set to zero. See [LDP] for an example of a 585 Mapping for an IPv6 FEC. 587 0 1 2 3 588 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 589 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 590 | IPv6 prefix | 591 | (16 octets) | 592 | | 593 | | 594 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 595 | Prefix Length | Must Be Zero | 596 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 598 3.2.3. RSVP IPv4 LSP 600 The value has the format below. The value fields are taken from 601 RFC3209, sections 4.6.1.1 and 4.6.2.1. See [RSVP-TE]. 603 0 1 2 3 604 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 605 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 606 | IPv4 tunnel end point address | 607 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 608 | Must Be Zero | Tunnel ID | 609 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 610 | Extended Tunnel ID | 611 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 612 | IPv4 tunnel sender address | 613 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 614 | Must Be Zero | LSP ID | 615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 617 3.2.4. RSVP IPv6 LSP 619 The value has the format below. The value fields are taken from 620 RFC3209, sections 4.6.1.2 and 4.6.2.2. See [RSVP-TE]. 622 0 1 2 3 623 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 624 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 625 | IPv6 tunnel end point address | 626 | | 627 | | 628 | | 629 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 630 | Must Be Zero | Tunnel ID | 631 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 632 | Extended Tunnel ID | 633 | | 634 | | 635 | | 636 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 637 | IPv6 tunnel sender address | 638 | | 639 | | 640 | | 641 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 642 | Must Be Zero | LSP ID | 643 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 645 3.2.5. VPN IPv4 Prefix 647 VPN-IPv4 NLRI (Network Layer Routing Information) is defined in 648 [MPLS-L3-VPN]. This document uses the term VPN IPv4 prefix for a 649 VPN-IPv4 NLRI which has been advertised with an MPLS label in BGP. 650 See [BGP-LABEL]. 652 When a VPN IPv4 prefix is encoded in a label stack, the following 653 format is used. The value field consists of the Route Distinguisher 654 advertised with the VPN IPv4 prefix, the IPv4 prefix (with trailing 0 655 bits to make 32 bits in all) and a prefix length, as follows: 657 0 1 2 3 658 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 659 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 660 | Route Distinguisher | 661 | (8 octets) | 662 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 663 | IPv4 prefix | 664 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 665 | Prefix Length | Must Be Zero | 666 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 668 3.2.6. VPN IPv6 Prefix 670 VPN-IPv6 NLRI (Network Layer Routing Information) is defined in 671 [MPLS-L3-VPN]. This document uses the term VPN IPv6 prefix for a 672 VPN-IPv6 NLRI which has been advertised with an MPLS label in BGP. 673 See [BGP-LABEL]. 675 When a VPN IPv6 prefix is encoded in a label stack, the following 676 format is used. The value field consists of the Route Distinguisher 677 advertised with the VPN IPv6 prefix, the IPv6 prefix (with trailing 0 678 bits to make 128 bits in all) and a prefix length, as follows: 680 0 1 2 3 681 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 682 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 683 | Route Distinguisher | 684 | (8 octets) | 685 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 686 | IPv6 prefix | 687 | | 688 | | 689 | | 690 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 691 | Prefix Length | Must Be Zero | 692 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 694 3.2.7. L2 VPN Endpoint 696 VPLS BGP NLRI and VE ID are defined in [VPLS]. This document uses 697 the simpler term L2 VPN endpoint when referring to a VPLS BGP NLRI. 698 When an L2 VPN endpoint is encoded in a label stack, the following 699 format is used. The value field consists of a Route Distinguisher (8 700 octets), the sender (of the ping)'s VE ID (2 octets), the receiver's 701 VE ID (2 octets), and an encapsulation type (2 octets), formatted as 702 follows: 704 0 1 2 3 705 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 706 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 707 | Route Distinguisher | 708 | (8 octets) | 709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 710 | Sender's VE ID | Receiver's VE ID | 711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 712 | Encapsulation Type | Must Be Zero | 713 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 715 3.2.8. FEC 128 Pseudowire (Deprecated) 717 FEC 128 and the term VC ID are defined in [PW-CONTROL]. When a FEC 718 128 is encoded in a label stack, the following format is used. The 719 value field consists of the remote PE address (the destination 720 address of the targeted LDP session), a VC ID and an encapsulation 721 type, as follows: 723 0 1 2 3 724 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 726 | Remote PE Address | 727 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 728 | VC ID | 729 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 730 | Encapsulation Type | Must Be Zero | 731 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 733 This FEC is deprecated and is retained only for backward compatibil- 734 ity. Implementations of LSP ping SHOULD accept and process this TLV, 735 but SHOULD send LSP ping echo requests with the new TLV (see next 736 section), unless explicitly configured to use the old TLV. 738 An LSR receiving this TLV SHOULD use the source IP address of the LSP 739 echo request to infer the Sender's PE Address. 741 3.2.9. FEC 128 Pseudowire (Current) 743 FEC 128 and the term VC ID are defined in [PW-CONTROL]. When a FEC 744 128 is encoded in a label stack, the following format is used. The 745 value field consists of the sender's PE address (the source address 746 of the targeted LDP session), the remote PE address (the destination 747 address of the targeted LDP session), a VC ID and an encapsulation 748 type, as follows: 750 0 1 2 3 751 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 752 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 753 | Sender's PE Address | 754 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 755 | Remote PE Address | 756 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 757 | VC ID | 758 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 759 | Encapsulation Type | Must Be Zero | 760 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 762 3.2.10. FEC 129 Pseudowire 764 FEC 129 and the terms AII, AGI, SAII, and TAII are defined in [PW- 765 CONTROL]. When a FEC 129 is encoded in a label stack, the following 766 format is used. The Length of this TLV is 16 + AGI length + SAII 767 length + TAII length. Padding is used to make the total length a 768 multiple of 4; the length of the padding is not included in the 769 Length field. 771 0 1 2 3 772 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 773 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 774 | Sender's PE Address | 775 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 776 | Remote PE Address | 777 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 778 | PW Type | AGI Type | AGI Length | 779 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 780 ~ AGI Value ~ 781 | | 782 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 783 | AII Type | SAII Length | SAII Value | 784 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 785 ~ SAII Value (continued) ~ 786 | | 787 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 788 | AII Type | TAII Length | TAII Value | 789 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 790 ~ TAII Value (continued) ~ 791 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 792 | TAII (cont.) | 0-3 octets of zero padding | 793 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 795 3.2.11. BGP Labeled IPv4 Prefix 797 BGP labeled IPv4 prefixes are defined in [BGP-LABEL]. When a BGP 798 labeled IPv4 prefix is encoded in a label stack, the following format 799 is used. The value field consists the IPv4 prefix (with trailing 0 800 bits to make 32 bits in all), and the prefix length, as follows: 802 0 1 2 3 803 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 804 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 805 | IPv4 Prefix | 806 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 807 | Prefix Length | Must Be Zero | 808 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 810 3.2.12. BGP Labeled IPv6 Prefix 812 BGP labeled IPv6 prefixes are defined in [BGP-LABEL]. When a BGP 813 labeled IPv6 prefix is encoded in a label stack, the following format 814 is used. The value consists of sixteen octets of an IPv6 prefix fol- 815 lowed by one octet of prefix length in bits; the format is given 816 below. The IPv6 prefix is in network byte order; if the prefix is 817 shorter than 128 bits, the trailing bits SHOULD be set to zero. 819 0 1 2 3 820 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 821 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 822 | IPv6 prefix | 823 | (16 octets) | 824 | | 825 | | 826 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 827 | Prefix Length | Must Be Zero | 828 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 830 3.2.13. Generic IPv4 Prefix 832 The value consists of four octets of an IPv4 prefix followed by one 833 octet of prefix length in bits; the format is given below. The IPv4 834 prefix is in network byte order; if the prefix is shorter than 32 835 bits, trailing bits SHOULD be set to zero. This FEC is used if the 836 protocol advertising the label is unknown, or may change during the 837 course of the LSP. An example is an inter-AS LSP that may be sig- 838 naled by LDP in one AS, by RSVP-TE [RSVP-TE] in another AS, and by 839 BGP between the ASes, such as is common for inter-AS VPNs. 841 0 1 2 3 842 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 843 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 844 | IPv4 prefix | 845 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 846 | Prefix Length | Must Be Zero | 847 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 849 3.2.14. Generic IPv6 Prefix 851 The value consists of sixteen octets of an IPv6 prefix followed by 852 one octet of prefix length in bits; the format is given below. The 853 IPv6 prefix is in network byte order; if the prefix is shorter than 854 128 bits, the trailing bits SHOULD be set to zero. 856 0 1 2 3 857 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 858 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 859 | IPv6 prefix | 860 | (16 octets) | 861 | | 862 | | 863 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 864 | Prefix Length | Must Be Zero | 865 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 867 3.2.15. Nil FEC 869 At times labels from the reserved range, e.g. Router Alert and 870 Explicit-null, may be added to the label stack for various diagnostic 871 purposes such as influencing load-balancing. These labels may have 872 no explicit FEC associated with them. The Nil FEC stack is defined 873 to allow a Target FEC stack sub-TLV to be added to the target FEC 874 stack to account for such labels so that proper validation can still 875 be performed. 877 The Length is 4. Labels are 20 bit values treated as numbers. 878 stack. 880 0 1 2 3 881 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 882 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 883 | Label | MBZ | 884 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 886 Label is the actual label value inserted in the label stack; the MBZ 887 fields MUST be zero when sent, and ignored on receipt. 889 3.3. Downstream Mapping 891 The Downstream Mapping object is a TLV which MAY be included in an 892 echo request message. Only one Downstream Mapping object may appear 893 in an echo request. The presence of a Downstream Mapping object is a 894 request that Downstream Mapping objects be included in the echo 895 reply. If the replying router is the destination of the FEC, then a 896 Downstream Mapping TLV SHOULD NOT be included in the echo reply. 897 Otherwise the replying router SHOULD include a Downstream Mapping 898 object for each interface over which this FEC could be forwarded. 899 For a more precise definition of the notion of "downstream", see sec- 900 tion 3.3.2, "Downstream Router and Interface". 902 The Length is K + M + 4*N octets, where M is the Multipath Length, 903 and N is the number of Downstream Labels. Values for K are found in 904 the description of Address Type below. The Value field of a Down- 905 stream Mapping has the following format: 907 0 1 2 3 908 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 909 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 910 | MTU | Address Type | DS Flags | 911 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 912 | Downstream IP Address (4 or 16 octets) | 913 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 914 | Downstream Interface Address (4 or 16 octets) | 915 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 916 | Multipath Type| Depth Limit | Multipath Length | 917 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 918 . . 919 . (Multipath Information) . 920 . . 921 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 922 | Downstream Label | Protocol | 923 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 924 . . 925 . . 926 . . 927 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 928 | Downstream Label | Protocol | 929 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 931 Maximum Transmission Unit (MTU) 933 The MTU is the size in octets of the largest MPLS frame (including 934 label stack) that fits on the interface to the Downstream LSR. 936 Address Type 938 The Address Type indicates if the interface is numbered or unnum- 939 bered. It also determines the length of the Downstream IP Address 940 and Downstream Interface fields. The resulting total for the initial 941 part of the TLV is listed in the table below as "K Octets". The 942 Address Type is set to one of the following values: 944 Type # Address Type K Octets 945 ------ ------------ -------- 946 1 IPv4 Numbered 16 947 2 IPv4 Unnumbered 16 948 3 IPv6 Numbered 40 949 4 IPv6 Unnumbered 28 951 DS Flags 953 The DS Flags field is a bit vector with the following format: 955 0 1 2 3 4 5 6 7 956 +-+-+-+-+-+-+-+-+ 957 | Rsvd(MBZ) |I|N| 958 +-+-+-+-+-+-+-+-+ 960 Two flags are defined currently, I and N. The remaining flags MUST 961 be set to zero when sending, and ignored on receipt. 963 Flag Name and Meaning 964 ---- ---------------- 966 I Interface and Label Stack Object Request 968 When this flag is set, it indicates that the replying 969 router SHOULD include an Interface and Label Stack 970 Object in the echo reply message 972 N Treat as a Non-IP Packet 974 Echo request messages will be used to diagnose non-IP 975 flows. However, these messages are carried in IP 976 packets. For a router which alters its ECMP algorithm 977 based on the FEC or deep packet examination, this flag 978 requests that the router treat this as it would if the 979 determination of an IP payload had failed. 981 Downstream IP Address and Downstream Interface Address 983 IPv4 addresses and and interface indices are encoded in 4 octets, 984 IPv6 addresses are encoded in 16 octets. 986 If the interface to the downstream LSR is numbered, then the Address 987 Type MUST be set to IPv4 or IPv6, the Downstream IP Address MUST be 988 set to either the downstream LSR's Router ID or the interface address 989 of the downstream LSR, and the Downstream Interface Address MUST be 990 set to the downstream LSR's interface address. 992 If the interface to the downstream LSR is unnumbered, the Address 993 Type MUST be IPv4 Unnumbered or IPv6 Unnumbered, the Downstream IP 994 Address MUST be the downstream LSR's Router ID, and the Downstream 995 Interface Address MUST be set to the index assigned by the upstream 996 LSR to the interface. 998 If an LSR does not know the IP address of its neighbor, then it MUST 999 set the Address Type to either IPv4 Unnumbered or IPv6 Unnumbered. 1000 For IPv4 it must set the Downstream IP Address to 127.0.0.1, for IPv6 1001 the address is set to 0::1. In both cases the interface index MUST 1002 be set to 0. If an LSR receives an Echo Request packet with either 1003 of these addresses in the Downstream IP Address field, this indicates 1004 that it MUST bypass interface verification but continue with label 1005 validation. 1007 If the originator of an Echo Request packet wishes to obtain Down- 1008 stream mapping information but does not know the expected label stack 1009 then it SHOULD set the Address Type to either IPv4 Unnumbered or IPv6 1010 Unnumbered. For IPv4 it MUST set the Downstream IP Address to 1011 224.0.0.2, for IPv6 the address MUST be set to FF02::2. In both 1012 cases the interface index MUST be set to 0. If an LSR receives an 1013 Echo Request packet with the all-routers multicast address, then this 1014 indicates that it MUST bypass both interface and label stack valida- 1015 tion, but return Downstream Mapping TLVs using the information pro- 1016 vided. 1018 Multipath Type 1020 The following Multipath Types are defined: 1022 Key Type Multipath Information 1023 --- ---------------- --------------------- 1024 0 no multipath Empty (Multipath Length = 0) 1025 2 IP address IP addresses 1026 4 IP address range low/high address pairs 1027 8 Bit-masked IPv4 IP address prefix and bit mask 1028 address set 1029 9 Bit-masked label set Label prefix and bit mask 1031 Type 0 indicates that all packets will be forwarded out this one 1032 interface. 1034 Types 2, 4, 8 and 9 specify that the supplied Multipath Information 1035 will serve to exercise this path. 1037 Depth Limit 1039 The Depth Limit is applicable only to a label stack, and is the maxi- 1040 mum number of labels considered in the hash; this SHOULD be set to 1041 zero if unspecified or unlimited. 1043 Multipath Length 1045 The length in octets of the Multipath Information. 1047 Multipath Information 1049 Address or label values encoded according to the Multipath Type. See 1050 the next section below for encoding details. 1052 Downstream Label(s) 1054 The set of labels in the label stack as it would have appeared if 1055 this router were forwarding the packet through this interface. Any 1056 Implicit Null labels are explicitly included. Labels are treated as 1057 numbers, i.e. they are right justified in the field. 1059 A Downstream Label is 24 bits, in the same format as an MPLS label 1060 minus the TTL field, i.e., the MSBit of the label is bit 0, the LSBit 1061 is bit 19, the EXP bits are bits 20-22, and bit 23 is the S bit. The 1062 replying router SHOULD fill in the EXP and S bits; the LSR receiving 1063 the echo reply MAY choose to ignore these bits. 1065 Protocol 1067 The Protocol is taken from the following table: 1069 Protocol # Signaling Protocol 1070 ---------- ------------------ 1071 0 Unknown 1072 1 Static 1073 2 BGP 1074 3 LDP 1075 4 RSVP-TE 1077 3.3.1. Multipath Information Encoding 1079 The multipath information encodes labels or addresses which will 1080 exercise this path. The multipath information depends on the multi- 1081 path type. The contents of the field are shown in the table above. 1082 IP addresses are drawn from the range 127/8. Labels are treated as 1083 numbers, i.e. they are right justified in the field. For Type 4, 1084 ranges indicated by Address pairs MUST NOT overlap and MUST be in 1085 ascending sequence. 1087 Type 8 allows a denser encoding of IP address. The IPv4 prefix is 1088 formatted as a base IPv4 address with the non-prefix low order bits 1089 set to zero. The maximum prefix length is 27. Following the prefix 1090 is a mask of length 2^(32-prefix length) bits. Each bit set to one 1091 represents a valid address. The address is the base IPv4 address 1092 plus the position of the bit in the mask where the bits are numbered 1093 left to right beginning with zero. For example the IP addresses 1094 127.2.1.0, 127.2.1.5-127.2.1.15, and 127.2.1.20-127.2.1.29 would be 1095 encoded as follows: 1097 0 1 2 3 1098 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1099 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1100 |0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0| 1101 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1102 |1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0| 1103 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1105 Type 9 allows a denser encoding of Labels. The label prefix is for- 1106 matted as a base label value with the non-prefix low order bits set 1107 to zero. The maximum prefix (including leading zeros due to encod- 1108 ing) length is 27. Following the prefix is a mask of length 1109 2^(32-prefix length) bits. Each bit set to one represents a valid 1110 Label. The label is the base label plus the position of the bit in 1111 the mask where the bits are numbered left to right beginning with 1112 zero. Label values of all the odd numbers between 1152 and 1279 1113 would be encoded as follows: 1115 0 1 2 3 1116 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1117 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1118 |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0| 1119 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1120 |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| 1121 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1122 |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| 1123 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1124 |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| 1125 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1126 |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| 1127 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1129 If the received multipath information is non-null, the labels and IP 1130 addresses MUST be picked from the set provided. If none of these 1131 labels or addresses map to a particular downstream interface, then 1132 for that interface, the type MUST be set to 0. If the received mul- 1133 tipath information is null, (i.e. Multipath Length = 0, or for Types 1134 8 and 9 a mask of all zeroes) the receiver the type MUST be set to 0. 1136 For example, suppose LSR X at hop 10 has two downstream LSRs Y and Z 1137 for the FEC in question. The received X could return Multipath Type 1138 4, with low/high IP addresses of 127.1.1.1->127.1.1.255 for down- 1139 stream LSR Y and 127.2.1.1->127.2.1.255 for downstream LSR Z. The 1140 head end reflects this information to LSR Y. Y, which has three 1141 downstream LSRs U, V and W, computes that 127.1.1.1->127.1.1.127 1142 would go to U and 127.1.1.128-> 127.1.1.255 would go to V. Y would 1143 then respond with 3 Downstream Mappings: to U, with Multipath Type 4 1144 (127.1.1.1->127.1.1.127); to V, with Multipath Type 4 1145 (127.1.1.127->127.1.1.255); and to W, with Multipath Type 0. 1147 Note that computing multi-path information may impose a significant 1148 processing burden on the receiver. A receiver MAY thus choose to 1149 process a subset of the received prefixes. The sender, on receiving 1150 a reply to a Downstream Map with partial information, SHOULD assume 1151 that the prefixes missing in the reply were skipped by the receiver, 1152 and MAY re-request information about them in a new echo request. 1154 3.3.2. Downstream Router and Interface 1156 The notion of "downstream router" and "downstream interface" should 1157 be explained. Consider an LSR X. If a packet that was originated 1158 with TTL n>1 arrived with outermost label L and TTL=1 at LSR X, X 1159 must be able to compute which LSRs could receive the packet if it was 1160 originated with TTL=n+1, over which interface the request would 1161 arrive and what label stack those LSRs would see. (It is outside the 1162 scope of this document to specify how this computation is done.) The 1163 set of these LSRs/interfaces are the downstream routers/interfaces 1164 (and their corresponding labels) for X with respect to L. Each pair 1165 of downstream router and interface requires a separate Downstream 1166 Mapping to be added to the reply. 1168 The case where X is the LSR originating the echo request is a special 1169 case. X needs to figure out what LSRs would receive the MPLS echo 1170 request for a given FEC Stack that X originates with TTL=1. 1172 The set of downstream routers at X may be alternative paths (see the 1173 discussion below on ECMP) or simultaneous paths (e.g., for MPLS mul- 1174 ticast). In the former case, the Multipath Information is used as a 1175 hint to the sender as to how it may influence the choice of these 1176 alternatives. 1178 3.4. Pad TLV 1180 The value part of the Pad TLV contains a variable number (>= 1) of 1181 octets. The first octet takes values from the following table; all 1182 the other octets (if any) are ignored. The receiver SHOULD verify 1183 that the TLV is received in its entirety, but otherwise ignores the 1184 contents of this TLV, apart from the first octet. 1186 Value Meaning 1187 ----- ------- 1188 1 Drop Pad TLV from reply 1189 2 Copy Pad TLV to reply 1190 3-255 Reserved for future use 1192 3.5. Vendor Enterprise Number 1194 SMI Private Enterprise Numbers are maintained by IANA. The Length is 1195 always 4; the value is the SMI Private Enterprise code, in network 1196 octet order, of the vendor with a Vendor Private extension to any of 1197 the fields in the fixed part of the message, in which case this TLV 1198 MUST be present. If none of the fields in the fixed part of the mes- 1199 sage have vendor private extensions, inclusion of this this TLV in is 1200 OPTIONAL. Vendor private ranges for Message Types, Reply Modes, and 1201 Return Codes have been defined. When any of these are used the Ven- 1202 dor Enterprise Number TLV MUST be included in the message. 1204 3.6. Interface and Label Stack 1206 The Interface and Label Stack TLV MAY be included in a reply message 1207 to report the interface on which the request message was received and 1208 the label stack which was on the packet when it was received. Only 1209 one such object may appear. The purpose of the object is to allow 1210 the upstream router to obtain the exact interface and label stack 1211 information as it appears at the replying LSR. 1213 The Length is K + 4*N octets, N is the number of labels in the Label 1214 Stack. Values for K are found in the description of Address Type 1215 below. The Value field of a Downstream Mapping has the following 1216 format: 1218 0 1 2 3 1219 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1221 | Address Type | Must be Zero | 1222 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1223 | IP Address (4 or 16 octets) | 1224 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1225 | Interface (4 or 16 octets) | 1226 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1227 . . 1228 . . 1229 . Label Stack . 1230 . . 1231 . . 1232 . . 1233 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1235 Address Type 1237 The Address Type indicates if the interface is numbered or unnum- 1238 bered. It also determines the length of the IP Address and Interface 1239 fields. The resulting total for the initial part of the TLV is 1240 listed in the table below as "K Octets". The Address Type is set to 1241 one of the following values: 1243 Type # Address Type K Octets 1244 ------ ------------ -------- 1245 1 IPv4 Numbered 12 1246 2 IPv4 Unnumbered 12 1247 3 IPv6 Numbered 36 1248 4 IPv6 Unnumbered 24 1250 IP Address and Interface 1252 IPv4 addresses and and interface indices are encoded in 4 octets, 1253 IPv6 addresses are encoded in 16 octets. 1255 If the interface upon which the echo request message was received is 1256 numbered, then the Address Type MUST be set to IPv4 or IPv6, the IP 1257 Address MUST be set to either the LSR's Router ID or the interface 1258 address, and the Interface MUST be set to the interface address. 1260 If the interface unnumbered, the Address Type MUST be either IPv4 1261 Unnumbered or IPv6 Unnumbered, the IP Address MUST be the LSR's 1262 Router ID, and the Interface MUST be set to the index assigned to the 1263 interface. 1265 Label Stack 1267 The label stack of the received echo request message. If any TTL 1268 values have been changed by this router, they SHOULD be restored. 1270 3.7. Errored TLVs 1272 The following TLV is a TLV which MAY be included in an echo reply to 1273 inform the sender of an echo request of Mandatory TLVs either not 1274 supported by an implementation, or parsed and found to be in error. 1276 The Value field contains the TLVs that were not understood, encoded 1277 as sub-TLVs. 1279 0 1 2 3 1280 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1282 | Type = 9 | Length | 1283 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1284 | Value | 1285 . . 1286 . . 1287 . . 1288 | | 1289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1291 3.8. Reply TOS Byte TLV 1293 This TLV MAY be used by the originator of the echo request to 1294 request 1295 that a echo reply be sent with the IP header TOS byte set to 1296 the value specified in the TLV. This TLV has a length of 4 with 1297 the following value field. 1299 0 1 2 3 1300 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1301 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1302 | Reply-TOS Byte| Must be zero | 1303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1305 4. Theory of Operation 1307 An MPLS echo request is used to test a particular LSP. The LSP to be 1308 tested is identified by the "FEC Stack"; for example, if the LSP was 1309 set up via LDP, and is to an egress IP address of 10.1.1.1, the FEC 1310 stack contains a single element, namely, an LDP IPv4 prefix sub-TLV 1311 with value 10.1.1.1/32. If the LSP being tested is an RSVP LSP, the 1312 FEC stack consists of a single element that captures the RSVP Session 1313 and Sender Template which uniquely identifies the LSP. 1315 FEC stacks can be more complex. For example, one may wish to test a 1316 VPN IPv4 prefix of 10.1/8 that is tunneled over an LDP LSP with 1317 egress 10.10.1.1. The FEC stack would then contain two sub-TLVs, the 1318 bottom being a VPN IPv4 prefix, and the top being an LDP IPv4 prefix. 1319 If the underlying (LDP) tunnel were not known, or was considered 1320 irrelevant, the FEC stack could be a single element with just the VPN 1321 IPv4 sub-TLV. 1323 When an MPLS echo request is received, the receiver is expected to 1324 verify that the control plane and data plane are both healthy (for 1325 the FEC stack being pinged), and that the two planes are in sync. 1326 The procedures for this are in section 4.4 below. 1328 4.1. Dealing with Equal-Cost Multi-Path (ECMP) 1330 LSPs need not be simple point-to-point tunnels. Frequently, a single 1331 LSP may originate at several ingresses, and terminate at several 1332 egresses; this is very common with LDP LSPs. LSPs for a given FEC 1333 may also have multiple "next hops" at transit LSRs. At an ingress, 1334 there may also be several different LSPs to choose from to get to the 1335 desired endpoint. Finally, LSPs may have backup paths, detour paths 1336 and other alternative paths to take should the primary LSP go down. 1338 To deal with the last two first: it is assumed that the LSR sourcing 1339 MPLS echo requests can force the echo request into any desired LSP, 1340 so choosing among multiple LSPs at the ingress is not an issue. The 1341 problem of probing the various flavors of backup paths that will typ- 1342 ically not be used for forwarding data unless the primary LSP is down 1343 will not be addressed here. 1345 Since the actual LSP and path that a given packet may take may not be 1346 known a priori, it is useful if MPLS echo requests can exercise all 1347 possible paths. This, while desirable, may not be practical, because 1348 the algorithms that a given LSR uses to distribute packets over 1349 alternative paths may be proprietary. 1351 To achieve some degree of coverage of alternate paths, there is a 1352 certain latitude in choosing the destination IP address and source 1353 UDP port for an MPLS echo request. This is clearly not sufficient; 1354 in the case of traceroute, more latitude is offered by means of the 1355 Multipath Information of the Downstream Mapping TLV. This is used as 1356 follows. An ingress LSR periodically sends an MPLS traceroute mes- 1357 sage to determine whether there are multipaths for a given LSP. If 1358 so, each hop will provide some information how each of its downstream 1359 paths can be exercised. The ingress can then send MPLS echo requests 1360 that exercise these paths. If several transit LSRs have ECMP, the 1361 ingress may attempt to compose these to exercise all possible paths. 1362 However, full coverage may not be possible. 1364 4.2. Testing LSPs That Are Used to Carry MPLS Payloads 1366 To detect certain LSP breakages, it may be necessary to encapsulate 1367 an MPLS echo request packet with at least one additional label when 1368 testing LSPs that are used to carry MPLS payloads (such as LSPs used 1369 to carry L2VPN and L3VPN traffic. For example, when testing LDP or 1370 RSVP-TE LSPs, just sending an MPLS echo request packet may not detect 1371 instances where the router immediately upstream of the destination of 1372 the LSP ping may forward the MPLS echo request successfully over an 1373 interface not configured to carry MPLS payloads because of the use of 1374 penultimate hop popping. Since the receiving router has no means to 1375 differentiate whether the IP packet was sent unlabeled or implicitly 1376 labeled, the addition of labels shimmed above the MPLS echo request 1377 (using the Nil FEC) will prevent a router from forwarding such a 1378 packet out unlabeled interfaces. 1380 4.3. Sending an MPLS Echo Request 1382 An MPLS echo request is a UDP packet. The IP header is set as fol- 1383 lows: the source IP address is a routable address of the sender; the 1384 destination IP address is a (randomly chosen) address from 127/8; the 1385 IP TTL is set to 1. The source UDP port is chosen by the sender; the 1386 destination UDP port is set to 3503 (assigned by IANA for MPLS echo 1387 requests). The Router Alert option MUST be set in the IP header. 1389 An MPlS Echo Request is sent with a label stack corresponding to the 1390 FEC stack being tested. Note that further labels could be applied 1391 if, for example, the normal route to the topmost FEC in the stack is 1392 via a Traffic Engineered Tunnel [RSVP-TE]. If all of the FECs in the 1393 stack correspond to Implicit Null Labels the MPLS echo request is 1394 considered unlabeled even if further labels will be applied in send- 1395 ing the packet. 1397 If the echo request is labeled, one MAY (depending on what is being 1398 pinged) set the TTL of the innermost label to 1, to prevent the ping 1399 request going farther than it should. Examples of where this SHOULD 1400 be done include pinging a VPN IPv4 or IPv6 prefix, an L2 VPN end 1401 point or a pseudowire. Preventing the ping request from going to far 1402 can also be accomplished by inserting a router alert label above this 1403 label; however, this may lead to the undesired side effect that MPLS 1404 echo requests take a different data path than actual data. For more 1405 information on how these mechanisms can be used for pseudowire con- 1406 nectivity verification, see [VCCV]. 1408 In "ping" mode (end-to-end connectivity check), the TTL in the outer- 1409 most label is set to 255. In "traceroute" mode (fault isolation 1410 mode), the TTL is set successively to 1, 2, .... 1412 The sender chooses a Sender's Handle, and a Sequence Number. When 1413 sending subsequent MPLS echo requests, the sender SHOULD increment 1414 the sequence number by 1. However, a sender MAY choose to send a 1415 group of echo requests with the same sequence number to improve the 1416 chance of arrival of at least one packet with that sequence number. 1418 The TimeStamp Sent is set to the time-of-day (in seconds and 1419 microseconds) that the echo request is sent. The TimeStamp Received 1420 is set to zero. 1422 An MPLS echo request MUST have a FEC Stack TLV. Also, the Reply Mode 1423 must be set to the desired reply mode; the Return Code and Subcode 1424 are set to zero. In the "traceroute" mode, the echo request SHOULD 1425 include a Downstream Mapping TLV. 1427 4.4. Receiving an MPLS Echo Request 1429 Sending An MPLS Echo Request to the control plane is triggered by 1430 one of the following packet processing exceptions: Router Alert 1431 Option, IP TTL expiration, MPLS TTL expiration, MPLS Router Alert 1432 Label, or the destination address in the 127/8 address range. The 1433 control plane further identifies it by UDP destination port 3503. 1435 For reporting purposes the bottom of stack is considered to be 1436 stack-depth of 1. This is to establish an absolute reference for 1437 the case where the actual stack may have more labels than there are 1438 FECs in the Target FEC Stack. 1440 Further, in all the error codes listed in this document a 1441 stack-depth of 0 means "no value specified". This allows 1442 compatibility with existing implementations which do not use the 1443 Return Subcode field. 1445 An LSR X that receives an MPLS Echo Request then processes it as 1446 follows. 1448 1. General packet sanity is verified. If the packet is not 1449 well-formed, LSR X SHOULD send an MPLS Echo Reply with the 1450 Return Code set to "Malformed echo request received" and the 1451 Subcode to zero. If there are any TLVs not marked as "Ignore" 1452 that LSR X does not understand, LSR X SHOULD send an MPLS "TLV 1453 not understood" (as appropriate), and the Subcode set to 1454 zero. In the latter case, the misunderstood TLVs (only) are 1455 included as sub-TLVs in an Errored TLVs TLV in the reply. The 1456 header fields Sender's Handle, Sequence Number, and Timestamp 1457 Sent are not examined, but are included in the MPLS Echo Reply 1458 message. 1460 The algorithm uses the following variables and identifiers: 1462 Interface-I: the interface on which the MPLS Echo Request was 1463 received. 1465 Stack-R: the label stack on the packet as it was 1466 received. 1468 Stack-D: the label stack carried in the Downstream 1469 Mapping TLV (not always present) 1471 Label-L: the label from the actual stack currently being 1472 examined. Requires no initialization. 1474 Label-stack-depth: the depth of label being verified. Initialized 1475 to the number of labels in the received label 1476 stack S. 1478 FEC-stack-depth: depth of the FEC in the Target FEC Stack that 1479 should be used to verify the current actual 1480 label. Requires no initialization. 1482 Best-return-code: contains the return code for the Echo Reply 1483 packet as currently best known. As algorithm 1484 progresses, this code may change depending on 1485 the results of further checks that it performs. 1487 Best-rtn-subcode: similar to Best-return-code, but for the Echo 1488 Reply Subcode. 1490 FEC-status: result value returned by the FEC Checking 1491 algorithm described in section 4.4.1. 1493 /* Save receive context information */ 1495 2. If the echo request is good, LSR X stores the interface over 1496 which the echo was received in Interface-I, and the label stack 1497 with which it came in Stack-R. 1499 /* The rest of the algorithm iterates over the labels in Stack-R, 1500 verifies validity of label values, reports associated label 1501 switching operations (for traceroute), verifies correspondence 1502 between the Stack-R and the Target FEC Stack description in the 1503 body of the Echo Request, and reports any errors. */ 1505 /* The algorithm iterates as follows. */ 1507 3. Label Validation: 1509 If Label-stack-depth is 0 { 1511 /* The LSR needs to report its being a tail-end for the LSP */ 1513 Set FEC-stack-depth to 1, set Label-L to 3 (Implicit Null). 1514 Set Best-return-code to 3 ("Replying router is an egress for 1515 the FEC at stack depth"), set Best-rtn-subcode to the 1516 value of FEC-stack-depth (1) and go to step 5 (Egress 1517 Processing). 1518 } 1520 /* This step assumes there's always an entry for well-known 1521 label values */ 1523 Set Label-L to the value extracted from Stack-R at depth 1524 Label-stack-depth. Lookup Label-L in the Incoming Label Map 1525 (ILM) to determine if the label has been allocated and an 1526 operation is associated with it. 1528 If there is no entry for L { 1530 /* Indicates a temporary or permanent label synchronization 1531 problem the LSR needs to report an error */ 1533 Set Best-return-code to 11 ("No label entry at stack-depth") 1534 and Best-rtn-subcode to Label-stack-depth. Go to step 7 1535 (Send Reply Packet). 1536 } 1537 Else { 1539 Retrieve the associated label operation from the 1540 corresponding NLFE and proceed to step 4 (Label Operation). 1541 } 1543 4. Label Operation Check 1545 If the label operation is "Pop and Continue Processing" { 1547 /* Includes Explicit Null and Router Alert label cases */ 1549 Iterate to the next label by decrementing Label-stack-depth 1550 and loop back to step 3 (Label Validation). 1551 } 1553 If the label operation is "Swap or Pop and Switch based on Popped 1554 Label" { 1556 Set Best-return-code to 8 ("Label switched at stack-depth") 1557 and Best-rtn-subcode to Label-stack-depth to report transit 1558 switching. 1560 If a Downstream Mapping TLV is present in the received Echo 1561 Request { 1563 If the IP address in the TLV is 127.0.0.1 or 0::1: { 1564 Set Best-return-code to 6 ("Upstream Interface Index 1565 Unknown"). An Interface and Label Stack TLV SHOULD be 1566 included in the reply and filled with Interface-I and 1567 Stack-R. 1568 } 1570 Else { 1572 Verify that the IP address, interface address and label 1573 stack in the Downstream Mapping TLV match Interface-I 1574 and Stack-R. If there is a mismatch, set 1575 Best-return-code to 5, "Downstream Mapping Mismatch". 1576 An Interface and Label Stack TLV SHOULD be included in 1577 the reply and filled in based on Interface-I and 1578 Stack-R. Go to step 7 (Send Reply Packet). 1579 } 1580 } 1582 For each available downstream ECMP path { 1583 Retrieve output interface from the NHLFE entry. 1585 /* Note: this return code is set even if Label-stack-depth 1586 is one */ 1588 If the output interface is not MPLS-enabled { 1590 set Best-return-code to Return Code 9, "Label switched 1591 but no MPLS forwarding at stack-depth" and set 1592 Best-rtn-subcode to Label-stack-depth and goto 1593 Send_Reply_Packet. 1594 } 1596 If a Downstream Mapping TLV is present { 1598 A Downstream mapping TLV SHOULD be included in the Echo 1599 Reply (see section 3.3) filled in with information about 1600 the current ECMP path. 1601 } 1602 } 1604 If no Downstream Mapping TLV is present, or the Downstream IP 1605 Address is set to the ALLROUTERS multicast address, 1606 Go to step 7 (Send Reply Packet). 1608 If the "Validate FEC Stack" flag is not set and the LSR is not 1609 configured to perform FEC checking by default, go to step 7 1610 (Send Reply Packet). 1612 /* Validate the Target FEC Stack in the received Echo Request. 1613 First determine FEC-stack-depth from the Downstream Mapping 1614 TLV. This is done by walking through Stack-D (the Downstream 1615 Labels) from the bottom, decrementing the number of labels 1616 for each non-Implicit Null label, while incrementing 1617 FEC-stack-depth for each label. If the Downstream Mapping TLV 1618 contains one or more Implicit Null labels, FEC-stack-depth 1619 may be greater than Label-stack-depth. To be consistent with 1620 the above stack-depths, the bottom is considered to entry 1. 1621 */ 1623 Set FEC-stack-depth to 0. Set i to Label-stack-depth. 1625 While (i > 0 ) do { 1626 ++FEC-stack-depth. 1627 if Stack-D[FEC-stack-depth] != 3 (Implicit Null) 1628 --i. 1629 } 1630 If the number of labels in the FEC stack is greater 1631 than or equal to FEC-stack-depth { 1633 Perform the FEC Checking procedure (see subsection 4.4.1 1634 below). 1636 If FEC-status is 2 set Best-return-code to 10 ("Mapping 1637 for this FEC is not the given label at stack-depth"). 1639 If the return code is 1 set Best-return-code to 1640 FEC-return-code and Best-rtn-subcode to FEC-stack-depth. 1641 } 1643 Go to step 7 (Send Reply Packet). 1644 } 1646 5. Egress Processing: 1648 /* These steps are performed by the LSR that identified itself 1649 as the tail-end LSR for an LSP. */ 1651 If received Echo Request contains no Downstream Mapping TLV, or 1652 the Downstream IP Address is set to 127.0.0.1 or 0::1: 1653 Go t0 step 6 (Egress FEC Validation). 1655 Verify that the IP address, interface address and label stack in 1656 the Downstream mapping TLV match Interface-I and Stack-R. If 1657 not, set Best-return-code to 5, "Downstream Mapping 1658 Mis-match". A Received Interface and Label Stack TLV SHOULD be 1659 created for the Echo Response packet. Go to step 7 (Send Reply 1660 Packet). 1662 6. Egress FEC Validation: 1664 /* This is a loop for all entries in the Target FEC Stack 1665 starting with FEC-stack-depth. */ 1667 Perform FEC checking by following the algorithm described in 1668 subsection 4.4.1 for Label-L and the FEC at FEC-stack-depth. 1670 Set Best-return-code to FEC-code and Best-rtn-subcode to the 1671 value in FEC-stack-depth. 1673 If FEC-status (the result of the check) is 1, 1674 Go to step 7 (Send Reply Packet). 1676 /* Iterate to the next FEC entry */ 1677 ++FEC-stack-depth. 1679 If FEC-stack-depth > the number of FECs in the FEC-stack, 1680 Go to step 7 (Send Reply Packet). 1682 If FEC-status is 0 { 1683 ++Label-stack-depth. 1684 If Label-stack-depth > the number of labels in Stack-R, 1685 Go to step 7 (Send Reply Packet). 1687 Label-L = extracted label from Stack-R at depth 1688 Label-stack-depth. 1689 Loop back to step 6 (Egress FEC Validation). 1690 } 1692 7. Send Reply Packet: 1694 Send an MPLS Echo Reply with a Return Code of Best-return-code, 1695 and a Return Subcode of Best-rtn-subcode. Include any TLVs 1696 created during the above process. The procedures for sending 1697 the Echo Reply are found in subsection 4.4.1. 1699 4.4.1. FEC Validation 1701 /* This subsection describes validation of a FEC entry within the 1702 Target FEC Stack and accepts a FEC, Label-L and Interface-I. 1703 The algorithm performs the following steps. */ 1705 1. Two return values, FEC-status and FEC-return-code, are initialized 1706 to 0. 1708 2. If the FEC is the Nil FEC { 1709 If Label-L is either Explicit_Null or Router_Alert, return. 1711 Else { 1712 Set FEC-return-code to 10 ("Mapping for this FEC is not 1713 the given label at stack-depth"). 1714 Set FEC-status to 1 1715 Return. 1716 } 1717 } 1719 3. Check the FEC label mapping that describes how traffic received 1720 on the LSP is further switched or which application it is 1721 associated with. If no mapping exists, set FEC-return-code to 1722 Return 4, "Replying router has no mapping for the FEC at 1723 stack-depth". Set FEC-status to 1. Return. 1725 4. If the label mapping for FEC is Implicit Null, set FEC-status to 1726 2 and proceed to step 5. Otherwise, if the label mapping for FEC 1727 is Label-L, proceed to step 5. Otherwise, set FEC-return-code to 1728 10 ("Mapping for this FEC is not the given label at 1729 stack-depth"), set FEC-status to 1 and return. 1731 5. This is a protocol check. Check what protocol would be used to 1732 advertise FEC. If it can be determined that no protocol 1733 associated with Interface-I would have advertised a FEC of that 1734 FEC-Type, set FEC-return-code to 12 ("Protocol not associated 1735 with interface at FEC stack-depth"). Set FEC-status to 1. 1737 6. Return. 1739 4.5. Sending an MPLS Echo Reply 1741 An MPLS echo reply is a UDP packet. It MUST ONLY be sent in response 1742 to an MPLS echo request. The source IP address is a routable address 1743 of the replier; the source port is the well-known UDP port for LSP 1744 ping. The destination IP address and UDP port are copied from the 1745 source IP address and UDP port of the echo request. The IP TTL is 1746 set to 255. If the Reply Mode in the echo request is "Reply via an 1747 IPv4 UDP packet with Router Alert", then the IP header MUST contain 1748 the Router Alert IP option. If the reply is sent over an LSP, the 1749 topmost label MUST in this case be the Router Alert label (1) (see 1750 [LABEL-STACK]). 1752 The format of the echo reply is the same as the echo request. The 1753 Sender's Handle, the Sequence Number and TimeStamp Sent are copied 1754 from the echo request; the TimeStamp Received is set to the time-of- 1755 day that the echo request is received (note that this information is 1756 most useful if the time-of-day clocks on the requester and the 1757 replier are synchronized). The FEC Stack TLV from the echo request 1758 MAY be copied to the reply. 1760 The replier MUST fill in the Return Code and Subcode, as determined 1761 in the previous subsection. 1763 If the echo request contains a Pad TLV, the replier MUST interpret 1764 the first octet for instructions regarding how to reply. 1766 If the replying router is the destination of the FEC, then Downstream 1767 Mapping TLVs SHOULD NOT be included in the echo reply. 1769 If the echo request contains a Downstream Mapping TLV, and the reply- 1770 ing router is not the destination of the FEC, the replier SHOULD com- 1771 pute its downstream routers and corresponding labels for the incoming 1772 label, and add Downstream Mapping TLVs for each one to the echo reply 1773 it sends back. 1775 If the Downstream Mapping TLV contains multipath information requir- 1776 ing more processing than the receiving router is willing to perform, 1777 the responding router MAY choose to respond with only a subset of 1778 multipaths contained in the echo request Downstream Map. (Note: The 1779 originator of the echo request MAY send another echo request with the 1780 multipath information that was not included in the reply.) 1782 Except in the case of Reply Mode 4, "Reply via application level con- 1783 trol channel", Echo Replies are always sent in the context of the 1784 IP/MPLS network. 1786 4.6. Receiving an MPLS Echo Reply 1788 An LSR X should only receive an MPLS echo reply in response to an 1789 MPLS echo request that it sent. Thus, on receipt of an MPLS echo 1790 reply, X should parse the packet to assure that it is well-formed, 1791 then attempt to match up the echo reply with an echo request that it 1792 had previously sent, using the destination UDP port and the Sender's 1793 Handle. If no match is found, then X jettisons the echo reply; oth- 1794 erwise, it checks the Sequence Number to see if it matches. 1796 If the echo reply contains Downstream Mappings, and X wishes to 1797 traceroute further, it SHOULD copy the Downstream Mapping(s) into its 1798 next echo request(s) (with TTL incremented by one). 1800 4.7. Issue with VPN IPv4 and IPv6 Prefixes 1802 Typically, a LSP ping for a VPN IPv4 prefix or VPN IPv6 prefix is 1803 sent with a label stack of depth greater than 1, with the innermost 1804 label having a TTL of 1. This is to terminate the ping at the egress 1805 PE, before it gets sent to the customer device. However, under cer- 1806 tain circumstances, the label stack can shrink to a single label 1807 before the ping hits the egress PE; this will result in the ping ter- 1808 minating prematurely. One such scenario is a multi-AS Carrier's Car- 1809 rier VPN. 1811 To get around this problem, one approach is for the LSR that receives 1812 such a ping to realize that the ping terminated prematurely, and send 1813 back error code 13. In that case, the initiating LSR can retry the 1814 ping after incrementing the TTL on the VPN label. In this fashion, 1815 the ingress LSR will sequentially try TTL values until it finds one 1816 that allows the VPN ping to reach the egress PE. 1818 4.8. Non-compliant Routers 1820 If the egress for the FEC Stack being pinged does not support MPLS 1821 ping, then no reply will be sent, resulting in possible "false nega- 1822 tives". If in "traceroute" mode, a transit LSR does not support LSP 1823 ping, then no reply will be forthcoming from that LSR for some TTL, 1824 say n. The LSR originating the echo request SHOULD try sending the 1825 echo request with TTL=n+1, n+2, ..., n+k to probe LSRs further down 1826 the path. In such a case, the echo request for TTL > n SHOULD be 1827 sent with Downstream Mapping TLV "Downstream IP Address" field set to 1828 the ALLROUTERs multicast address until a reply is received with a 1829 Downstream Mapping TLV. The Label Stack MAY be omitted from the 1830 Downstream Mapping TLV. Further the "Validate FEC Stack" flag SHOULD 1831 NOT be set until an echo reply packet with a Downstream Mapping TLV 1832 is received. 1834 5. References 1836 Normative References 1838 [BGP] Rekhter, Y. and T. Li, "A Border Gateway Protocol 4 1839 (BGP-4)", RFC 1771, March 1995. 1841 [IANA] Narten, T. and H. Alvestrand, "Guidelines for IANA 1842 Considerations", BCP 26, RFC 2434, October 1998. 1844 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 1845 Requirement Levels", BCP 14, RFC 2119, March 1997. 1847 [LABEL-STACK] Rosen, E., et al, "MPLS Label Stack Encoding", 1848 RFC 3032, January 2001. 1850 [NTP] Mills, D., "Simple Network Time Protocol (SNTP) 1851 Version 4 for IPv4, IPv6 and OSI", RFC 2030, October 1852 1996. 1854 [RFC1122] Braden, R., "Requirements for Internet Hosts - 1855 Communication Layers", STD 3, RFC 1122, October 1989. 1857 [RFC1812] Almquist, P. and F. Kastenholz, "Towards Requirements 1858 for IP Routers", RFC 1716, November 1994. 1860 [RFC4026] Andersson, L. and T. Madsen, "Provider Provisioned 1861 Virtual Private Network (VPN) Terminology", RFC 4026, 1862 March 2005. 1864 Informative References 1866 [BGP-LABEL] Rekhter, Y. and E. Rosen, "Carrying Label Information 1867 in BGP-4", RFC 3107, May 2001. 1869 [ICMP] Postel, J., "Internet Control Message Protocol", 1870 RFC 792. 1872 [LDP] Andersson, L., et al, "LDP Specification", RFC 3036, 1873 January 2001. 1875 [MPLS-L3-VPN] Rekhter, Y. & Rosen, E., "BGP/MPLS IP VPNs", 1876 draft-ietf-l3vpn-rfc2547bis-03.txt, work-in-progress. 1878 [PW-CONTROL] Martini, L. et al., "Pseudowire Setup and Maintenance 1879 using the Label Distribution Protocol", 1880 draft-ietf-pwe3-control-protocol-17.txt, 1881 work-in-progress. 1883 [RSVP-TE] Awduche, D., et al., "RSVP-TE: Extensions to RSVP for 1884 LSP Tunnels", RFC 3209, December 2001. 1886 [VCCV] Nadeau, T. & Aggarwal, R., "Pseudo Wire Virtual 1887 Circuit Connectivity Verification (VCCV), 1888 draft-ietf-pwe3-vccv-07.txt, August 2005, 1889 work-in-progress. 1891 [VPLS] Kompella, K. and Rekhter, Y., "Virtual Private LAN 1892 Service", draft-ietf-l2vpn-vpls-bgp-05, 1893 work-in-progress. 1895 6. Security Considerations 1897 Overall, the security needs for LSP Ping are are similar to those of 1898 ICMP Ping. 1900 There are at least three approaches to attacking LSRs using the mech- 1901 anisms defined here. One is a Denial of Service attack, by sending 1902 MPLS echo requests/replies to LSRs and thereby increasing their work- 1903 load. The second is obfuscating the state of the MPLS data plane 1904 liveness by spoofing, hijacking, replaying or otherwise tampering 1905 with MPLS echo requests and replies. The third is an unauthorized 1906 source using an LSP Ping to obtain information about the network. 1908 To avoid potential Denial of Service attacks, it is RECOMMENDED that 1909 implementations regulate the LSP ping traffic going to the control 1910 plane. A rate limiter SHOULD be applied to the well-known UDP port 1911 defined below. 1913 Unsophisticated replay and spoofing attacks involving faking or 1914 replaying MPLS Echo Reply Messages are unlikely to be effective. 1915 These replies would have to match the the Sender's Handle and 1916 Sequence Number of an outstanding MPLS Echo Request Message. A non- 1917 matching replay would be discarded as the sequence has moved on, thus 1918 a spoof has only a small window of opportunity. However to provide a 1919 stronger defence, an implementation MAY also validate the TimeStamp 1920 Sent by requiring and exact match on this field. 1922 To protect against unauthorized sources using MPLS Echo Request mes- 1923 sages to obtain network information, it is RECOMMENDED that implemen- 1924 tations provides a means of checking the source addresses of MPLS 1925 Echo Request messages against an access list before accepting the 1926 message. 1928 It is not clear how to prevent hijacking (non-delivery) of echo 1929 requests or replies; however, if these messages are indeed hijacked, 1930 LSP ping will report that the data plane isn't working as it should. 1932 It doesn't seem vital (at this point) to secure the data carried in 1933 MPLS echo requests and replies, although knowledge of the state of 1934 the MPLS data plane may be considered confidential by some. Imple- 1935 mentations SHOULD however provide a means of filtering the addresses 1936 to which Echo Reply messages may be sent. 1938 Although this document makes special use of 127/8 address, these are 1939 used only in conjunction with the UDP port 3503. Further these pack- 1940 ets are only processed by routers. All other hosts MUST treat all 1941 packets with a destination address in the range 127/8 in accordance 1942 to RFC1122. Any packet received by a router with a destination 1943 address in the range 127/8 without a destination UDP port of 3503 1944 MUST be treated in accordance to RFC1812. 1946 7. IANA Considerations 1948 The TCP and UDP port number 3503 has been allocated by IANA for LSP 1949 echo requests and replies. 1951 The following sections detail the new name spaces to be managed by 1952 IANA. For each of these name spaces, the space is divided into 1953 assignment ranges; the following terms are used in describing the 1954 procedures by which IANA allocates values: "Standards Action" (as 1955 defined in [IANA]); "Specification Required" and "Vendor Private 1956 Use". 1958 Values from "Specification Required" ranges MUST be registered with 1959 IANA. The request MUST be made via an Experimental RFC that 1960 describes the format and procedures for using the code point; the 1961 actual assignment is made during the IANA actions for the RFC. 1963 Values from "Vendor Private" ranges MUST NOT be registered with IANA; 1964 however, the message MUST contain an enterprise code as registered 1965 with the IANA SMI Private Network Management Private Enterprise Num- 1966 bers. For each name space that has a Vendor Private range, it must 1967 be specified where exactly the SMI Private Enterprise Number resides; 1968 see below for examples. In this way, several enterprises (vendors) 1969 can use the same code point without fear of collision. 1971 7.1. Message Types, Reply Modes, Return Codes 1973 It is requested that IANA maintain registries for Message Types, 1974 Reply Modes, and Return Codes. Each of these can take values in the 1975 range 0-255. Assignments in the range 0-191 are via Standards 1976 Action; assignments in the range 192-251 are made via "Specification 1977 Required"; values in the range 252-255 are for Vendor Private Use, 1978 and MUST NOT be allocated. 1980 If any of these fields fall in the Vendor Private range, a top-level 1981 Vendor Enterprise Number TLV MUST be present in the message. 1983 Message Types defined in this document are: 1985 Value Meaning 1986 ----- ------- 1987 1 MPLS Echo Request 1988 2 MPLS Echo Reply 1990 Reply Modes defined in this document are: 1992 Value Meaning 1993 ----- ------- 1994 1 Do not reply 1995 2 Reply via an IPv4/IPv6 UDP packet 1996 3 Reply via an IPv4/IPv6 UDP packet with Router Alert 1997 4 Reply via application level control channel 1999 Return Codes defined in this document are listed in section 3.1. 2001 7.2. TLVs 2003 It is requested that IANA maintain a registry for the Type field of 2004 top-level TLVs as well as for any associated sub-TLVs. Note the 2005 meaning of a sub-TLV is scoped by the TLV. The number spaces for the 2006 sub-TLVs of various TLVs are independent. 2008 The valid range for TLVs and sub-TLVs is 0-65535. Assignments in the 2009 range 0-16383 and 32768-49161 are made via Standards Action as 2010 defined in [IANA]; assignments in the range 16384-31743 and 2011 49162-64511 are made via "Specification Required" as defined above; 2012 values in the range 31744-32767 and 64512-65535 are for Vendor Pri- 2013 vate Use, and MUST NOT be allocated. 2015 If a TLV or sub-TLV has a Type that falls in the range for Vendor 2016 Private Use, the Length MUST be at least 4, and the first four octets 2017 MUST be that vendor's SMI Private Enterprise Number, in network octet 2018 order. The rest of the Value field is private to the vendor. 2020 TLVs and sub-TLVs defined in this document are: 2022 Type Sub-Type Value Field 2023 ---- -------- ----------- 2024 1 Target FEC Stack 2025 1 LDP IPv4 prefix 2026 2 LDP IPv6 prefix 2027 3 RSVP IPv4 LSP 2028 4 RSVP IPv6 LSP 2029 5 Not Assigned 2030 6 VPN IPv4 prefix 2031 7 VPN IPv6 prefix 2032 8 L2 VPN endpoint 2033 9 "FEC 128" Pseudowire (Deprecated) 2034 10 "FEC 128" Pseudowire 2035 11 "FEC 129" Pseudowire 2036 12 BGP labeled IPv4 prefix 2037 13 BGP labeled IPv6 prefix 2038 14 Generic IPv4 prefix 2039 15 Generic IPv6 prefix 2040 16 Nil FEC 2041 2 Downstream Mapping 2042 3 Pad 2043 4 Not Assigned 2044 5 Vendor Enterprise Number 2045 6 Not Assigned 2046 7 Interface and Label Stack 2047 8 Not Assigned 2048 9 Errored TLVs 2049 Any value The TLV not understood 2050 10 Reply TOS Byte 2052 8. Acknowledgments 2054 This document is the outcome of many discussions among many people, 2055 that include Manoj Leelanivas, Paul Traina, Yakov Rekhter, Der-Hwa 2056 Gan, Brook Bailey, Eric Rosen, Ina Minei, Shivani Aggarwal and Vanson 2057 Lim. 2059 The description of the Multipath Information sub-field of the Down- 2060 stream Mapping TLV was adapted from text suggested by Curtis Vil- 2061 lamizar. 2063 Authors' Addresses 2065 Kireeti Kompella 2066 Juniper Networks 2067 1194 N.Mathilda Ave 2068 Sunnyvale, CA 94089 2069 Email: kireeti@juniper.net 2071 George Swallow 2072 Cisco Systems 2073 1414 Massachusetts Ave, 2074 Boxborough, MA 01719 2075 Phone: +1 978 936 1398 2076 Email: swallow@cisco.com 2078 Copyright Notice 2080 Copyright (C) The Internet Society (2005). This document is subject 2081 to the rights, licenses and restrictions contained in BCP 78, and 2082 except as set forth therein, the authors retain all their rights. 2084 Expiration Date 2086 June 2006 2088 Disclaimer of Validity 2090 This document and the information contained herein are provided on an 2091 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2092 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 2093 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 2094 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 2095 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2096 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2098 The IETF takes no position regarding the validity or scope of any 2099 Intellectual Property Rights or other rights that might be claimed to 2100 pertain to the implementation or use of the technology described in 2101 this document or the extent to which any license under such rights 2102 might or might not be available; nor does it represent that it has 2103 made any independent effort to identify any such rights. Information 2104 on the procedures with respect to rights in RFC documents can be 2105 found in BCP 78 and BCP 79. 2107 Copies of IPR disclosures made to the IETF Secretariat and any 2108 assurances of licenses to be made available, or the result of an 2109 attempt made to obtain a general license or permission for the use of 2110 such proprietary rights by implementers or users of this 2111 specification can be obtained from the IETF on-line IPR repository at 2112 http://www.ietf.org/ipr. 2114 The IETF invites any interested party to bring to its attention any 2115 copyrights, patents or patent applications, or other proprietary 2116 rights that may cover technology that may be required to implement 2117 this standard. Please address the information to the IETF at 2118 ietf-ipr@ietf.org.