RFC 5036
LDP Specification
RFC 5036: LDP Specification โจ
okay bestie, let's get into it ๐ฆ this is RFC 5036, the LDP Specification, and it's a Standards Track doc from October 2007 ๐ It came from the Network Working Group and it obsoletes RFC 3036 ๐
The authors are L. Andersson (Ed.) from Acreo AB, I. Minei (Ed.) from Juniper Networks, and B. Thomas (Ed.) from Cisco Systems, Inc. ๐ธ Three editors, three companies, one protocol, iconic teamwork ๐ซถ
Status of This Memo ๐
so this doc is an Internet standards track protocol for the Internet community ๐ It's also asking everyone to chat about it and send ideas for making it better, so bring your takes ๐ If you want to know where it stands officially, check the current edition of "Internet Official Protocol Standards" (STD 1) โจ And the best part: distribution of this memo is unlimited ๐ share it with everyone, no cap
Abstract ๐ซง
okay the vibe here is MPLS, and the architecture for that is described in RFC 3031 ๐ The big core idea is that two Label Switching Routers (LSRs) must agree on what the labels mean when they're forwarding traffic between and through each other ๐ฅ That shared understanding doesn't just happen by magic, it comes from a set of procedures called a label distribution protocol, where one LSR tells another about the label bindings it has made ๐ง
This document defines one of those protocols, called LDP (short for Label Distribution Protocol) โจ LSRs use LDP to pass out labels so MPLS forwarding works along the paths that normal routing already picks ๐ It's giving teamwork, it's giving coordination, it's giving main character energy ๐
More parts are coming, so stay tuned, bestie ๐ฆ๐
Table of Contents โจ
Okay bestie, here's the whole map of the spec so you know where everything lives ๐บ๏ธ๐
1. LDP Overview ....................................................5
1.1. LDP Peers ..................................................6
1.2. LDP Message Exchange .......................................6
1.3. LDP Message Structure ......................................7
1.4. LDP Error Handling .........................................7
1.5. LDP Extensibility and Future Compatibility .................7
1.6. Specification Language .....................................7
2. LDP Operation ...................................................8
2.1. FECs .......................................................8
2.2. Label Spaces, Identifiers, Sessions, and Transport .........9
2.2.1. Label Spaces ........................................9
2.2.2. LDP Identifiers .....................................9
2.2.3. LDP Sessions .......................................10
2.2.4. LDP Transport ......................................10
2.3. LDP Sessions between Non-Directly Connected LSRs ..........10
2.4. LDP Discovery .............................................11
2.4.1. Basic Discovery Mechanism ..........................11
2.4.2. Extended Discovery Mechanism .......................11
2.5. Establishing and Maintaining LDP Sessions .................12
2.5.1. LDP Session Establishment ..........................12
2.5.2. Transport Connection Establishment .................12
2.5.3. Session Initialization .............................14
2.5.4. Initialization State Machine .......................16
2.5.5. Maintaining Hello Adjacencies ......................19
2.5.6. Maintaining LDP Sessions ...........................19
2.6. Label Distribution and Management .........................20
2.6.1. Label Distribution Control Mode ....................20
2.6.1.1. Independent Label Distribution Control ....20
2.6.1.2. Ordered Label Distribution Control ........20
2.6.2. Label Retention Mode ...............................21
2.6.2.1. Conservative Label Retention Mode .........21
2.6.2.2. Liberal Label Retention Mode ..............21
2.6.3. Label Advertisement Mode ...........................22
2.7. LDP Identifiers and Next Hop Addresses ....................22
2.8. Loop Detection ............................................23
2.8.1. Label Request Message ..............................23
2.8.2. Label Mapping Message ..............................25
2.8.3. Discussion .........................................26
2.9. Authenticity and Integrity of LDP Messages ................27
2.9.1. TCP MD5 Signature Option ...........................27
2.9.2. LDP Use of TCP MD5 Signature Option ................29
2.10. Label Distribution for Explicitly Routed LSPs ............29
3. Protocol Specification .........................................30
3.1. LDP PDUs ..................................................30
3.2. LDP Procedures ............................................31
3.3. Type-Length-Value Encoding ................................31
3.4. TLV Encodings for Commonly Used Parameters ................33
3.4.1. FEC TLV ............................................33
3.4.1.1. FEC Procedures ............................35
3.4.2. Label TLVs .........................................35
3.4.2.1. Generic Label TLV .........................36
3.4.2.2. ATM Label TLV .............................36
3.4.2.3. Frame Relay Label TLV .....................37
3.4.3. Address List TLV ...................................38
3.4.4. Hop Count TLV ......................................39
3.4.4.1. Hop Count Procedures ......................39
3.4.5. Path Vector TLV ....................................41
3.4.5.1. Path Vector Procedures ....................41
3.4.5.1.1. Label Request Path Vector ......41
3.4.5.1.2. Label Mapping Path Vector ......42
3.4.6. Status TLV .........................................43
3.5. LDP Messages ..............................................44
3.5.1. Notification Message ...............................46
3.5.1.1. Notification Message Procedures ...........48
3.5.1.2. Events Signaled by Notification Messages ..48
3.5.1.2.1. Malformed PDU or Message .......48
3.5.1.2.2. Unknown or Malformed TLV .......49
3.5.1.2.3. Session KeepAlive Timer
Expiration .....................50
3.5.1.2.4. Unilateral Session Shutdown ....50
3.5.1.2.5. Initialization Message Events ..50
3.5.1.2.6. Events Resulting from
Other Messages .................50
3.5.1.2.7. Internal Errors ................51
3.5.1.2.8. Miscellaneous Events ...........51
3.5.2. Hello Message ......................................51
3.5.2.1. Hello Message Procedures ..................53
3.5.3. Initialization Message .............................54
3.5.3.1. Initialization Message Procedures .........63
3.5.4. KeepAlive Message ..................................63
3.5.4.1. KeepAlive Message Procedures ..............63
3.5.5. Address Message ....................................64
3.5.5.1. Address Message Procedures ................64
3.5.6. Address Withdraw Message ...........................65
3.5.6.1. Address Withdraw Message Procedures .......66
3.5.7. Label Mapping Message ..............................66
3.5.7.1. Label Mapping Message Procedures ..........67
3.5.7.1.1. Independent Control Mapping ....67
3.5.7.1.2. Ordered Control Mapping ........68
3.5.7.1.3. Downstream on Demand
Label Advertisement ............68
3.5.7.1.4. Downstream Unsolicited
Label Advertisement ............69
3.5.8. Label Request Message ..............................70
3.5.8.1. Label Request Message Procedures ..........71
3.5.9. Label Abort Request Message ........................72
3.5.9.1. Label Abort Request Message Procedures ....73
3.5.10. Label Withdraw Message ............................74
3.5.10.1. Label Withdraw Message Procedures ........75
3.5.11. Label Release Message .............................76
3.5.11.1. Label Release Message Procedures .........77
3.6. Messages and TLVs for Extensibility .......................78
3.6.1. LDP Vendor-Private Extensions ......................78
3.6.1.1. LDP Vendor-Private TLVs ...................78
3.6.1.2. LDP Vendor-Private Messages ...............80
3.6.2. LDP Experimental Extensions ........................81
3.7. Message Summary ...........................................81
3.8. TLV Summary ...............................................82
3.9. Status Code Summary .......................................83
3.10. Well-Known Numbers .......................................84
3.10.1. UDP and TCP Ports .................................84
3.10.2. Implicit NULL Label ...............................84
4. IANA Considerations ............................................84
4.1. Message Type Name Space ...................................84
4.2. TLV Type Name Space .......................................85
4.3. FEC Type Name Space .......................................85
4.4. Status Code Name Space ....................................86
4.5. Experiment ID Name Space ..................................86
5. Security Considerations ........................................86
5.1. Spoofing ..................................................86
5.2. Privacy ...................................................87
5.3. Denial of Service .........................................88
6. Areas for Future Study .........................................89
7. Changes from RFC 3036 ..........................................90
8. Acknowledgments ................................................93
9. References .....................................................93
9.1. Normative References ......................................93
9.2. Informative References ....................................94
Appendix A. LDP Label Distribution Procedures ....................95
A.1. Handling Label Distribution Events .......................97
A.1.1. Receive Label Request .............................98
A.1.2. Receive Label Mapping ...........................101
A.1.3. Receive Label Abort Request .....................107
A.1.4. Receive Label Release ...........................109
A.1.5. Receive Label Withdraw ..........................111
A.1.6. Recognize New FEC ...............................113
A.1.7. Detect Change in FEC Next Hop ...................115
A.1.8. Receive Notification / Label Request Aborted ....118
A.1.9. Receive Notification / No Label Resources .......119
A.1.10. Receive Notification / No Route ................119
A.1.11. Receive Notification / Loop Detected ...........120
A.1.12. Receive Notification / Label Resources Available 121
A.1.13. Detect Local Label Resources Have Become
Available ......................................122
A.1.14. LSR Decides to No Longer Label Switch a FEC ....123
A.1.15. Timeout of Deferred Label Request ..............123
A.2. Common Label Distribution Procedures ....................124
A.2.1. Send_Label ......................................124
A.2.2. Send_Label_Request ..............................125
A.2.3. Send_Label_Withdraw .............................127
A.2.4. Send_Notification ...............................127
A.2.5. Send_Message ....................................128
A.2.6. Check_Received_Attributes .......................128
A.2.7. Prepare_Label_Request_Attributes ................129
A.2.8. Prepare_Label_Mapping_Attributes ................131
1. LDP Overview โจ
okay so the MPLS architecture [RFC3031] defines a label distribution protocol as a set of procedures that lets one Label Switched Router (LSR) tell another what the labels used to forward traffic between and through them mean ๐
The MPLS architecture does not assume a single label distribution protocol. ๐ Plenty of different ones are being standardized right now. Some existing protocols got extended so label distribution can ride along on them, and some brand new protocols were made for the sole purpose of distributing labels ๐ง The architecture also talks through some of the things to consider when picking a label distribution protocol for a specific MPLS application, like Traffic Engineering [RFC2702] โจ
The Label Distribution Protocol (LDP) is the protocol defined for distributing labels. It was first published as RFC 3036 in January 2001. ๐ธ The MPLS Working Group of the IETF produced it, and it was jointly authored by Loa Andersson, Paul Doolan, Nancy Feldman, Andre Fredette, and Bob Thomas.
LDP is literally the set of procedures and messages that LSRs use to set up Label Switched Paths (LSPs) through a network, by mapping network-layer routing information directly onto data-link layer switched paths ๐ฆ An LSP can end at a directly attached neighbor (kind of like IP hop-by-hop forwarding), or it can end at a network egress node, which lets switching happen through all the intermediary nodes in between ๐ฅ
LDP links a Forwarding Equivalence Class (FEC) [RFC3031] to every LSP it creates. The FEC tied to an LSP says which packets get "mapped" onto that LSP ๐ LSPs get stretched across a network because each LSR "splices" the incoming labels for a FEC onto the outgoing label assigned to the next hop for that FEC ๐ซถ
More info on where LDP is applicable can be found in [RFC3037] ๐
This document assumes (but does not require) that you're familiar with the MPLS architecture [RFC3031] ๐ Also, [RFC3031] has a glossary of MPLS terminology, things like ingress, label switched path, and so on, so go peek at that if you need it ๐
1.1. LDP Peers
Two LSRs that use LDP to exchange label/FEC mapping information are called "LDP Peers" with respect to that information, and we say there's an "LDP Session" between them ๐ A single LDP session lets each peer learn the other's label mappings, so the protocol is bidirectional โจ
1.2. LDP Message Exchange
There are four categories of LDP messages ๐
- Discovery messages, used to announce and maintain the presence of an LSR in a network.
- Session messages, used to establish, maintain, and terminate sessions between LDP peers.
- Advertisement messages, used to create, change, and delete label mappings for FECs.
- Notification messages, used to provide advisory information and to signal error information.
Discovery messages are how LSRs show they exist in a network ๐ฃ They send a Hello message periodically, and it goes out as a UDP packet to the LDP port at the 'all routers on this subnet' group multicast address ๐ When an LSR wants a session with another LSR it found through that Hello message, it uses the LDP initialization procedure over TCP transport ๐ฆ Once that initialization finishes successfully, the two LSRs are LDP peers and they're allowed to exchange advertisement messages ๐
Deciding when to request a label or advertise a label mapping to a peer is mostly a local decision each LSR makes for itself ๐ In general, an LSR requests a label mapping from a neighboring LSR when it needs one, and it advertises a label mapping to a neighboring LSR when it wants that neighbor to use a label โจ
Correct LDP operation requires reliable and in-order delivery of messages ๐ญ To make that happen, LDP uses the TCP transport for Session, Advertisement, and Notification messages. That means everything except the UDP-based discovery mechanism ๐ซถ
1.3. LDP Message Structure
Every LDP message has the same basic structure, which uses a Type-Length-Value (TLV) encoding scheme ๐ธ (see Section "Type-Length-Value Encoding"). The Value part of a TLV-encoded object, or TLV for short, can itself contain one or more TLVs ๐ง
1.4. LDP Error Handling
LDP errors and other events of interest get signaled to an LDP peer through Notification messages ๐จ
There are two kinds of LDP Notification messages:
- Error Notifications, used to signal fatal errors. If an LSR gets an Error Notification from a peer for an LDP session, it terminates that session by closing the TCP transport connection for the session and discarding all label mappings it learned through the session ๐
- Advisory Notifications, used to pass on LSR information about the LDP session or the status of some previous message received from the peer ๐
1.5. LDP Extensibility and Future Compatibility
Functionality may be added to LDP in the future ๐ฎ It's likely that future functionality will use new messages and object types (TLVs). Sometimes you'll want to run those new messages and TLVs inside a network that has older implementations which don't recognize them ๐ฅน It isn't possible to make every future enhancement backwards compatible, but a little planning up front can make new capabilities much easier to roll out ๐ For that reason, this specification defines rules for handling unknown message types and unknown TLVs โจ
1.6. Specification Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] ๐
2. LDP Operation ๐
2.1. FECs
It's really important to precisely specify which packets may be mapped to each LSP ๐ That's done by giving each LSP a FEC specification. The FEC identifies the set of IP packets that may be mapped to that LSP ๐
Each FEC is specified as a set of one or more FEC elements. Each FEC element identifies a set of packets that may be mapped to the corresponding LSP. When multiple FEC elements share an LSP, that LSP gets terminated at (or before) the node where those FEC elements can no longer share the same path ๐ฆ
This specification defines a single type of FEC element, the "Address Prefix FEC element" ๐ It's an address prefix of any length from 0 to a full address, inclusive โจ
Other specifications may define additional FEC elements as needed ๐ง
For the rest of this section, we'll go over the rules for mapping packets to LSPs that were set up using an Address Prefix FEC element ๐
We say a particular address "matches" a particular address prefix if and only if that address begins with that prefix. We also say a particular packet matches a particular LSP if and only if that LSP has an Address Prefix FEC element that matches the packet's destination address. For a particular packet and a particular LSP, any Address Prefix FEC element that matches the packet is called the "matching prefix" ๐ซถ
The procedure for mapping a particular packet to a particular LSP uses the following rules. Each rule gets applied in turn until the packet can be mapped to an LSP ๐ฅ
- If a packet matches exactly one LSP, the packet is mapped to that LSP.
- If a packet matches multiple LSPs, it is mapped to the LSP whose matching prefix is the longest. If there is no one LSP whose matching prefix is longest, the packet is mapped to one from the set of LSPs whose matching prefix is longer than the others. The procedure for selecting one of those LSPs is beyond the scope of this document.
- If it is known that a packet must traverse a particular egress router, and there is an LSP that has an Address Prefix FEC element that is a /32 address of that router, then the packet is mapped to that LSP. The procedure for obtaining this knowledge is beyond the scope of this document.
The procedure for figuring out that a packet must traverse a particular egress router is beyond the scope of this document ๐ (As an example, if you're running a link state routing algorithm, it may be possible to get this information from the link state data base. As another example, if you're running BGP, it may be possible to get this information from the BGP next hop attribute of the packet's route.) ๐ธ
2.2. Label Spaces, Identifiers, Sessions, and Transport
2.2.1. Label Spaces
The notion of "label space" is super useful for talking about how labels get assigned and distributed ๐ There are two types of label spaces:
- Per interface label space. Interface-specific incoming labels are used for interfaces that use interface resources for labels. An example is a label-controlled ATM interface that uses VCIs (Virtual Channel Identifiers) as labels, or a Frame Relay interface that uses DLCIs (Data Link Connection Identifiers) as labels ๐ฆ
Note that a per interface label space only makes sense when the LDP peers are "directly connected" over an interface, and the label is only going to be used for traffic sent over that interface ๐
- Per platform label space. Platform-wide incoming labels are used for interfaces that can share the same labels ๐
2.2.2. LDP Identifiers
An LDP Identifier is a six octet quantity used to identify an LSR label space โจ The first four octets identify the LSR and must be a globally unique value, such as a 32-bit router Id assigned to the LSR ๐ The last two octets identify a specific label space within the LSR. The last two octets of LDP Identifiers for platform-wide label spaces are always both zero ๐ง This document uses the following print representation for LDP Identifiers:
<LSR Id> : <label space id>
e.g., lsr171:0, lsr19:2.
Note that an LSR that manages and advertises multiple label spaces uses a different LDP Identifier for each one ๐
An LSR ends up needing to advertise more than one label space to a peer, and therefore use more than one LDP Identifier, when it has two links to the peer and both are ATM (and use per interface labels) ๐ซถ Another situation is when the LSR has two links to the peer, where one is ethernet (and uses per platform labels) and the other is ATM ๐ฅ
2.2.3. LDP Sessions
LDP sessions exist between LSRs to support label exchange between them ๐
When an LSR uses LDP to advertise more than one label space to another LSR, it uses a separate LDP session for each label space ๐
2.2.4. LDP Transport
LDP uses TCP as a reliable transport for sessions ๐ธ
When multiple LDP sessions are required between two LSRs, there is one TCP session for each LDP session ๐
2.3. LDP Sessions between Non-Directly Connected LSRs
okay so LDP sessions between LSRs that aren't directly connected at the link level can be highkey desirable in some situations ๐ โจ
For example, picture a "traffic engineering" application where LSRa sends traffic matching some criteria via an LSP to the non-directly connected LSRb ๐ฆ, instead of just forwarding it along its normally routed path.
The path between LSRa and LSRb would include one or more intermediate LSRs (LSR1,...LSRn). An LDP session between LSRa and LSRb would let LSRb label switch traffic arriving on the LSP from LSRa, because LSRb gets a way to advertise labels for this purpose to LSRa ๐
In this situation, LSRa applies two labels to traffic it forwards on the LSP to LSRb: a label learned from LSR1 to forward traffic along the LSP path from LSRa to LSRb, and a label learned from LSRb to enable LSRb to label switch traffic arriving on the LSP. It's giving layers ๐ง
LSRa first adds the label learned via its LDP session with LSRb to the packet label stack. It does this by replacing the label on top of the packet label stack with it if the packet arrives labeled, or by pushing it if the packet arrives unlabeled. Next, it pushes the label for the LSP learned from LSR1 onto the label stack ๐
2.4. LDP Discovery
okay, discovery is the mechanism that lets an LSR find its potential LDP peers ๐ Thanks to discovery, nobody has to manually configure an LSR's label switching peers. No more hand-typing every single neighbor, bestie ๐
There are two variants of the discovery mechanism:
- A Basic Discovery mechanism used to discover LSR neighbors that are directly connected at the link level.
- An Extended Discovery mechanism used to locate LSRs that are not directly connected at the link level.
2.4.1. Basic Discovery Mechanism
So to do LDP Basic Discovery on an interface, an LSR periodically sends LDP Link Hellos out that interface ๐ฃ LDP Link Hellos go out as UDP packets addressed to the well-known LDP discovery port, using the "all routers on this subnet" group multicast address. Very iconic ๐ธ
An LDP Link Hello sent by an LSR carries the LDP Identifier for the label space the LSR intends to use for the interface, and possibly some additional information too โจ
When an LDP Link Hello comes in on an interface, that identifies a "Hello adjacency" with a potential LDP peer that's reachable at the link level on that interface. It also tells you which label space the peer intends to use for the interface ๐
2.4.2. Extended Discovery Mechanism
LDP sessions between non-directly connected LSRs are supported by LDP Extended Discovery ๐ฆ
To do LDP Extended Discovery, an LSR periodically sends LDP Targeted Hellos to a specific address. These go out as UDP packets addressed to the well-known LDP discovery port at that specific address ๐
An LDP Targeted Hello sent by an LSR carries the LDP Identifier for the label space the LSR intends to use, plus possibly some additional optional information ๐
Extended Discovery is not the same as Basic Discovery, and here's how:
- A Targeted Hello is sent to a specific address rather than to the "all routers" group multicast address for the outgoing interface.
- Unlike Basic Discovery, which is symmetric, Extended Discovery is asymmetric.
One LSR initiates Extended Discovery with another targeted LSR, and the targeted LSR decides whether to respond to or ignore the Targeted Hello. A targeted LSR that chooses to respond does so by periodically sending Targeted Hellos back to the initiating LSR. Main character energy from the targeted LSR, deciding who gets a reply ๐
When an LDP Targeted Hello is received, that identifies a "Hello adjacency" with a potential LDP peer reachable at the network level, along with the label space the peer intends to use ๐ซถ
2.5. Establishing and Maintaining LDP Sessions
2.5.1. LDP Session Establishment
The exchange of LDP Discovery Hellos between two LSRs is what triggers LDP session establishment ๐ฅ Session establishment is a two step process:
- Transport connection establishment
- Session initialization
The following describes establishment of an LDP session between LSRs LSR1 and LSR2, from LSR1's point of view. It assumes the exchange of Hellos specifying label space LSR1:a for LSR1 and label space LSR2:b for LSR2 ๐ง
2.5.2. Transport Connection Establishment
The exchange of Hellos creates a Hello adjacency at LSR1 that binds the link (L) and the label spaces LSR1:a and LSR2:b together ๐
- If
LSR1does not already have an LDP session for the exchange of label spacesLSR1:aandLSR2:b, it attempts to open a TCP connection for a new LDP session withLSR2.
LSR1 determines the transport addresses to be used at its end (A1) and at LSR2's end (A2) of the LDP TCP connection. Address A1 is determined like this:
- a. If
LSR1uses the Transport Address optional object (TLV) in Hellos it sends toLSR2to advertise an address,A1is the addressLSR1advertises via the optional object; - b. If
LSR1does not use the Transport Address optional object,A1is the source address used in Hellos it sends toLSR2.
Similarly, address A2 is determined like this:
- a. If
LSR2uses the Transport Address optional object,A2is the addressLSR2advertises via the optional object; - b. If
LSR2does not use the Transport Address optional object,A2is the source address in Hellos received fromLSR2.
LSR1figures out whether it plays the active or passive role in session establishment by comparing addressesA1andA2as unsigned integers ๐งฎ IfA1 > A2,LSR1plays the active role; otherwise, it's passive.
Here's how comparing A1 and A2 as unsigned integers works:
- If
A1andA2are not in the same address family, they are incomparable, and no session can be established. ๐ - Let
U1be the abstract unsigned integer obtained by treatingA1as a sequence of bytes, where the byte that appears earliest in the message is the most significant byte of the integer and the byte that appears latest in the message is the least significant byte of the integer.
Let U2 be the abstract unsigned integer obtained from A2 in a similar manner.
- Compare
U1withU2. IfU1 > U2, thenA1 > A2; ifU1 < U2, thenA1 < A2.
- If
LSR1is active, it attempts to establish the LDP TCP connection by connecting to the well-known LDP port at addressA2. IfLSR1is passive, it waits forLSR2to establish the LDP TCP connection to its well-known LDP port ๐
Note that when an LSR sends a Hello, it selects the transport address for its end of the session connection and uses the Hello to advertise that address. It does this either explicitly, by including it in an optional Transport Address TLV, or implicitly, by leaving out the TLV and using the address as the Hello source address ๐ฌ
An LSR MUST advertise the same transport address in all Hellos that advertise the same label space. This requirement is what makes sure that two LSRs linked by multiple Hello adjacencies using the same label spaces play the same connection establishment role for each adjacency. This one is non-negotiable, besties ๐ซก๐
2.5.3. Session Initialization โจ
Okay so once LSR1 and LSR2 have their transport connection, they negotiate session parameters by swapping LDP Initialization messages ๐ . The stuff they agree on includes the LDP protocol version, the label distribution method, timer values, VPI/VCI (Virtual Path Identifier / Virtual Channel Identifier) ranges for label controlled ATM, DLCI (Data Link Connection Identifier) ranges for label controlled Frame Relay, and more ๐.
If the negotiation works out, the LDP session between LSR1 and LSR2 is officially up for advertising label spaces LSR1:a and LSR2:b ๐ฆ.
Here's the view from LSR1's side. Once the connection is up, if LSR1 is the active one, it starts the parameter talk by sending an Initialization message to LSR2. If LSR1 is passive, it just waits for LSR2 to kick things off ๐ง.
Now the tricky part ๐ญ. When there are multiple links between LSR1 and LSR2, and each side has multiple label spaces to advertise, the passive LSR can't know which label space to advertise over a brand new TCP connection until the Initialization message arrives on it. That message carries both the LDP Identifier for the sender's (active LSR's) label space and the LDP Identifier for the receiver's (passive LSR's) label space.
So the passive LSR waits for that message, then matches the peer's label space (taken from the LDP Identifier in the PDU header) with a Hello adjacency that got created earlier, when Hellos were exchanged ๐ซถ.
- When LSR1 plays the passive role:
- a. If LSR1 receives an Initialization message, it attempts to match the LDP Identifier carried by the message PDU with a Hello adjacency.
- b. If there is a matching Hello adjacency, the adjacency specifies the local label space for the session. Next LSR1 checks whether the session parameters proposed in the message are acceptable. If they are, LSR1 replies with an Initialization message of its own to propose the parameters it wants, plus a KeepAlive message to signal acceptance of LSR2's parameters. If the parameters are not acceptable, LSR1 responds by sending a Session Rejected/Parameters Error Notification message and closing the TCP connection ๐ .
- c. If LSR1 cannot find a matching Hello adjacency, it sends a Session Rejected/No Hello Error Notification message and closes the TCP connection.
- d. If LSR1 receives a KeepAlive in response to its Initialization message, the session is operational from LSR1's point of view ๐.
- e. If LSR1 receives an Error Notification message, LSR2 has rejected its proposed session and LSR1 closes the TCP connection.
- When LSR1 plays the active role:
- a. If LSR1 receives an Error Notification message, LSR2 has rejected its proposed session and LSR1 closes the TCP connection.
- b. If LSR1 receives an Initialization message, it checks whether the session parameters are acceptable. If so, it replies with a KeepAlive message. If the session parameters are unacceptable, LSR1 sends a Session Rejected/Parameters Error Notification message and closes the connection.
- c. If LSR1 receives a KeepAlive message, LSR2 has accepted its proposed session parameters.
- d. When LSR1 has received both an acceptable Initialization message and a KeepAlive message, the session is operational from LSR1's point of view.
Until the LDP session is established, no other messages except those listed in the procedures above may be exchanged, and the rules for processing the U-bit in LDP messages are overridden. If a message other than those listed in the procedures above is received, a Shutdown msg MUST be transmitted and the transport connection MUST be closed ๐จ.
It's possible for a pair of incompatibly configured LSRs that disagree on session parameters to get stuck in an endless loop, each NAKing the other's Initialization messages with Error Notification messages ๐.
To stop that madness, an LSR MUST throttle its session setup retry attempts with an exponential backoff whenever Initialization messages are getting NAK'd. It is also recommended that an LSR that detects this situation take action to notify an operator ๐ฃ.
The session establishment setup attempt after a NAK'd Initialization message MUST be delayed no less than 15 seconds, and subsequent delays MUST grow to a maximum delay of no less than 2 minutes. The specific session establishment action that must be delayed is the attempt to open the session transport connection by the LSR playing the active role โณ.
The throttled NAK sequence is unlikely to stop until an operator reconfigures one of the LSRs. After that kind of configuration change, there's no further need to throttle later session establishment attempts (until their Initialization messages get NAK'd) ๐ .
Because session establishment is asymmetric, reconfiguring the passive LSR will go unnoticed by the active LSR unless some further action is taken. Section "Hello Message" describes an optional mechanism an LSR can use to signal potential LDP peers that it has been reconfigured ๐.
2.5.4. Initialization State Machine ๐
It's way easier to think about LDP session negotiation as a state machine, so that's what we're doing ๐ง . The LDP state machine has five possible states, and the behavior is shown as a state transition table and as a state transition diagram. Heads up: a Shutdown message is implemented as a Notification message with a Status TLV that indicates a fatal error โ ๏ธ.
Session Initialization State Transition Table
STATE EVENT NEW STATE
NON EXISTENT Session TCP connection established INITIALIZED
established
INITIALIZED Transmit Initialization msg OPENSENT
(Active Role)
Receive acceptable OPENREC
Initialization msg
(Passive Role)
Action: Transmit Initialization
msg and KeepAlive msg
Receive Any other LDP msg NON EXISTENT
Action: Transmit Error Notification msg
(NAK) and close transport connection
OPENREC Receive KeepAlive msg OPERATIONAL
Receive Any other LDP msg NON EXISTENT
Action: Transmit Error Notification msg
(NAK) and close transport connection
OPENSENT Receive acceptable OPENREC
Initialization msg
Action: Transmit KeepAlive msg
Receive Any other LDP msg NON EXISTENT
Action: Transmit Error Notification msg
(NAK) and close transport connection
OPERATIONAL Receive Shutdown msg NON EXISTENT
Action: Transmit Shutdown msg and
close transport connection
Receive other LDP msgs OPERATIONAL
Timeout NON EXISTENT
Action: Transmit Shutdown msg and
close transport connection
Session Initialization State Transition Diagram
+------------+
| |
+------------>|NON EXISTENT|<--------------------+
| | | |
| +------------+ |
| Session | ^ |
| connection | | |
| established | | Rx any LDP msg except |
| V | Init msg or Timeout |
| +-----------+ |
Rx Any other | | | |
msg or | |INITIALIZED| |
Timeout / | +---| |-+ |
Tx NAK msg | | +-----------+ | |
| | (Passive Role) | (Active Role) |
| | Rx Acceptable | Tx Init msg |
| | Init msg / | |
| | Tx Init msg | |
| | Tx KeepAlive | |
| V msg V |
| +-------+ +--------+ |
| | | | | |
+---|OPENREC| |OPENSENT|----------------->|
+---| | | | Rx Any other msg |
| +-------+ +--------+ or Timeout |
Rx KeepAlive | ^ | Tx NAK msg |
msg | | | |
| | | Rx Acceptable |
| | | Init msg / |
| +----------------+ Tx KeepAlive msg |
| |
| +-----------+ |
+----->| | |
|OPERATIONAL| |
| |---------------------------->+
+-----------+ Rx Shutdown msg
All other | ^ or Timeout /
LDP msgs | | Tx Shutdown msg
| |
+---+
2.5.5. Maintaining Hello Adjacencies ๐
An LDP session with a peer has one or more Hello adjacencies ๐.
An LDP session ends up with multiple Hello adjacencies when a pair of LSRs is connected by multiple links that share the same label space, like multiple PPP links between a pair of routers. In that case, the Hellos an LSR sends on each of those links all carry the same LDP Identifier ๐.
LDP has mechanisms to keep an eye on whether an LDP session and its Hello adjacencies are still needed ๐.
LDP uses regularly received LDP Discovery Hellos as the signal that a peer still wants to use the label space identified by the Hello. An LSR keeps a hold timer on each Hello adjacency and restarts it whenever it receives a Hello that matches the adjacency. If the timer runs out without a matching Hello from the peer, LDP concludes that the peer no longer wants to label switch using that label space for that link (or target, in the case of Targeted Hellos), or that the peer has failed. The LSR then deletes the Hello adjacency ๐. When the last Hello adjacency for an LDP session is deleted, the LSR ends the LDP session by sending a Notification message and closing the transport connection ๐.
2.5.6. Maintaining LDP Sessions โจ
okay so LDP has built-in ways to check that the session is still healthy ๐ฉบ๐ It's giving heartbeat energy. LDP uses the regular arrival of LDP PDUs on the session's transport connection to keep an eye on things. Every LSR keeps a KeepAlive Timer for each peer session, and it gets reset every time an LDP PDU shows up from that peer. If the timer runs out without any LDP PDU from the peer, the LSR decides the transport connection is bad or the peer has failed ๐ and it ends the LDP session by closing the transport connection. Ghosted, fr fr ๐ป
Once a session is up, an LSR has to make sure its peer gets an LDP PDU from it at least once every KeepAlive time period, so the peer keeps resetting its own KeepAlive Timer ๐ซถ Any protocol message does the job, so it doesn't have to be a KeepAlive. But when the LSR has nothing else to say, it sends a KeepAlive message as the "I'm still here, bestie" move ๐ฆ
An LSR can end an LDP session with a peer whenever it wants ๐ If it does, it tells the peer with a Shutdown message. Clean exit, no drama โจ
2.6. Label Distribution and Management ๐
The MPLS architecture [RFC3031] lets an LSR hand out a FEC label binding when another LSR explicitly asks for it. That's called Downstream On Demand label distribution ๐โโ๏ธ It also lets an LSR send label bindings to LSRs that never asked. [RFC3031] calls that Unsolicited Downstream, but this document just calls it Downstream Unsolicited, because we're keeping it simple ๐
Both techniques can run in the same network at the same time ๐ Still, on any given LDP session, each LSR needs to know which method its peer is using. Otherwise you get the messy situation where a peer using Downstream Unsolicited assumes its neighbour is doing the same thing ๐ญ See Section "Downstream on Demand Label Advertisement" for more.
2.6.1. Label Distribution Control Mode ๐
How the initial setup of LSPs goes depends on whether the LSR is running Independent or Ordered LSP Control. An LSR may support both types as a configurable option โจ
2.6.1.1. Independent Label Distribution Control ๐ฆ
With independent LSP control, each LSR can send label mappings to its neighbours whenever it feels like it ๐ For example, in independent Downstream on Demand mode, an LSR can answer a request for a label mapping right away, without waiting for a label mapping from its next hop. In independent Downstream Unsolicited mode, an LSR can advertise a label mapping for a FEC to its neighbours as soon as it's ready to label-switch that FEC ๐ฅ
The catch with independent mode is that an upstream label can get advertised before a downstream label has even been received ๐
2.6.1.2. Ordered Label Distribution Control ๐ง
With LSP Ordered Control, an LSR can only start sending a label mapping for a FEC if it already has a label mapping for that FEC's next hop, or if the LSR is the egress for it ๐ If the LSR is not the egress for a FEC and there's no mapping yet, the LSR MUST wait until it receives a label from a downstream LSR before it maps the FEC and passes the matching labels upstream. An LSR can be an egress for some FECs and a non-egress for others, so it's not all or nothing ๐
An LSR can act as an egress for a particular FEC under any of these conditions:
- The FEC refers to the LSR itself (including one of its directly attached interfaces).
- The next hop router for the FEC is outside of the Label Switching Network.
- FEC elements are reachable by crossing a routing domain boundary, such as another area for OSPF summary networks, or another autonomous system for OSPF AS externals and BGP routes [RFC2328] [RFC4271].
Heads up: whether an LSR is an egress for a given FEC can change over time ๐ฆ It depends on the state of the network and the LSR's configuration settings, so keep an eye on it โจ
2.6.2. Label Retention Mode ๐ธ
The MPLS architecture [RFC3031] brings in the idea of label retention mode ๐ง It describes whether an LSR keeps a label binding for a FEC it learned from a neighbour that isn't its next hop for that FEC.
2.6.2.1. Conservative Label Retention Mode ๐ฟ
In Downstream Unsolicited advertisement mode, label mapping advertisements for all routes can come in from all peer LSRs ๐ฌ With Conservative Label retention, an advertised label mapping is only kept if it's going to be used to forward packets, meaning it came from a valid next hop according to routing ๐ฏ In Downstream on Demand mode, an LSR only asks for label mappings from the next hop LSR according to routing. Downstream on Demand is mostly used when label conservation matters (think an ATM switch with limited cross connect space ๐ง), so it's usually paired with Conservative Label retention ๐
The big win of conservative mode is that only the labels needed for forwarding data get allocated and maintained ๐ That matters a lot on LSRs where the label space is inherently limited, like an ATM switch. The downside is that if routing changes the next hop for a destination, a new label has to be obtained from the new next hop before labeled packets can be forwarded ๐ฌ
2.6.2.2. Liberal Label Retention Mode ๐
In Downstream Unsolicited advertisement mode, label mapping advertisements for all routes can come in from all LDP peers ๐ With Liberal Label retention, every label mapping received from a peer LSR is kept, whether or not that LSR is the next hop for the advertised mapping ๐ซง In Downstream on Demand mode with Liberal Label retention, an LSR might choose to request label mappings for all known prefixes from all of its peer LSRs. Still, Downstream on Demand is typically used by devices like ATM switch-based LSRs, where the conservative approach is the recommended one ๐
The main perk of Liberal Label retention is that reacting to routing changes is quick, because the labels already exist โก The main downside is that unneeded label mappings get distributed and maintained, which is extra clutter ๐๏ธ
2.6.3. Label Advertisement Mode ๐ซ
Each interface on an LSR is configured to run in either Downstream Unsolicited or Downstream on Demand advertisement mode ๐๏ธ LSRs swap advertisement modes during initialization. The big difference between the two modes is which LSR takes responsibility for starting mapping requests and mapping advertisements ๐ค
2.7. LDP Identifiers and Next Hop Addresses ๐บ๏ธ
An LSR keeps the labels it has learned in a Label Information Base (LIB) ๐ In Downstream Unsolicited mode, the LIB entry for an address prefix ties a bunch of (LDP Identifier, label) pairs to that prefix, with one pair for each peer that's advertising a label for it ๐
When the next hop for a prefix changes, the LSR has to pull the label advertised by the new next hop out of the LIB so it can use it for forwarding ๐ To do that, the LSR has to be able to map the prefix's next hop address to an LDP Identifier ๐ชช
It works the other way too. When the LSR learns a label for a prefix from an LDP peer, it has to figure out whether that peer is currently a next hop for the prefix. That tells it whether to start using the new label when forwarding packets that match the prefix ๐ To make that call, the LSR has to map an LDP Identifier back to the peer's addresses and check whether any of them is a next hop for the prefix ๐
So LSRs can map between a peer's LDP Identifier and the peer's addresses, they advertise their addresses using LDP Address and Withdraw Address messages ๐ฃ
An LSR sends an Address message to advertise its addresses to a peer ๐ An LSR sends a Withdraw Address message to pull previously advertised addresses back from a peer ๐ โโ๏ธ
2.8. Loop Detection ๐
Loop Detection is a configurable option ๐งฉ It's a mechanism for finding looping LSPs and for stopping Label Request messages from looping when non-merge capable LSRs are in the picture ๐
The mechanism uses Path Vector and Hop Count TLVs carried by Label Request and Label Mapping messages. It's built on these basic properties of the TLVs:
- A Path Vector TLV contains a list of the LSRs that its containing message has traversed ๐บ๏ธ An LSR is identified in a Path Vector list by its unique LSR Identifier (Id), which is the first four octets of its LDP Identifier. When an LSR propagates a message containing a Path Vector TLV, it adds its LSR Id to the Path Vector list. An LSR that receives a message with a Path Vector containing its own LSR Id detects that the message has traversed a loop ๐จ LDP supports a maximum allowable Path Vector length. An LSR that detects a Path Vector has reached that maximum length behaves as if the containing message has traversed a loop ๐ฑ
- A Hop Count TLV contains a count of the LSRs that the containing message has traversed ๐ข When an LSR propagates a message containing a Hop Count TLV, it increments the count. An LSR that detects a Hop Count has reached a configured maximum value behaves as if the containing message has traversed a loop. By convention, a count of 0 is read as the hop count being unknown. Incrementing an unknown hop count gives you an unknown hop count (0) again ๐คทโโ๏ธ
The following paragraphs describe the LDP Loop Detection procedures. For these paragraphs, and only these paragraphs, "MUST" gets redefined to mean "MUST if configured for Loop Detection" ๐ง The paragraphs say which messages MUST carry Path Vector and Hop Count TLVs. Also, the Hop Count TLV and its procedures get used without the Path Vector TLV when Loop Detection isn't configured (see [RFC3035] and [RFC3034]) ๐
2.8.1. Label Request Message
okay so the Path Vector TLV and Hop Count TLV are the dynamic duo that stops Label Request messages from going around in circles ๐, especially when non-merge capable LSRs are in the mix ๐
The rules for the Hop Count TLV in Label Request messages from LSR R when Loop Detection is enabled:
- The Label Request message MUST include a Hop Count TLV.
- If R is sending the Label Request because it is a FEC ingress, it MUST include a Hop Count TLV with hop count value 1.
- If R is sending the Label Request as a result of having received a Label Request from an upstream LSR, and if the received Label Request contains a Hop Count TLV, R MUST increment the received hop count value by 1 and MUST pass the resulting value in a Hop Count TLV to its next hop along with the Label Request message.
The rules for the Path Vector TLV in Label Request messages from LSR R when Loop Detection is enabled:
- If R is sending the Label Request because it is a FEC ingress, then if R is non-merge capable, it MUST include a Path Vector TLV of length 1 containing its own LSR Id.
- If R is sending the Label Request as a result of having received a Label Request from an upstream LSR, then if the received Label Request contains a Path Vector TLV or if R is non-merge capable:
- R MUST add its own LSR Id to the Path Vector, and MUST pass the resulting Path Vector to its next hop along with the Label Request message. If the Label Request contains no Path Vector TLV, R MUST include a Path Vector TLV of length 1 containing its own LSR Id.
Note that if R receives a Label Request message for a particular FEC, and R has previously sent a Label Request message for that FEC to its next hop and has not yet received a reply, and if R intends to merge the newly received Label Request with the existing outstanding Label Request, then R does not propagate the Label Request to the next hop. ๐ซถ
If R receives a Label Request message from its next hop with a Hop Count TLV that exceeds the configured maximum value, or with a Path Vector TLV containing its own LSR Id or which exceeds the maximum allowable length, then R detects that the Label Request message has traveled in a loop. ๐ญ
When R detects a loop, it MUST send a Loop Detected Notification message to the source of the Label Request message and drop the Label Request message. ๐ซ
2.8.2. Label Mapping Message
the Path Vector TLV and Hop Count TLV in the Label Mapping message are basically the detective duo ๐ต๏ธโโ๏ธ๐ฆ. They find and end looping LSPs. When an LSR gets a Label Mapping message from a next hop, the message keeps getting passed upstream (as described below) until it reaches an ingress LSR or a loop is found.
The rules for the Hop Count TLV in Label Mapping messages sent by an LSR R when Loop Detection is enabled:
- R MUST include a Hop Count TLV.
- If R is the egress, the hop count value MUST be 1.
- If the Label Mapping message is being sent to propagate a Label Mapping message received from the next hop to an upstream peer, the hop count value MUST be determined as follows:
- If R is a member of the edge set of an LSR domain whose LSRs do not perform 'TTL-decrement' (e.g., an ATM LSR domain or a Frame Relay LSR domain) and the upstream peer is within that domain, R MUST reset the hop count to 1 before propagating the message.
- Otherwise, R MUST increment the hop count received from the next hop before propagating the message.
- If the Label Mapping message is not being sent to propagate a Label Mapping message, the hop count value MUST be the result of incrementing R's current knowledge of the hop count learned from previous Label Mapping messages. Note that this hop count value will be unknown if R has not received a Label Mapping message from the next hop.
Any Label Mapping message MAY contain a Path Vector TLV. โจ The rules for the mandatory use of the Path Vector TLV in Label Mapping messages sent by LSR R when Loop Detection is enabled:
- If R is the egress, the Label Mapping message need not include a Path Vector TLV.
- If R is sending the Label Mapping message to propagate a Label Mapping message received from the next hop to an upstream peer, then:
- If R is merge capable and if R has not previously sent a Label Mapping message to the upstream peer, then it MUST include a Path Vector TLV.
- If the received message contains an unknown hop count, then R MUST include a Path Vector TLV.
- If R has previously sent a Label Mapping message to the upstream peer, then it MUST include a Path Vector TLV if the received message reports an LSP hop count increase, a change in hop count from unknown to known, or a change from known to unknown.
If the above rules require R to include a Path Vector TLV in the Label Mapping message, R computes it as follows:
- If the received Label Mapping message included a Path Vector, the Path Vector sent upstream MUST be the result of adding R's LSR Id to the received Path Vector.
- If the received message had no Path Vector, the Path Vector sent upstream MUST be a Path Vector of length 1 containing R's LSR Id.
- If the Label Mapping message is not being sent to propagate a received message upstream, the Label Mapping message MUST include a Path Vector of length 1 containing R's LSR Id.
If R receives a Label Mapping message from its next hop with a Hop Count TLV that exceeds the configured maximum value, or with a Path Vector TLV containing its own LSR Id or that exceeds the maximum allowable length, then R detects that the corresponding LSP contains a loop. ๐
When R detects a loop, it MUST stop using the label for forwarding, drop the Label Mapping message, and signal Loop Detected status to the source of the Label Mapping message. ๐
2.8.3. Discussion
Okay, the big tea here ๐ต: if you want Loop Detection in an MPLS domain, it should be turned on in ALL LSRs within that MPLS domain. Otherwise Loop Detection won't operate properly, and you can end up with undetected loops or falsely detected loops. ๐ฑ
LSRs that are configured for Loop Detection are NOT expected to store the Path Vectors as part of the LSP state. ๐ง
Note that in a network where only non-merge capable LSRs are present, Path Vectors are passed downstream from ingress to egress, and are not passed upstream. Even when merge is supported, Path Vectors need not be passed upstream along an LSP that is known to reach the egress. When an LSR experiences a change of next hop, it need pass Path Vectors upstream only when it cannot tell from the hop count that the change of next hop does not result in a loop. ๐ธ
In the case of ordered label distribution, Label Mapping messages are propagated from egress toward ingress, naturally creating the Path Vector along the way. In the case of independent label distribution, an LSR may originate a Label Mapping message for a FEC before receiving a Label Mapping message from its downstream peer for that FEC. In this case, the subsequent Label Mapping message for the FEC received from the downstream peer is treated as an update to LSP attributes, and the Label Mapping message must be propagated upstream. Thus, it is recommended that Loop Detection be configured in conjunction with ordered label distribution, to minimize the number of Label Mapping update messages. ๐
2.9. Authenticity and Integrity of LDP Messages
this section is about protecting LDP sessions from spoofed TCP segments sneaking into the connection stream ๐ก๏ธ๐. The use of this mechanism MUST be supported as a configurable option. ๐
The mechanism is based on the TCP MD5 Signature Option specified in [RFC2385] for use by BGP [RFC4271]. See [RFC1321] for a specification of the MD5 hash function. From a standards maturity point of view, the current document relates to [RFC2385] the same way as [RFC4271] relates to [RFC2385]. This is explained in [RFC4278]. ๐ฆ
2.9.1. TCP MD5 Signature Option
the following quotes from [RFC2385] lay out the security properties you get from the TCP MD5 Signature Option and sum up how it works ๐:
"IESG Note This document describes current existing practice for securing BGP against certain simple attacks. It is understood to have security weaknesses against concerted attacks." "Abstract This memo describes a TCP extension to enhance security for BGP. It defines a new TCP option for carrying an MD5 [RFC1321] digest in a TCP segment. This digest acts like a signature for that segment, incorporating information known only to the connection end points. Since BGP uses TCP as its transport, using this option in the way described in this paper significantly reduces the danger from certain security attacks on BGP." "Introduction The primary motivation for this option is to allow BGP to protect itself against the introduction of spoofed TCP segments into the connection stream. Of particular concern are TCP resets. To spoof a connection using the scheme described in this paper, an attacker would not only have to guess TCP sequence numbers, but would also have had to obtain the password included in the MD5 digest. This password never appears in the connection stream, and the actual form of the password is up to the application. It could even change during the lifetime of a particular connection so long as this change was synchronized on both ends (although retransmission can become problematical in some TCP implementations with changing passwords). Finally, there is no negotiation for the use of this option in a connection, rather it is purely a matter of site policy whether or not its connections use the option." "MD5 as a Hashing Algorithm Since this memo was first issued (under a different title), the MD5 algorithm has been found to be vulnerable to collision search attacks [Dobb], and is considered by some to be insufficiently strong for this type of application. This memo still specifies the MD5 algorithm, however, since the option has already been deployed operationally, and there was no "algorithm type" field defined to allow an upgrade using the same option number. The original document did not specify a type field since this would require at least one more byte, and it was felt at the time that taking 19 bytes for the complete option (which would probably be padded to 20 bytes in TCP implementations) would be too much of a waste of the already limited option space. This does not prevent the deployment of another similar option which uses another hashing algorithm (like SHA-1). Also, if most implementations pad the 18 byte option as defined to 20 bytes anyway, it would be just as well to define a new option which contains an algorithm type field. This would need to be addressed in another document, however."
End of quotes from [RFC2385]. โ ๏ธ
2.9.2. LDP Use of TCP MD5 Signature Option ๐
okay so here's how LDP uses the TCP MD5 Signature Option ๐
- Using the MD5 Signature Option on LDP TCP connections is a configurable LSR option ๐
- An LSR that uses the MD5 Signature Option gets a password (shared secret) configured for each potential LDP peer ๐
- The LSR runs the MD5 algorithm from [RFC2385] to compute the MD5 digest for a TCP segment it's about to send to a peer. That computation uses the peer password AND the TCP segment ๐ง
- When the LSR gets a TCP segment with an MD5 digest, it checks the segment by computing the digest itself (using its own record of the password) and comparing it with the received digest. If the comparison fails, the segment is dropped with no response sent back to the sender ๐
- The LSR ignores LDP Hellos from any LSR that doesn't have a password configured. This makes sure the LSR only sets up LDP TCP connections with LSRs that have a password configured ๐ซถ
2.10. Label Distribution for Explicitly Routed LSPs
Traffic Engineering [RFC2702] is expected to be an important MPLS application ๐. MPLS support for Traffic Engineering uses explicitly routed LSPs, which don't have to follow normally-routed (hop-by-hop) paths as determined by destination-based routing protocols. CR-LDP [CRLDP] defines extensions to LDP so it can set up explicitly routed LSPs โจ
3. Protocol Specification โจ
Previous sections that describe LDP operation talked about scenarios involving messages being exchanged between LDP peers. This section specifies the message encodings and the procedures for processing those messages ๐ฆ
LDP message exchanges happen by sending LDP protocol data units (PDUs) over LDP session TCP connections.
Each LDP PDU can carry one or more LDP messages. The messages inside one PDU don't need to be related to each other, bestie ๐ For example, one PDU could carry a message advertising FEC-label bindings for several FECs, another message requesting label bindings for several other FECs, and a third Notification message signaling some event.
3.1. LDP PDUs
Each LDP PDU is an LDP header followed by one or more LDP messages. The LDP header looks like this ๐
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version | PDU Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LDP Identifier |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version
Two octet unsigned integer containing the version number of the protocol. This version of the specification specifies LDP protocol version 1 ๐ธ
PDU Length
Two octet integer specifying the total length of this PDU in octets, excluding the Version and PDU Length fields.
The maximum allowable PDU Length is negotiable when an LDP session is initialized. Prior to completion of the negotiation, the maximum allowable length is 4096 bytes.
LDP Identifier
Six octet field that uniquely identifies the label space of the sending LSR for which this PDU applies. The first four octets identify the LSR and MUST be a globally unique value. It SHOULD be a 32-bit router Id assigned to the LSR and also used to identify it in Loop Detection Path Vectors. The last two octets identify a label space within the LSR. For a platform-wide label space, these SHOULD both be zero ๐
Note that there is no alignment requirement for the first octet of an LDP PDU.
3.2. LDP Procedures
LDP defines messages, TLVs, and procedures in the following areas, and they're all main character energy ๐
- Peer discovery
- Session management
- Label distribution
- Notification of errors and advisory information
The sections that follow describe the message and TLV encodings for these areas and the procedures that apply to them.
The label distribution procedures are complex. They're really hard to describe fully, coherently, and unambiguously as a pile of separate message and TLV specifications ๐ญ
Appendix A, "LDP Label Distribution Procedures", describes the label distribution procedures in terms of label distribution events that may occur at an LSR and how the LSR must respond. Appendix A is the specification of LDP label distribution procedures. If a procedure described elsewhere in this document conflicts with Appendix A, Appendix A specifies LDP behavior ๐
3.3. Type-Length-Value Encoding
LDP uses a Type-Length-Value (TLV) encoding scheme to encode much of the information carried in LDP messages ๐งฉ
An LDP TLV is encoded as a 2 octet field that uses 14 bits to specify a Type and 2 bits to specify behavior when an LSR doesn't recognize the Type. It's followed by a 2 octet Length field, and then a variable length Value field ๐ฆ
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|F| Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Value |
~ ~
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
U-bit
Unknown TLV bit. Upon receipt of an unknown TLV, if U is clear (=0), a notification MUST be returned to the message originator and the entire message MUST be ignored. If U is set (=1), the unknown TLV MUST be silently ignored and the rest of the message processed as if the unknown TLV did not exist. The sections following that define TLVs specify a value for the U-bit ๐ซ
F-bit
Forward unknown TLV bit. This bit applies only when the U-bit is set and the LDP message containing the unknown TLV is to be forwarded. If F is clear (=0), the unknown TLV is not forwarded with the containing message. If F is set (=1), the unknown TLV is forwarded with the containing message. The sections following that define TLVs specify a value for the F-bit. By setting both the U- and F-bits, a TLV can be propagated as opaque data through nodes that do not recognize the TLV ๐ซง
Type
Encodes how the Value field is to be interpreted.
Length
Specifies the length of the Value field in octets.
Value
Octet string of Length octets that encodes information to be interpreted as specified by the Type field.
Note that there is no alignment requirement for the first octet of a TLV.
Note that the Value field itself may contain TLV encodings. That is, TLVs may be nested ๐ช
The TLV encoding scheme is very general. In principle, everything appearing in an LDP PDU could be encoded as a TLV. This specification does not use the TLV scheme to its full generality. It is not used where its generality is unnecessary and its use would waste space unnecessarily. These are usually places where the type of a value to be encoded is known, for example by its position in a message or an enclosing TLV, and the length of the value is fixed or readily derivable from the value encoding itself ๐ง
Some of the TLVs defined for LDP are similar to one another. For example, there is a Generic Label TLV, an ATM Label TLV, and a Frame Relay TLV. See Sections "Generic Label TLV", "ATM Label TLV", and "Frame Relay TLV" ๐
While it is possible to think about TLVs related in this way in terms of a TLV type that specifies a TLV class and a TLV subtype that specifies a particular kind of TLV within that class, this specification does not formalize the notion of a TLV subtype ๐
The specification assigns type values for related TLVs, such as the label TLVs, from a contiguous block in the 16-bit TLV type number space ๐ข
Section "TLV Summary" lists the TLVs defined in this version of the protocol and the section in this document that describes each ๐
3.4. TLV Encodings for Commonly Used Parameters
There are several parameters used by more than one LDP message. The TLV encodings for these commonly used parameters are specified in this section โจ
3.4.1. FEC TLV ๐
okay so labels get bound to FECs (Forwarding Equivalence Classes) ๐ฆ. A FEC is a list of one or more FEC elements, and the FEC TLV is the one that carries those FEC items โจ
Its encoding looks like this ๐:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| FEC (0x0100) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC Element 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC Element n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
FEC Element 1 to FEC Element n ๐
There are several types of FEC elements, so check out Section "FECs" for the deets. How a FEC element is encoded depends on its type.
A FEC Element value is encoded as a 1 octet field that says which element type it is, followed by a variable length field holding the type-dependent element value. ngl this is a little plot twist ๐: even though the value's format depends on the type, the FEC element encoding itself does not use standard LDP TLV encoding.
The FEC Element value encoding is:
FEC Element Type Value
type name
Wildcard 0x01 No value; i.e., 0 value octets;
see below.
Prefix 0x02 See below.
Note that this version of LDP supports the use of multiple FEC Elements per FEC for the Label Mapping message only. The use of multiple FEC Elements in other messages is not permitted in this version, and is a subject for future study. ๐
Wildcard FEC Element ๐ธ
This one is only for the Label Withdraw and Label Release messages. It means the withdraw or release gets applied to all FECs associated with the label inside the label TLV that follows. It must be the only FEC Element in the FEC TLV, no exceptions bestie ๐ญ
Prefix FEC Element value encoding: ๐ฆ
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix (2) | Address Family | PreLen |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prefix |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Address Family ๐ง A two octet quantity containing a value from ADDRESS FAMILY NUMBERS in [ASSIGNED_AF], which encodes the address family for the address prefix in the Prefix field.
PreLen ๐ A one octet unsigned integer containing the length in bits of the address prefix that follows. A length of zero indicates a prefix that matches all addresses (the default destination). In this case, the Prefix itself is zero octets.
Prefix ๐ An address prefix encoded according to the Address Field, whose length in bits was specified in the PreLen field, padded to a byte boundary.
3.4.1.1. FEC Procedures โจ
if an LSR is decoding a FEC TLV and runs into a FEC Element with an Address Family it doesn't support, it SHOULD stop decoding the FEC TLV, abort processing the message containing the TLV, and send an "Unsupported Address Family" Notification message to its LDP peer to signal an error ๐จ
and if it hits a FEC Element type it can't decode, it SHOULD stop decoding the FEC TLV, abort processing the message containing the TLV, and send an "Unknown FEC" Notification message to its LDP peer to signal an error ๐ โโ๏ธ
3.4.2. Label TLVs ๐
Label TLVs encode labels ๐ท๏ธ. They get carried by the messages used to advertise, request, release, and withdraw label mappings.
There are several different kinds of Label TLVs that can show up in situations that need a Label TLV ๐
3.4.2.1. Generic Label TLV ๐
An LSR uses Generic Label TLVs to encode labels for use on links where the label values don't depend on the underlying link technology. PPP and Ethernet are examples of these links.
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Generic Label (0x0200) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Label ๐ฅ This is a 20-bit label value, represented as a 20-bit number in a 4 octet field, like so:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
For further info, see [RFC3032]. ๐ฆ
3.4.2.2. ATM Label TLV ๐ธ
An LSR uses ATM Label TLVs to encode labels for use on ATM links ๐
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| ATM Label (0x0201) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Res| V | VPI | VCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Res ๐ง This field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt.
V-bits ๐ Two-bit switching indicator. If V-bits is 00, both the VPI and VCI are significant. If V-bits is 01, only the VPI field is significant. If V-bit is 10, only the VCI is significant.
VPI ๐ฃ๏ธ Virtual Path Identifier. If VPI is less than 12-bits, it SHOULD be right justified in this field, and the preceding bits SHOULD be set to 0.
VCI ๐ก Virtual Channel Identifier. If the VCI is less than 16-bits, it SHOULD be right justified in the field, and the preceding bits MUST be set to 0. If Virtual Path switching is indicated in the V-bits field, then this field MUST be ignored by the receiver and set to 0 by the sender. ๐ญ
3.4.2.3. Frame Relay Label TLV ๐
An LSR uses Frame Relay Label TLVs to encode labels for use on Frame Relay links ๐ง
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Frame Relay Label (0x0202)| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Len| DLCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Res ๐ง This field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt.
Len ๐ This field specifies the number of bits of the DLCI. These values are supported:
0 = 10 bits of DLCI
2 = 23 bits of DLCI
Len values 1 and 3 are reserved. ๐ซ
DLCI ๐ The Data Link Connection Identifier. For a 10-bit DLCI, the encoding is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Frame Relay Label (0x0202)| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Len| 0 | 10-bit DLCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
For a 23-bit DLCI, the encoding is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Frame Relay Label (0x0202)| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Len| 23-bit DLCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
For further info, see [RFC3034]. ๐ฆ
3.4.3. Address List TLV ๐
The Address List TLV shows up in Address and Address Withdraw messages ๐
Its encoding is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Address List (0x0101) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Address Family | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| Addresses |
~ ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Address Family ๐ง A two octet quantity containing a value from ADDRESS FAMILY NUMBERS in [ASSIGNED_AF], which encodes the addresses contained in the Addresses field.
Addresses ๐ A list of addresses from the specified Address Family. The encoding of the individual addresses depends on the Address Family.
The following address encodings are defined by this version of the protocol:
Address Family Address Encoding
IPv4 4 octet full IPv4 address
IPv6 16 octet full IPv6 address
3.4.4. Hop Count TLV ๐
The Hop Count TLV shows up as an optional field in messages that set up LSPs. It calculates the number of LSR hops along an LSP while the LSP is being set up, which is honestly iconic ๐
Note that setup procedures for LSPs that traverse ATM and Frame Relay links require use of the Hop Count TLV (see [RFC3035] and [RFC3034]). โ ๏ธ
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Hop Count (0x0103) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HC Value |
+-+-+-+-+-+-+-+-+
HC Value ๐ซถ A one octet unsigned integer hop count value.
3.4.4.1. Hop Count Procedures โจ
okay bestie, so during setup of an LSP ๐ฆ, an LSR R might get a Label Mapping or Label Request message for that LSP that has the Hop Count TLV in it ๐. If that happens, it SHOULD record the hop count value ๐ .
If LSR R then passes the Label Mapping message along to an upstream peer, or the Label Request message to a downstream peer, to keep the LSP setup going ๐ง, it must work out the hop count to put in that message, and it goes like this:
- If it's a Label Request message, R MUST increment the hop count it received ๐ฅ.
- If it's a Label Mapping message, R figures out the hop count like this:
- If R is in the edge set of an LSR domain whose LSRs do not perform 'TTL-decrement', and the upstream peer is inside that same domain, R MUST reset the hop count to 1 before sending the message on ๐ซถ.
- Otherwise, R MUST increment the hop count it received.
The first LSR in the LSP (the ingress for a Label Request message, or the egress for a Label Mapping message) SHOULD set the hop count value to 1 ๐ธ.
By convention, a value of 0 means the hop count is unknown ๐. Incrementing an unknown hop count still gives you an unknown hop count (0), so it stays unknown. no cap, it's very consistent ๐.
Using the unknown hop count is a huge glow-up for signaling overhead when independent control is used โจ. When a new LSP gets set up, every LSR starts with an unknown hop count. Adding a new LSR that also has an unknown hop count doesn't send a hop count update upstream, because the count is still unknown ๐. Once the egress finally joins the LSP, the LSRs send hop count updates upstream using Label Mapping messages ๐.
Without the unknown hop count, every time a new LSR gets added to the LSP, a hop count update would have to go upstream if that new LSR is closer to the egress than any of the other LSRs ๐ญ. Those updates are pure wasted overhead, since they don't even reflect the real hop count to the egress ๐.
From the ingress node's point of view, an unknown hop count tells you nothing about whether a packet sent on the LSP will actually reach the egress ๐ซ . All it means is that the hop count update from the egress hasn't reached the ingress yet ๐.
If an LSR receives a message with a Hop Count TLV, it MUST check the hop count value to see whether it has gone over the LSR's configured maximum allowable value ๐. If it has, the LSR MUST act as if the message went around a loop, so it sends a Notification message signaling Loop Detected back to the sender of that message ๐จ.
If Loop Detection is configured, the LSR MUST follow the procedures in Section "Loop Detection" ๐.
3.4.5. Path Vector TLV ๐ค๏ธ
The Path Vector TLV works together with the Hop Count TLV in Label Request and Label Mapping messages to run the optional LDP Loop Detection mechanism ๐ต๏ธโโ๏ธ. See Section "Loop Detection". In a Label Request message, it records the path of LSRs the request has gone through. In a Label Mapping message, it records the path of LSRs a label advertisement has gone through to set up an LSP ๐บ๏ธ. Here's its encoding:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Path Vector (0x0104) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LSR Id 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LSR Id n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
One or more LSR Ids A list of router-ids showing the path of LSRs the message has gone through. Each LSR Id is the first four octets (router-id) of the LDP Identifier for the matching LSR. That's what makes it unique within the LSR network ๐.
3.4.5.1. Path Vector Procedures ๐
The Path Vector TLV is carried in Label Mapping and Label Request messages when Loop Detection is configured ๐.
3.4.5.1.1. Label Request Path Vector ๐งญ
Section "Loop Detection" lays out the situations where an LSR must include a Path Vector TLV in a Label Request message ๐.
An LSR that receives a Path Vector in a Label Request message MUST perform the procedures in Section "Loop Detection" ๐.
If the LSR detects a loop, it MUST reject the Label Request message ๐ โโ๏ธ.
The LSR MUST:
- Transmit a Notification message to the sending LSR signaling "Loop Detected" ๐ฃ.
- Not propagate the Label Request message any further ๐.
Note that a Label Request message with a Path Vector TLV keeps getting forwarded until:
- A loop is found,
- The LSP egress is reached, or
- The maximum Path Vector limit or maximum Hop Count limit is reached. This is treated as if a loop had been detected ๐ค.
3.4.5.1.2. Label Mapping Path Vector ๐ช
Section "Loop Detection" specifies the situations where an LSR must include a Path Vector TLV in a Label Mapping message ๐.
An LSR that receives a Path Vector in a Label Mapping message MUST perform the procedures in Section "Loop Detection" ๐.
If the LSR detects a loop, it MUST reject the Label Mapping message in order to prevent a forwarding loop ๐ซ. The LSR MUST:
- Transmit a Label Release message carrying a Status TLV to the sending LSR to signal "Loop Detected" ๐จ.
- Not propagate the message any further ๐.
- Check whether the Label Mapping message is for an existing LSP. If so, the LSR must unsplice any upstream labels that are spliced to the downstream label for the FEC ๐งต.
Note that a Label Mapping message with a Path Vector TLV keeps getting forwarded until:
- A loop is found,
- An LSP ingress is reached, or
- The maximum Path Vector or maximum Hop Count limit is reached. This is treated as if a loop had been detected ๐ฉ.
3.4.6. Status TLV ๐ฆ
Notification messages carry Status TLVs to specify the events being signaled ๐ฃ.
Here's the encoding for the Status TLV:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|F| Status (0x0300) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Status Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
U-bit
- SHOULD be 0 when the Status TLV is sent in a Notification message.
- SHOULD be 1 when the Status TLV is sent in some other message.
F-bit
- SHOULD be the same as the setting of the F-bit in the Status Code field.
Status Code
- A 32-bit unsigned integer encoding the event being signaled. The structure of a Status Code is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E|F| Status Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- E-bit: Fatal error bit. If set (=1), this is a fatal Error Notification. If clear (=0), this is an Advisory Notification ๐ฅ.
- F-bit: Forward bit. If set (=1), the notification SHOULD be forwarded to the LSR for the next-hop or previous-hop for the LSP, if any, associated with the event being signaled ๐ฌ. If clear (=0), the notification SHOULD NOT be forwarded ๐ โโ๏ธ.
- Status Data: A 30-bit unsigned integer that specifies the status information ๐งพ.
This specification defines Status Codes (32-bit unsigned integers with the above encoding) ๐.
A Status Code of 0 signals success ๐.
Message ID
- If non-zero, it's a 32-bit value that identifies the peer message the Status TLV refers to ๐. If zero, no specific peer message is being identified.
Message Type
- If non-zero, it's the type of the peer message the Status TLV refers to ๐ท๏ธ. If zero, the Status TLV doesn't refer to any specific message type.
Note that the Status TLV isn't limited to Notification messages ๐ค. A message other than a Notification message may carry a Status TLV as an Optional Parameter. When a message other than a Notification carries a Status TLV, the U-bit of the Status TLV SHOULD be set to 1 ๐. That tells the receiver it SHOULD silently discard the TLV if it isn't prepared to handle it ๐ซฅ.
3.5. LDP Messages โจ
okay so every single LDP message starts with the same header, bestie ๐ the layout goes like this:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U| Message Type | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Mandatory Parameters |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Optional Parameters |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
U-bit is the unknown message bit ๐ if an LSR gets a message it doesn't recognise, the U-bit decides what happens next. If U is clear (0), a notification goes back to whoever sent the message. If U is set (1), the unknown message just gets silently ignored. The sections that follow say which U-bit value each message uses.
Message Type identifies what kind of message it is.
Message Length is the cumulative length in octets of the Message ID, Mandatory Parameters, and Optional Parameters. Lowkey the most important field for keeping track of where a message ends ๐ง
Message ID is a 32-bit value that identifies this message. The sending LSR uses it so it can match up any Notification messages that might be about this one. An LSR that sends a Notification in response to this message SHOULD include this Message ID in the Status TLV carried by that Notification message; see Section "Notification Message".
Mandatory Parameters is a variable length set of required message parameters. Some messages don't have any required parameters, which is totally valid ๐ธ For messages that do have required parameters, those parameters MUST appear in the order given by each message's own specification in the sections that follow. Order matters, no cap ๐
Optional Parameters is a variable length set of optional message parameters. Plenty of messages have none, and for the ones that do, those parameters may show up in any order ๐ฆ
Note that there is no alignment requirement for the first octet of an LDP message, and there is no padding at the end of a message. That means parameters can end on odd-byte boundaries. It's giving chaotic but also efficient โจ
The following message types are defined in this version of LDP:
Message Name Section Title
Notification "Notification Message"
Hello "Hello Message"
Initialization "Initialization Message"
KeepAlive "KeepAlive Message"
Address "Address Message"
Address Withdraw "Address Withdraw Message"
Label Mapping "Label Mapping Message"
Label Request "Label Request Message"
Label Abort Request "Label Abort Request Message"
Label Withdraw "Label Withdraw Message"
Label Release "Label Release Message"
The sections that follow spell out the encodings and procedures for each of these ๐
Some of these messages are related to each other. The Label Mapping, Label Request, Label Withdraw, and Label Release messages are a good example ๐
You could think of related messages as a message type that gives a class, plus a message subtype that picks out a specific kind of message within that class. This specification doesn't formalise the idea of a message subtype though, so we're not going there ๐ โโ๏ธ
What the spec does do is give type values for related messages, like the Label messages, from a contiguous block in the 16-bit message type number space. Super organised, iconic behaviour ๐
3.5.1. Notification Message
An LSR sends a Notification message to tell an LDP peer about a significant event ๐ฃ A Notification message can signal a fatal error, or it can just give advisory information, like the outcome of processing an LDP message or the state of the LDP session.
The encoding for the Notification message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Notification (0x0001) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Status (TLV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID is the 32-bit value that identifies this message.
Status TLV says which event is being signaled. The encoding for the Status TLV is in Section "Status TLV".
Optional Parameters is a variable length field holding 0 or more parameters, each encoded as a TLV. These Optional Parameters are generic and can show up in any Notification message:
Optional Parameter Type Length Value
Extended Status 0x0301 4 See below
Returned PDU 0x0302 var See below
Returned Message 0x0303 var See below
Other Optional Parameters can also appear, specific to the particular event being signaled. Those are described elsewhere ๐ง
Extended Status is a 4 octet value, an Extended Status Code that adds extra info on top of the status information in the Notification Status Code.
Returned PDU is how an LSR sends back part of an LDP PDU to the LSR that sent it. The value is the PDU header, plus as much PDU data after the header as makes sense for the condition being signaled.
Returned Message is how an LSR sends back part of an LDP message to the LSR that sent it. The value is the message type and length fields, plus as much message data after those fields as makes sense for the condition being signaled.
3.5.1.1. Notification Message Procedures
If an LSR runs into a condition where it needs to tell its peer about advisory or error information, it sends a Notification message. That message holds a Status TLV encoding the information, and optionally some extra TLVs with more detail about the condition ๐
If the condition is a fatal error, the Status Code in the Notification will say so. In that case, after sending the Notification, the LSR SHOULD terminate the LDP session by closing the session TCP connection, and discard all state tied to the session, including every label-FEC binding it learned through that session. Yikes, big energy but necessary ๐ญ
When an LSR receives a Notification carrying a Status Code that indicates a fatal error, it SHOULD terminate the LDP session right away by closing the session TCP connection, and discard all state tied to the session, including every label-FEC binding learned through it. Same vibes, just from the receiving side ๐ซถ
That above statement doesn't apply to how a Shutdown message gets handled during session initialisation. When an LSR gets a Shutdown message during session initialisation, it SHOULD send a Shutdown message back and then close the transport connection ๐
3.5.1.2. Events Signaled by Notification Messages
It's useful, for description purposes, to sort the events signaled by Notification messages into the categories below ๐
3.5.1.2.1. Malformed PDU or Message
Malformed LDP PDUs or messages that are part of the LDP Discovery mechanism get handled by being silently discarded ๐ซฅ
An LDP PDU received on a TCP connection for an LDP session is malformed if:
- The LDP Identifier in the PDU header is unknown to the receiver, or it's known but isn't the LDP Identifier the receiver associated with the LDP peer for this LDP session. This is a fatal error signaled by the Bad LDP Identifier Status Code.
- The LDP protocol version isn't supported by the receiver, or it is supported but isn't the version negotiated for the session during session establishment. This is a fatal error signaled by the Bad Protocol Version Status Code.
- The PDU Length field is too small (< 14) or too large (> maximum PDU length). This is a fatal error signaled by the Bad PDU Length Status Code. Section "Initialization Message" describes how the maximum PDU length for a session gets determined.
An LDP message is malformed if:
- The Message Type is unknown. If the Message Type is
< 0x8000(high order bit = 0), it's an error signaled by the Unknown Message Type Status Code. If the Message Type is>= 0x8000(high order bit = 1), it gets silently discarded. - The Message Length is too large, meaning it indicates the message extends beyond the end of the containing LDP PDU. This is a fatal error signaled by the Bad Message Length Status Code.
- The Message Length is too small, meaning it's smaller than the smallest possible value component. This is a fatal error signaled by the Bad Message Length Status Code.
- The message is missing one or more Mandatory Parameters. This is a non-fatal error signaled by the Missing Message Parameters Status Code.
3.5.1.2.2. Unknown or Malformed TLV
Malformed TLVs inside LDP messages that are part of the LDP Discovery mechanism get handled by silently discarding the message that contains them ๐
A TLV inside an LDP message received on a TCP connection of an LDP session is malformed if:
- The TLV Length is too large, meaning it indicates the TLV extends beyond the end of the containing message. This is a fatal error signaled by the Bad TLV Length Status Code.
- The TLV type is unknown. If the TLV type is
< 0x8000(high order bit = 0), it's an error signaled by the Unknown TLV Status Code. If the TLV type is>= 0x8000(high order bit = 1), the TLV is silently dropped. - The TLV Value is malformed. This happens when the receiver handles the TLV but can't decode the TLV Value. It's read as a sign of a bug in either the sending or receiving LSR. This is a fatal error signaled by the Malformed TLV Value Status Code.
3.5.1.2.3. Session KeepAlive Timer Expiration
This is a fatal error signaled by the KeepAlive Timer Expired Status Code ๐ญ๐ซถ
3.5.1.2.4. Unilateral Session Shutdown โจ
okay so this one is a fatal event ๐ and it gets flagged with the Shutdown Status Code. The Notification message is allowed to (optionally ๐) carry an Extended Status TLV to explain why it's shutting down. The sending LSR kills the session right after sending that Notification. no goodbye tour, just gone ๐
3.5.1.2.5. Initialization Message Events ๐ธ
the session initialization negotiation (see Section "Session Initialization") can fail if the session parameters in the Initialization message are unacceptable. this is a fatal error ๐ญ. which Status Code you get depends on which parameter was the problem, and those codes are defined in Sections "Initialization Message".
3.5.1.2.6. Events Resulting from Other Messages ๐ฆ
other messages (anything that isn't the Initialization message) can also cause events that need to be told to LDP peers through Notification messages. the events and the Status Codes used to signal them are described in the sections for those messages. so check there, bestie ๐ซถ
3.5.1.2.7. Internal Errors ๐
an LDP implementation might be able to spot problems that are specific to its own internals. when one of those problems stops it from talking to a peer correctly, the implementation should, if it's able to, use the Internal Error Status Code to tell the peer. this is a fatal error too ๐ฅ
3.5.1.2.8. Miscellaneous Events ๐ง
these are the events that don't fit in any of the boxes above. and honestly? there are no miscellaneous events defined in this version of the protocol ๐
3.5.2. Hello Message ๐
LDP Hello messages get swapped as part of the LDP Discovery Mechanism; see Section "LDP Discovery". ๐
here's how the encoding for the Hello message looks:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Hello (0x0100) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Hello Parameters TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ข 32-bit value used to identify this message.
Common Hello Parameters TLV ๐ This one specifies the parameters that every Hello message shares. The encoding for the Common Hello Parameters TLV is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Common Hello Parms(0x0400)| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Hold Time |T|R| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Hold Time โณ This is the Hello hold time, in seconds. An LSR keeps a record of the Hellos it gets from potential peers (see Section "Hello Message Procedures"). Hello Hold Time is how long the sending LSR keeps its record of the receiving LSR's Hellos when no new Hello shows up.
LSRs negotiate the hold times they'll use for Hellos from each other. each one proposes a hold time, and the one actually used is the minimum of the two proposals. the way that's giving fairness ๐ค
A value of 0 means "use the default", which is 15 seconds for Link Hellos and 45 seconds for Targeted Hellos. A value of 0xffff means infinite โพ๏ธ
T, Targeted Hello ๐ฏ A value of 1 means this Hello is a Targeted Hello. A value of 0 means it's a Link Hello.
R, Request Send Targeted Hellos ๐ก A value of 1 asks the receiver to send periodic Targeted Hellos back to the source of this Hello. A value of 0 makes no request.
An LSR that starts Extended Discovery sets R to 1. When R is 1, the receiving LSR checks whether it's been configured to send Targeted Hellos to the Hello source in response to Hellos carrying this request. If it hasn't, it ignores the request. If it has, it starts sending periodic Targeted Hellos to the Hello source ๐ฆ
Reserved ๐ซ This field is reserved. It MUST be set to zero on transmission and ignored on receipt. no cap, that's a hard rule ๐
Optional Parameters ๐ This is a variable-length field in the Hello message, holding 0 or more parameters, each one encoded as a TLV. The optional parameters defined by this version of the protocol are:
Optional Parameter Type Length Value
IPv4 Transport Address 0x0401 4 See below
Configuration 0x0402 4 See below
Sequence Number
IPv6 Transport Address 0x0403 16 See below
IPv4 Transport Address ๐ This specifies the IPv4 address the sending LSR uses when it opens the LDP session TCP connection. If this optional TLV isn't there, the IPv4 source address of the UDP packet carrying the Hello SHOULD be used.
Configuration Sequence Number ๐ This is a 4 octet unsigned configuration sequence number that identifies the configuration state of the sending LSR. The receiving LSR uses it to detect configuration changes on the sending LSR.
IPv6 Transport Address ๐ This specifies the IPv6 address the sending LSR uses when it opens the LDP session TCP connection. If this optional TLV isn't there, the IPv6 source address of the UDP packet carrying the Hello SHOULD be used.
3.5.2.1. Hello Message Procedures ๐ง
An LSR that gets Hellos from another LSR keeps a Hello adjacency that matches those Hellos. It runs a hold timer on that Hello adjacency and restarts it whenever a Hello matching the adjacency comes in. If the hold timer for a Hello adjacency expires, the LSR throws that adjacency away: see Sections "Maintaining Hello Adjacencies" and "Maintaining LDP Sessions". gone, no drama ๐
We recommend that the interval between Hello transmissions be at most one third of the Hello hold time. โฐ
Here's how an LSR processes a received LDP Hello, step by step:
- The LSR checks whether the Hello is acceptable. The criteria for that are implementation dependent (see below for example criteria).
- If the Hello isn't acceptable, the LSR ignores it.
- If the Hello is acceptable, the LSR checks whether it already has a Hello adjacency for the Hello source. If it does, it restarts the hold timer for that Hello adjacency. If it doesn't, it creates a Hello adjacency for the Hello source and starts its hold timer.
- If the Hello carries any optional TLVs, the LSR processes them (see below).
- Finally, if the LSR has no LDP session for the label space specified by the LDP Identifier in the PDU header of the Hello, it follows the procedures of Section "LDP Session Establishment". โจ
Here are some examples of acceptability criteria for Link and Targeted Hellos ๐
A Link Hello is acceptable if the interface it was received on has been configured for label switching.
A Targeted Hello from source address A is acceptable if either:
- The LSR has been configured to accept Targeted Hellos, or
- The LSR has been configured to send Targeted Hellos to A.
And this is how an LSR processes the Hello optional TLVs ๐
Transport Address ๐ The LSR links the specified transport address with the Hello adjacency.
Configuration Sequence Number ๐ The sending LSR uses this optional parameter to signal configuration changes to the receiving LSR. When a receiving LSR that's playing the active role in LDP session establishment notices a change in the sending LSR's configuration, it may clear the session setup backoff delay, if there is one, associated with the sending LSR (see Section "Session Initialization").
A sending LSR that uses this optional parameter is responsible for maintaining the configuration sequence number it puts in Hello messages. Whenever the sending LSR's configuration changes, it increments the configuration sequence number. ๐
3.5.3. Initialization Message ๐
The LDP Initialization message gets swapped as part of the LDP session establishment procedure; see Section "LDP Session Establishment". ๐ค
The encoding for the Initialization message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Initialization (0x0200) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Session Parameters TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ข 32-bit value used to identify this message.
Common Session Parameters TLV ๐ This one specifies the values the sending LSR proposes for the parameters that must be negotiated for every LDP session. The encoding for the Common Session Parameters TLV is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| Common Sess Parms (0x0500)| Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Protocol Version | KeepAlive Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|A|D| Reserved | PVLim | Max PDU Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receiver LDP Identifier |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++
Protocol Version ๐ท๏ธ This is a two octet unsigned integer with the version number of the protocol. This version of the specification is LDP protocol version 1.
KeepAlive Time โฑ๏ธ This is a two octet unsigned non zero integer. It's the number of seconds the sending LSR proposes for the KeepAlive Time. The receiving LSR MUST work out the KeepAlive Timer by using the smaller of its own proposed KeepAlive Time and the KeepAlive Time received in the PDU. The KeepAlive Time is the maximum number of seconds that can pass between receiving successive PDUs from the LDP peer on the session TCP connection. The KeepAlive Timer gets reset every time a PDU arrives. ๐
A, Label Advertisement Discipline ๐ okay so this is the label advertisement type! A value of 0 means Downstream Unsolicited, and 1 means Downstream On Demand. ๐ฆ
If one LSR proposes Downstream Unsolicited and the other proposes Downstream on Demand, here's how the drama gets settled:
- If the session is for a label-controlled ATM link or a label-controlled Frame Relay link, then Downstream on Demand MUST be used. ๐ฅ
- Otherwise, Downstream Unsolicited MUST be used. โจ
If the label advertisement discipline determined this way is unacceptable to an LSR, it MUST send a Session Rejected/Parameters Advertisement Mode Notification message in response to the Initialization message and not establish the session. ๐
D, Loop Detection ๐ธ this one is a yes/no switch for Path Vector loop detection. 0 means it's off and 1 means it's on. Simple but iconic. ๐
PVLim, Path Vector Limit ๐ this is the configured maximum Path Vector length. It MUST be 0 if Loop Detection is disabled (D = 0). If the Loop Detection procedures would make the LSR send a Path Vector longer than this limit, the LSR will behave as if a loop had been detected for the FEC in question. ๐
When Loop Detection is enabled in a portion of a network, it is recommended that all LSRs in that portion be configured with the same Path Vector limit. Knowing a peer's Path Vector limit won't change an LSR's behavior, but it does let the LSR alert an operator to a possible misconfiguration. Bestie, that's a whole safety net! ๐ซถ
Reserved ๐ this field is reserved. It MUST be set to zero on transmission and ignored on receipt. Don't touch it, it's not your problem rn. ๐
Max PDU Length ๐ง this is a two octet unsigned integer that proposes the maximum allowable length for LDP PDUs for the session. A value of 255 or less means the default maximum length of 4096 octets. โญ
The receiving LSR MUST calculate the maximum PDU length for the session by using the smaller of its own proposal and its peer's proposal for Max PDU Length. The default maximum PDU length applies before session initialization completes. ๐
If the maximum PDU length determined this way is unacceptable to an LSR, it MUST send a Session Rejected/Parameters Max PDU Length Notification message in response to the Initialization message and not establish the session. ๐ญ
Receiver LDP Identifier ๐ฆ this identifies the receiver's label space. This LDP Identifier, together with the sender's LDP Identifier in the PDU header, lets the receiver match the Initialization message with one of its Hello adjacencies. See Section "Hello Message Procedures" for the full story. ๐
If there is no matching Hello adjacency, the LSR MUST send a Session Rejected/No Hello Notification message in response to the Initialization message and not establish the session. ๐
Optional Parameters ๐ this variable length field holds 0 or more parameters, and each one is encoded as a TLV. These are the optional parameters:
Optional Parameter Type Length Value
ATM Session Parameters 0x0501 var See below
Frame Relay Session 0x0502 var See below
Parameters
ATM Session Parameters
This one is used when an LDP session manages label exchange for an ATM link, so it can set ATM-specific session parameters. Here's the layout ๐
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| ATM Sess Parms (0x0501) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| M | N |D| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ATM Label Range Component 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ATM Label Range Component N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
M, ATM Merge Capabilities ๐ฅ this specifies the merge capabilities of an ATM switch. These values are supported in this version of the specification:
Value Meaning
0 Merge not supported
1 VP Merge supported
2 VC Merge supported
3 VP & VC Merge supported
If the merge capabilities of the LSRs differ, then:
- Non-merge and VC-merge LSRs may freely interoperate. ๐ซถ
- The interoperability of VP-merge-capable switches with non-VP-merge-capable switches is a subject for future study. When the LSRs differ on the use of VP merge, the session is established, but VP merge is not used. ๐ธ
Note that if VP merge is used, it is the responsibility of the ingress node to ensure that the chosen VCI is unique within the LSR domain. Main character responsibility ๐
N, Number of label range components ๐ this specifies the number of ATM Label Range Components included in the TLV.
D, VC Directionality ๐ฆ a value of 0 specifies bidirectional VC capability. That means the LSR can, within a given VPI, support the use of a given VCI as a label for both link directions independently. A value of 1 specifies unidirectional VC capability. That means, within a given VPI, a given VCI may appear in a label mapping for one direction on the link only. When either or both peers specify unidirectional VC capability, both LSRs use unidirectional VC label assignment for the link, as follows. The LSRs compare their LDP Identifiers as unsigned integers. The LSR with the larger LDP Identifier may assign only odd-numbered VCIs in the VPI/VCI range as labels. The system with the smaller LDP Identifier may assign only even-numbered VCIs in the VPI/VCI range as labels. It's giving tiebreaker energy ๐
Reserved ๐ this field is reserved. It MUST be set to zero on transmission and ignored on receipt.
One or more ATM Label Range Components ๐ this is a list of ATM Label Range Components that together specify the label range supported by the transmitting LSR.
A receiving LSR MUST calculate the intersection between the received range and its own supported label range. The intersection is the range in which the LSR may allocate and accept labels. LSRs MUST NOT establish a session with neighbors for which the intersection of ranges is NULL. In this case, the LSR MUST send a Session Rejected/Parameters Label Range Notification message in response to the Initialization message and not establish the session. ๐ญ
The encoding for an ATM Label Range Component is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Res | Minimum VPI | Minimum VCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Res | Maximum VPI | Maximum VCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Res ๐ง this field is reserved. It MUST be set to zero on transmission and MUST be ignored on receipt.
Minimum VPI (12 bits) โญ this 12-bit field specifies the lower bound of a block of Virtual Path Identifiers that is supported on the originating switch. If the VPI is less than 12 bits, it SHOULD be right justified in this field and preceding bits SHOULD be set to 0.
Minimum VCI (16 bits) ๐ธ this 16-bit field specifies the lower bound of a block of Virtual Channel Identifiers that is supported on the originating switch. If the VCI is less than 16 bits, it SHOULD be right justified in this field and preceding bits SHOULD be set to 0.
Maximum VPI (12 bits) ๐ this 12-bit field specifies the upper bound of a block of Virtual Path Identifiers that is supported on the originating switch. If the VPI is less than 12 bits, it SHOULD be right justified in this field and preceding bits SHOULD be set to 0.
Maximum VCI (16 bits) ๐ซถ this 16-bit field specifies the upper bound of a block of Virtual Connection Identifiers that is supported on the originating switch. If the VCI is less than 16 bits, it SHOULD be right justified in this field and preceding bits SHOULD be set to 0.
When peer LSRs are connected indirectly by means of an ATM VP, the sending LSR SHOULD set the Minimum and Maximum VPI fields to 0, and the receiving LSR MUST ignore the Minimum and Maximum VPI fields. ๐ฆ
Frame Relay Session Parameters
This one is used when an LDP session manages label exchange for a Frame Relay link, so it can set Frame Relay-specific session parameters. โจ
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0| FR Sess Parms (0x0502) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| M | N |D| Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame Relay Label Range Component 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame Relay Label Range Component N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
M, Frame Relay Merge Capabilities ๐ this specifies the merge capabilities of a Frame Relay switch. These values are supported in this version of the specification:
Value Meaning
0 Merge not supported
1 Merge supported
Non-merge and merge Frame Relay LSRs may freely interoperate. Bestie, no drama, no cap! ๐
N, Number of label range components ๐ this specifies the number of Frame Relay Label Range Components included in the TLV. โจ
D, VC Directionality ๐ฆ A value of 0 means bidirectional VC capability, so the LSR can use a given DLCI as a label for both link directions independently. A value of 1 means unidirectional VC capability, so a given DLCI may appear in a label mapping for one direction on the link only. If either or both peers specify unidirectional VC capability, both LSRs use unidirectional VC label assignment for the link. They compare their LDP Identifiers as unsigned integers. The LSR with the larger LDP Identifier may assign only odd-numbered DLCIs in the range as labels. The system with the smaller LDP Identifier may assign only even-numbered DLCIs in the range as labels. โจ
Reserved ๐ธ This field is reserved. It MUST be set to zero on transmission and ignored on receipt.
One or more Frame Relay Label Range Components ๐ This is a list of Frame Relay Label Range Components that together specify the Label range supported by the transmitting LSR.
A receiving LSR MUST calculate the intersection between the received range and its own supported label range. The intersection is the range in which the LSR may allocate and accept labels. LSRs MUST NOT establish a session with neighbors for which the intersection of ranges is NULL. In that case, the LSR MUST send a Session Rejected/Parameters Label Range Notification message in response to the Initialization message and not establish the session. ๐
The encoding for a Frame Relay Label Range Component is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved |Len| Minimum DLCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Maximum DLCI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Reserved ๐ท This field is reserved. It MUST be set to zero on transmission and ignored on receipt.
Len ๐ฆ This field specifies the number of bits of the DLCI. The following values are supported:
Len DLCI Bits
0 10
2 23
Len values 1 and 3 are reserved. ๐
Minimum DLCI ๐ This 23-bit field specifies the lower bound of a block of Data Link Connection Identifiers (DLCIs) that is supported on the originating switch. The DLCI SHOULD be right justified in this field, and unused bits SHOULD be set to 0.
Maximum DLCI ๐ This 23-bit field specifies the upper bound of a block of Data Link Connection Identifiers (DLCIs) that is supported on the originating switch. The DLCI SHOULD be right justified in this field, and unused bits SHOULD be set to 0.
Quick note: there is no Generic Session Parameters TLV for sessions that advertise Generic Labels. ๐ซโจ
3.5.3.1. Initialization Message Procedures ๐ง
See Section "LDP Session Establishment" and particularly Section "Session Initialization" for the general procedures for handling the Initialization message. ๐
3.5.4. KeepAlive Message ๐
An LSR sends KeepAlive messages as part of a mechanism that monitors the integrity of the LDP session transport connection. It's giving heartbeat ๐
The encoding for the KeepAlive message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| KeepAlive (0x0201) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ข This is a 32-bit value used to identify this message.
Optional Parameters ๐ซถ No optional parameters are defined for the KeepAlive message.
3.5.4.1. KeepAlive Message Procedures ๐
The KeepAlive Timer mechanism described in Section "Maintaining LDP Sessions" resets a session KeepAlive Timer every time an LDP PDU is received on the session TCP connection. The KeepAlive message exists so the timer can be reset in situations where an LSR has no other information to communicate to an LDP peer. ๐ฐ๏ธ
An LSR MUST arrange that its peer receive an LDP message from it at least every KeepAlive Time period. Any LDP protocol message will do, but if no other LDP protocol messages have been sent within the period, a KeepAlive message MUST be sent. ๐
3.5.5. Address Message ๐ฌ
An LSR sends the Address message to an LDP peer to advertise its interface addresses. ๐
The encoding for the Address message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Address (0x0300) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Address List TLV |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ข This is a 32-bit value used to identify this message.
Address List TLV ๐ This is the list of interface addresses being advertised by the sending LSR. The encoding for the Address List TLV is specified in Section "Address List TLV".
Optional Parameters ๐ซถ No optional parameters are defined for the Address message.
3.5.5.1. Address Message Procedures ๐
An LSR that receives an Address message uses the addresses it learns to maintain a database for mapping between peer LDP Identifiers and next hop addresses; see Section "LDP Identifiers and Next Hop Addresses". ๐บ๏ธ
When a new LDP session is initialized and before sending Label Mapping or Label Request messages, an LSR SHOULD advertise its interface addresses with one or more Address messages. ๐ฃ
Whenever an LSR "activates" a new interface address, it SHOULD advertise the new address with an Address message. โก
Whenever an LSR "de-activates" a previously advertised address, it SHOULD withdraw the address with an Address Withdraw message; see Section "Address Withdraw Message". ๐
If an LSR does not support the Address Family specified in the Address List TLV, it SHOULD send an Unsupported Address Family Notification to its LDP signaling an error and abort processing the message. ๐จ
An LSR MAY re-advertise an address (A) that it has previously advertised without explicitly withdrawing the address. If the receiver already has address binding (LSR, A), it SHOULD take no further action. ๐
An LSR MAY withdraw an address (A) without having previously advertised it. If the receiver has no address binding (LSR, A), it SHOULD take no further action. ๐ซ
3.5.6. Address Withdraw Message ๐ฆ
An LSR sends the Address Withdraw message to an LDP peer to withdraw previously advertised interface addresses. ๐ โโ๏ธ
The encoding for the Address Withdraw message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Address Withdraw (0x0301) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Address List TLV |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ข This is a 32-bit value used to identify this message.
Address List TLV ๐ This is the list of interface addresses being withdrawn by the sending LSR. The encoding for the Address List TLV is specified in Section "Address List TLV".
Optional Parameters ๐ซถ No optional parameters are defined for the Address Withdraw message.
3.5.6.1. Address Withdraw Message Procedures ๐
See Section "Address Message Procedures". ๐
3.5.7. Label Mapping Message โจ
okay so an LSR sends a Label Mapping message ๐ to an LDP peer to advertise FEC-label bindings to that peer. it's literally the "here's my label, use it" message ๐
The encoding for the Label Mapping message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Label Mapping (0x0400) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ 32-bit value used to identify this message.
FEC TLV ๐งฉ Specifies the FEC component of the FEC-Label mapping being advertised. See Section "FEC TLVs" for encoding.
Label TLV ๐ท๏ธ Specifies the Label component of the FEC-Label mapping. See Section "Label TLV" for encoding.
Optional Parameters ๐ this variable length field holds 0 or more parameters, and every one is encoded as a TLV. the optional parameters are:
Optional Parameter Length Value
Label Request 4 See below
Message ID TLV
Hop Count TLV 1 See below
Path Vector TLV variable See below
the encodings for the Hop Count and Path Vector TLVs live in Section "TLV Encodings for Commonly Used Parameters" ๐
Label Request Message ID ๐ if this Label Mapping message is a response to a Label Request message, it MUST include the Label Request Message ID optional parameter. the value of that parameter is the Message ID of the corresponding Label Request message.
Hop Count ๐ข specifies the running total of the number of LSR hops along the LSP being set up by the Label message. Section "Hop Count Procedures" explains how to handle this TLV.
Path Vector ๐ค๏ธ specifies the LSRs along the LSP being set up by the Label message. Section "Path Vector Procedures" explains how to handle this TLV.
3.5.7.1. Label Mapping Message Procedures ๐
the Mapping message is how an LSR distributes a label mapping for a FEC to an LDP peer ๐ if an LSR hands out a mapping for a FEC to several LDP peers, it's a local call whether it uses one single label for the FEC and sends that to everyone, or whether it uses a different mapping for each peer. both are fine, bestie ๐
an LSR is responsible for the consistency of the label mappings it has distributed, and for making sure its peers actually have those mappings ๐ซถ
an LSR that gets a Label Mapping message from a downstream LSR for a Prefix SHOULD NOT use that label for forwarding unless its routing table has an entry that exactly matches the FEC Element ๐ โโ๏ธ
see Appendix A, "LDP Label Distribution Procedures", for the full tea โ
3.5.7.1.1. Independent Control Mapping ๐ฆ
if an LSR is configured for independent control, it transmits a mapping message whenever any of the following conditions happen:
- The LSR recognizes a new FEC via the forwarding table, and the label advertisement mode is Downstream Unsolicited advertisement.
- The LSR receives a Request message from an upstream peer for a FEC that is present in the LSR's forwarding table.
- The next hop for a FEC changes to another LDP peer, and Loop detection is configured.
- The attributes of a mapping change.
- The LSR receives a mapping from the downstream next hop AND any of these is true:
- a) no upstream mapping has been created OR
- b) loop detection is configured OR
- c) the attributes of the mapping have changed.
3.5.7.1.2. Ordered Control Mapping ๐ธ
if an LSR is doing Ordered Control, downstream LSRs transmit a Mapping message whenever any of the following conditions happen:
- The LSR recognizes a new FEC via the forwarding table and is the egress for that FEC.
- The LSR receives a Request message from an upstream peer for a FEC that is present in the LSR's forwarding table, and the LSR is the egress for that FEC OR has a downstream mapping for that FEC.
- The next hop for a FEC changes to another LDP peer, and Loop Detection is configured.
- The attributes of a mapping change.
- The LSR receives a mapping from the downstream next hop AND any of these is true:
- a) no upstream mapping has been created OR
- b) Loop Detection is configured OR
- c) the attributes of the mapping have changed.
3.5.7.1.3. Downstream on Demand Label Advertisement ๐ง
usually the upstream LSR is the one in charge of requesting label mappings when things are running in Downstream on Demand mode. BUT there's a catch ๐ if you don't follow some rules, neighboring LSRs with different advertisement modes can get stuck in a livelock. everything looks like it's working fine, but no labels ever get distributed ๐
say we have two LSRs, Ru and Rd, where Ru is the upstream LSR and Rd is the downstream LSR for a particular FEC. Ru is using Downstream Unsolicited advertisement mode and Rd is using Downstream on Demand mode. in this setup, Rd may assume Ru will request a label mapping when it wants one, and Ru may assume Rd will advertise a label if it wants Ru to use one. if Rd and Ru both act like that, no labels get distributed from Rd to Ru. it's giving awkward standoff ๐ญ
the fix is to follow this rule: an LSR operating in Downstream on Demand mode SHOULD NOT be expected to send unsolicited mapping advertisements. so if the downstream LSR is in Downstream on Demand mode, the upstream LSR is responsible for requesting label mappings as needed ๐
3.5.7.1.4. Downstream Unsolicited Label Advertisement ๐
in general, the downstream LSR is the one responsible for advertising a label mapping when it wants an upstream LSR to use that label. an upstream LSR can still send a mapping request if it wants one ๐
okay this part is a little spicy ๐ถ๏ธ combining Downstream Unsolicited mode with Conservative Label retention can lead to an LSR releasing a label for a FEC that it later needs. for example, if LSR Rd advertises to LSR Ru the label for a FEC where Rd isn't Ru's next hop, then Ru will release that label. but if Ru's next hop for the FEC changes to Rd later on, Ru needs that previously released label again ๐ฌ
so to handle this, either Ru can explicitly request the label when it needs it, or Rd can periodically re-advertise it to Ru. often Ru will know when it needs the label from Rd, for example when its next hop for the FEC changes to Rd. but sometimes Ru won't know. say Rd is trying to set up an LSP with non-standard properties. making Ru explicitly request the label in that case would force Ru to keep state about a potential LSP with non-standard properties, and nobody wants that ๐ โโ๏ธ
so: in situations where Ru knows it needs the label, Ru is responsible for explicitly requesting it with a Label Request message. in situations where Ru might not know it needs the label, Rd is responsible for periodically re-advertising the label to Ru ๐
for this version of LDP, the ONLY situation where Ru knows it needs a label for a FEC from Rd is when Rd is its next hop for the FEC, Ru doesn't have a label from Rd, and the LSP for the FEC is one that can be established with TLVs defined in this document โจ
3.5.8. Label Request Message ๐โโ๏ธ
an LSR sends the Label Request message to an LDP peer when it wants to request a binding (mapping) for a FEC ๐ญ
The encoding for the Label Request message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Label Request (0x0401) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Message ID ๐ 32-bit value used to identify this message.
FEC TLV ๐งฉ the FEC for which a label is being requested. See Section "FEC TLV" for encoding.
Optional Parameters ๐ this variable length field holds 0 or more parameters, and every one is encoded as a TLV. the optional parameters are:
Optional Parameter Length Value
Hop Count TLV 1 See below
Path Vector TLV variable See below
the encodings for the Hop Count and Path Vector TLVs live in Section "TLV Encodings for Commonly Used Parameters" ๐
Hop Count ๐ข specifies the running total of the number of LSR hops along the LSP being set up by the Label Request message. Section "Hop Count Procedures" explains how to handle this TLV.
Path Vector ๐ค๏ธ specifies the LSRs along the LSR being set up by the Label Request message. Section "Path Vector Procedures" explains how to handle this TLV.
3.5.8.1. Label Request Message Procedures ๐ฌ
Okay so the Request message is basically an upstream LSR going "hey downstream bestie, pls assign and advertise a label for this FEC, thx ๐ฅบ๐"
An LSR may transmit a Request message under any of the following conditions:
- The LSR recognizes a new FEC via the forwarding table, and the next hop is an LDP peer, and the LSR doesn't already have a mapping from the next hop for the given FEC.
- The next hop to the FEC changes, and the LSR doesn't already have a mapping from that next hop for the given FEC.
Note that if the LSR already has a pending Label Request message for the new next hop, it SHOULD NOT issue an additional Label Request in response to the next hop change. ๐ โโ๏ธ
- The LSR receives a Label Request for a FEC from an upstream LDP peer, the FEC next hop is an LDP peer, and the LSR doesn't already have a mapping from the next hop.
Note that since a non-merge LSR must set up a separate LSP for each upstream peer requesting a label, it must send a separate Label Request for each such peer. A consequence of this is that a non-merge LSR may have multiple Label Request messages for a given FEC outstanding at the same time. ๐งต
The receiving LSR SHOULD respond to a Label Request message with a Label Mapping for the requested label or with a Notification message indicating why it cannot satisfy the request. โจ
When the FEC for which a label is requested is a Prefix FEC Element, the receiving LSR uses its routing table to determine its response. Unless its routing table includes an entry that exactly matches the requested Prefix, the LSR MUST respond with a No Route Notification message. ๐บ๏ธ
The message ID of the Label Request message serves as an identifier for the Label Request transaction. When the receiving LSR responds with a Label Mapping message, the mapping message MUST include a Label Request/Returned Message ID TLV optional parameter that includes the message ID of the Label Request message. Note that since LSRs use Label Request message IDs as transaction identifiers, an LSR SHOULD NOT reuse the message ID of a Label Request message until the corresponding transaction completes. ๐
This version of the protocol defines the following Status Codes for the Notification message that signals a request cannot be satisfied:
- No Route: The FEC for which a label was requested includes a FEC Element for which the LSR does not have a route. ๐
- No Label Resources: The LSR cannot provide a label because of resource limitations. When resources become available, the LSR MUST notify the requesting LSR by sending a Notification message with the Label Resources Available Status Code.
An LSR that receives a No Label Resources response to a Label Request message MUST NOT issue further Label Request messages until it receives a Notification message with the Label Resources Available Status Code. ๐ฎโ๐จ
- Loop Detected: The LSR has detected a looping Label Request message. ๐
See Appendix A, "LDP Label Distribution Procedures", for more details. ๐
3.5.9. Label Abort Request Message ๐
The Label Abort Request message may be used to abort an outstanding Label Request message.
The encoding for the Label Abort Request message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Label Abort Req (0x0404) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label Request Message ID TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Message ID: 32-bit value used to identify this message.
- FEC TLV: Identifies the FEC for which the Label Request is being aborted.
- Label Request Message ID TLV: Specifies the message ID of the Label Request message to be aborted.
- Optional Parameters: No optional parameters are defined for the Label Abort Req message.
3.5.9.1. Label Abort Request Message Procedures ๐ช
An LSR Ru may send a Label Abort Request message to abort an outstanding Label Request message for a FEC sent to an LSR Rd in the following circumstances:
- Ru's next hop for the FEC has changed from LSR Rd to LSR X; or
- Ru is a non-merge, non-ingress LSR and has received a Label Abort Request for the FEC from an upstream peer Y.
- Ru is a merge, non-ingress LSR and has received a Label Abort Request for the FEC from an upstream peer Y and Y is the only (last) upstream LSR requesting a label for the FEC.
There may be other situations where an LSR may choose to abort an outstanding Label Request message in order to reclaim resource associated with the pending LSP. However, specification of general strategies for using the abort mechanism is beyond the scope of LDP. ๐คทโโ๏ธ
When an LSR receives a Label Abort Request message, if it has not previously responded to the Label Request being aborted with a Label Mapping message or some other Notification message, it MUST acknowledge the abort by responding with a Label Request Aborted Notification message. The Notification MUST include a Label Request Message ID TLV that carries the message ID of the aborted Label Request message. ๐
If an LSR receives a Label Abort Request Message after it has responded to the Label Request in question with a Label Mapping message or a Notification message, it ignores the abort request. ๐
If an LSR receives a Label Mapping message in response to a Label Request message after it has sent a Label Abort Request message to abort the Label Request, the label in the Label Mapping message is valid. The LSR may choose to use the label or to release it with a Label Release message. ๐ท๏ธ
An LSR aborting a Label Request message may not reuse the Message ID for the Label Request message until it receives one of the following from its peer:
- A Label Request Aborted Notification message acknowledging the abort;
- A Label Mapping message in response to the Label Request message being aborted;
- A Notification message in response to the Label Request message being aborted (e.g., Loop Detected, No Label Resources, etc.).
To protect itself against tardy peers or faulty peer implementations an LSR may choose to time out receipt of the above. The timeout period should be relatively long (several minutes). If the timeout period elapses with no reply from the peer, the LSR may reuse the Message ID of the Label Request message; if it does so, it should also discard any record of the outstanding Label Request and Label Abort messages. โณ
Note that the response to a Label Abort Request message is never "ordered". That is, the response does not depend on the downstream state of the LSP setup being aborted. An LSR receiving a Label Abort Request message MUST process it immediately, regardless of the downstream state of the LSP, responding with a Label Request Aborted Notification or ignoring it, as appropriate. โก
3.5.10. Label Withdraw Message ๐
An LSR sends a Label Withdraw Message to an LDP peer to signal the peer that the peer may not continue to use specific FEC-label mappings the LSR had previously advertised. This breaks the mapping between the FECs and the labels. ๐
The encoding for the Label Withdraw Message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Label Withdraw (0x0402) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label TLV (optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- Message ID: 32-bit value used to identify this message.
- FEC TLV: Identifies the FEC for which the FEC-label mapping is being withdrawn.
- Optional Parameters: This variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters are:
Optional Parameter Length Value
Label TLV variable See below
The encoding for Label TLVs are found in Section "Label TLVs".
- Label: If present, specifies the label being withdrawn (see procedures below). ๐
3.5.10.1. Label Withdraw Message Procedures ๐ซง
An LSR transmits a Label Withdraw message under the following conditions:
- The LSR no longer recognizes a previously known FEC for which it has advertised a label.
- The LSR has decided unilaterally (e.g., via configuration) to no longer label switch a FEC (or FECs) with the label mapping being withdrawn.
The FEC TLV specifies the FEC for which labels are to be withdrawn. If no Label TLV follows the FEC, all labels associated with the FEC are to be withdrawn; otherwise, only the label specified in the optional Label TLV is to be withdrawn. ๐ซถ
The FEC TLV may contain the Wildcard FEC Element; if so, it may contain no other FEC Elements. In this case, if the Label Withdraw message contains an optional Label TLV, then the label is to be withdrawn from all FECs to which it is bound. If there is not an optional Label TLV in the Label Withdraw message, then the sending LSR is withdrawing all label mappings previously advertised to the receiving LSR. ๐
An LSR that receives a Label Withdraw message MUST respond with a Label Release message. ๐
See Appendix A, "LDP Label Distribution Procedures", for more details. โจ
3.5.11. Label Release Message ๐ฆ
okay so an LSR sends a Label Release message to its LDP peer to say "hey, I don't need those specific FEC-label mappings anymore" ๐ซถ The mappings in question are ones I asked the peer for and/or ones the peer sent me. Literally just cleaning up the group chat. ๐งน
The encoding for the Label Release Message is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0| Label Release (0x0403) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FEC TLV |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Label TLV (optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Optional Parameters |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Let's break the fields down, bestie โจ
Message ID ๐ A 32-bit value that identifies this message.
FEC TLV ๐ฏ Says which FEC the FEC-label mapping is being released for.
Optional Parameters ๐ A variable length field with 0 or more parameters, each one encoded as a TLV. The only optional parameter is:
Optional Parameter Length Value
Label TLV variable See below
The encodings for Label TLVs live in Section "Label TLVs". ๐
Label ๐ท๏ธ If it's present, this is the label being released (more on that in the procedures below).
3.5.11.1. Label Release Message Procedures ๐
An LSR transmits a Label Release message to a peer when it no longer needs a label it got from that peer or asked that peer for. Simple, iconic behaviour. ๐
An LSR MUST transmit a Label Release message under any of the following conditions:
- The LSR that sent the label mapping is no longer the next hop for the mapped FEC, and the LSR is configured for conservative operation.
- The LSR receives a label mapping from an LSR that is not the next hop for the FEC, and the LSR is configured for conservative operation.
- The LSR receives a Label Withdraw message.
Plot twist ๐ If an LSR is configured for "liberal mode", a release message will never be transmitted for conditions (1) and (2) above. Instead the upstream LSR keeps each unused label, so it can be used right away later if the downstream peer becomes the next hop for the FEC. Main character energy for labels, no cap. ๐ง
The FEC TLV says which FEC the labels are being released for. If there's no Label TLV after the FEC, then all labels tied to that FEC get released. If there is a Label TLV, then only the label in that optional Label TLV gets released. ๐ซง
The FEC TLV may contain the Wildcard FEC Element. If it does, it can't contain any other FEC Elements. In that case:
- If the Label Release message has an optional Label TLV, the label is released for all FECs it's bound to.
- If there's no optional Label TLV in the Label Release message, the sending LSR is releasing all label mappings it previously learned from the receiving LSR. Full clean slate, periodt. ๐
See Appendix A, "LDP Label Distribution Procedures", for more details. ๐
3.6. Messages and TLVs for Extensibility ๐
Support for LDP extensibility includes the rules for the U- and F-bits that say how an LSR handles unknown TLVs and messages. It's giving "how do we handle the stuff we don't recognise" ๐คทโโ๏ธ
This section specifies TLVs and messages for vendor-private and experimental use. โจ
3.6.1. LDP Vendor-Private Extensions ๐
Vendor-private TLVs and messages are used to pass vendor-private information between LSRs. Private vibes only. ๐
3.6.1.1. LDP Vendor-Private TLVs ๐
The Type range 0x3E00 through 0x3EFF is reserved for vendor-private TLVs. ๐
The encoding for a vendor-private TLV is:
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|F| Type (0x3E00-0x3EFF) | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Data.... |
~ ~
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Here's the tea on each field ๐ซ
U-bit ๐จ The Unknown TLV bit. When an unknown TLV comes in, if U is clear (=0), a notification MUST be returned to the message originator and the entire message MUST be ignored. If U is set (=1), the unknown TLV is silently ignored and the rest of the message is processed as if the unknown TLV never existed. Lowkey the most chill option. ๐
Whether a vendor-private message is understood is based on the Type and the mandatory Vendor ID field. ๐
Implementations that support vendor-private TLVs MUST support a user-accessible configuration interface that sets the U-bit on all transmitted vendor-private TLVs. This requirement MAY be satisfied by a user-accessible configuration interface that prevents transmission of all vendor-private TLVs for which the U-bit is clear. Options, options, options. ๐
F-bit ๐ The Forward unknown TLV bit. This only applies when the U-bit is set and the LDP message containing the unknown TLV is going to be forwarded. If F is clear (=0), the unknown TLV is not forwarded with the containing message. If F is set (=1), it is forwarded with the containing message. ๐จ
Type ๐ท๏ธ A Type value in the range 0x3E00 through 0x3EFF. Together, the Type and Vendor ID field tell you how the Data field is meant to be read. ๐ฏ
Length ๐ The cumulative length in octets of the Vendor ID and Data fields. ๐งฎ
Vendor ID ๐ข A 802 Vendor ID as assigned by the IEEE. ๐ชช
Data ๐ฆ Whatever octets come after the Vendor ID in the Value field. These are optional, vendor-dependent bits. ๐
3.6.1.2. LDP Vendor-Private Messages ๐ธ
The Message Type range 0x3E00 through 0x3EFF is reserved for Vendor-Private messages. ๐ธ
0 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U| Msg Type (0x3E00-0x3EFF) | Message Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Vendor ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +
| Remaining Mandatory Parameters |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Optional Parameters |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
U-bit ๐จ The Unknown message bit. When an unknown message comes in, if U is clear (=0), a notification is returned to the message originator. If U is set (=1), the unknown message is silently ignored.
Whether a Vendor-Private message is understood is based on the Msg Type and the Vendor ID parameter. ๐
Implementations that support Vendor-Private messages MUST support a user-accessible configuration interface that sets the U-bit on all transmitted Vendor-Private messages. This requirement MAY be satisfied by a user-accessible configuration interface that prevents transmission of all Vendor-Private messages for which the U-bit is clear. ๐ซถ
Msg Type ๐ท๏ธ A Message Type value in the range 0x3E00 through 0x3EFF. Together, the Msg Type and the Vendor ID specify how the message is to be interpreted. ๐งฉ
Message Length ๐ The cumulative length in octets of the Message ID, Vendor ID, Remaining Mandatory Parameters, and Optional Parameters. ๐งฎ
Message ID ๐ A 32-bit integer that identifies this message. The sending LSR uses it to help figure out which Notification messages might apply to this message. An LSR that sends a Notification message in response to this message includes this Message ID in the notification message. See Section "Notification Message". ๐
Vendor ID ๐ข A 802 Vendor ID as assigned by the IEEE. ๐ชช
Remaining Mandatory Parameters ๐ A variable length set of the remaining required message parameters. ๐ผ
Optional Parameters ๐ A variable length set of optional message parameters. Extra cute, extra optional. ๐ท
3.6.2. LDP Experimental Extensions ๐งช
LDP support for experimentation is a lot like support for vendor-private extensions, with the following differences:
- The Type range 0x3F00 through 0x3FFF is reserved for experimental TLVs.
- The Message Type range 0x3F00 through 0x3FFF is reserved for experimental messages.
- The encodings for experimental TLVs and messages are similar to the vendor-private encodings, with one difference. Experimental TLVs and messages use an Experiment ID field in place of a Vendor ID field. The Experiment ID field is used together with the Type or Message Type field to specify how the experimental TLV or message is interpreted.
Administration of Experiment IDs is the responsibility of the experimenters. ๐งโ๐ฌโจ
3.7. Message Summary ๐
The following are the LDP messages defined in this version of the protocol. Here's the full cheat sheet ๐
Message Name Type Section Title
Notification 0x0001 "Notification Message"
Hello 0x0100 "Hello Message"
Initialization 0x0200 "Initialization Message"
KeepAlive 0x0201 "KeepAlive Message"
Address 0x0300 "Address Message"
Address Withdraw 0x0301 "Address Withdraw Message"
Label Mapping 0x0400 "Label Mapping Message"
Label Request 0x0401 "Label Request Message"
Label Withdraw 0x0402 "Label Withdraw Message"
Label Release 0x0403 "Label Release Message"
Label Abort Request 0x0404 "Label Abort Request Message"
Vendor-Private 0x3E00- "LDP Vendor-Private Extensions"
0x3EFF
Experimental 0x3F00- "LDP Experimental Extensions"
0x3FFF
3.8. TLV Summary ๐
Okay bestie, here's every TLV defined in this version of the protocol, all lined up pretty for you ๐
TLV Type Section Title
FEC 0x0100 "FEC TLV"
Address List 0x0101 "Address List TLV"
Hop Count 0x0103 "Hop Count TLV"
Path Vector 0x0104 "Path Vector TLV"
Generic Label 0x0200 "Generic Label TLV"
ATM Label 0x0201 "ATM Label TLV"
Frame Relay Label 0x0202 "Frame Relay Label TLV"
Status 0x0300 "Status TLV"
Extended Status 0x0301 "Notification Message"
Returned PDU 0x0302 "Notification Message"
Returned Message 0x0303 "Notification Message"
Common Hello 0x0400 "Hello Message"
Parameters
IPv4 Transport Address 0x0401 "Hello Message"
Configuration 0x0402 "Hello Message"
Sequence Number
IPv6 Transport Address 0x0403 "Hello Message"
Common Session 0x0500 "Initialization Message"
Parameters
ATM Session Parameters 0x0501 "Initialization Message"
Frame Relay Session 0x0502 "Initialization Message"
Parameters
Label Request 0x0600 "Label Mapping Message"
Message ID
Vendor-Private 0x3E00- "LDP Vendor-Private Extensions"
0x3EFF
Experimental 0x3F00- "LDP Experimental Extensions"
0x3FFF
3.9. Status Code Summary ๐ธ
Now the Status Codes defined in this version of the protocol ๐ฅ
The "E" column is the required setting of the Status Code E-bit, and the "Status Data" column is the value of the 30-bit Status Data field in the Status Code TLV. Note that the setting of the Status Code F-bit is at the discretion of the LSR originating the Status TLV. ๐
Status Code E Status Data Section Title
Success 0 0x00000000 "Status TLV"
Bad LDP Identifier 1 0x00000001 "Events Signaled by ..."
Bad Protocol Version 1 0x00000002 "Events Signaled by ..."
Bad PDU Length 1 0x00000003 "Events Signaled by ..."
Unknown Message Type 0 0x00000004 "Events Signaled by ..."
Bad Message Length 1 0x00000005 "Events Signaled by ..."
Unknown TLV 0 0x00000006 "Events Signaled by ..."
Bad TLV Length 1 0x00000007 "Events Signaled by ..."
Malformed TLV Value 1 0x00000008 "Events Signaled by ..."
Hold Timer Expired 1 0x00000009 "Events Signaled by ..."
Shutdown 1 0x0000000A "Events Signaled by ..."
Loop Detected 0 0x0000000B "Loop Detection"
Unknown FEC 0 0x0000000C "FEC Procedures"
No Route 0 0x0000000D "Label Request Mess ..."
No Label Resources 0 0x0000000E "Label Request Mess ..."
Label Resources / 0 0x0000000F "Label Request Mess ..."
Available
Session Rejected/ 1 0x00000010 "Session Initialization"
No Hello
Session Rejected/ 1 0x00000011 "Session Initialization"
Parameters Advertisement Mode
Session Rejected/ 1 0x00000012 "Session Initialization"
Parameters Max PDU Length
Session Rejected/ 1 0x00000013 "Session Initialization"
Parameters Label Range
KeepAlive Timer 1 0x00000014 "Events Signaled by ..."
Expired
Label Request Aborted 0 0x00000015 "Label Abort Request ..."
Missing Message 0 0x00000016 "Events Signaled by ..."
Parameters
Unsupported Address 0 0x00000017 "FEC Procedures"
Family "Address Message Proc ..."
Session Rejected/ 1 0x00000018 "Session Initialization"
Bad KeepAlive Time
Internal Error 1 0x00000019 "Events Signaled by ..."
3.10. Well-Known Numbers โจ
3.10.1. UDP and TCP Ports ๐ฆ
The UDP port for LDP Hello messages is 646. ๐
The TCP port for establishing LDP session connections is 646. ๐ง
3.10.2. Implicit NULL Label ๐
The Implicit NULL label is defined in [RFC3031], and it goes like this:
"The Implicit NULL label is a label with special semantics which an LSR can bind to an address prefix. If LSR Ru, by consulting its ILM (Incoming Label Map) sees that labeled packet P must be forwarded next to Rd, but that Rd has distributed a binding of Implicit NULL to the corresponding address prefix, then instead of replacing the value of the label on top of the label stack, Ru pops the label stack, and then forwards the resulting packet to Rd."
The implicit NULL label is represented in LDP as a Generic Label TLV with a Label field value of 3, as defined in [RFC3032]. ๐ซถ
4. IANA Considerations ๐
LDP defines the following name spaces that require management, so IANA has some work to do ๐
- Message Type Name Space
- TLV Type Name Space
- FEC Type Name Space
- Status Code Name Space
- Experiment ID Name Space
The following sections provide guidelines for managing these name spaces. โจ
4.1. Message Type Name Space ๐ฆ
LDP divides the name space for message types into three ranges. The following are the guidelines for managing these ranges:
- Message Types 0x0000 - 0x3DFF. Message types in this range are part of the LDP base protocol. Following the policies outlined in [IANA], Message types in this range are allocated through an IETF Consensus action.
- Message Types 0x3E00 - 0x3EFF. Message types in this range are reserved for Vendor-Private extensions and are the responsibility of the individual vendors (see Section "LDP Vendor-Private Messages"). IANA management of this range of the Message Type Name Space is unnecessary.
- Message Types 0x3F00 - 0x3FFF. Message types in this range are reserved for Experimental extensions and are the responsibility of the individual experimenters (see Sections "LDP Experimental Extensions" and "Experiment ID Name Space"). IANA management of this range of the Message Type Name Space is unnecessary; however, IANA is responsible for managing part of the Experiment ID Name Space (see below).
4.2. TLV Type Name Space ๐
LDP divides the name space for TLV types into three ranges. The following are the guidelines for managing these ranges:
- TLV Types 0x0000 - 0x3DFF. TLV types in this range are part of the LDP base protocol. Following the policies outlined in [IANA], TLV types in this range are allocated through an IETF Consensus action.
- TLV Types 0x3E00 - 0x3EFF. TLV types in this range are reserved for Vendor-Private extensions and are the responsibility of the individual vendors (see Section "LDP Vendor-Private TLVs"). IANA management of this range of the TLV Type Name Space is unnecessary.
- TLV Types 0x3F00 - 0x3FFF. TLV types in this range are reserved for Experimental extensions and are the responsibility of the individual experimenters (see Sections "LDP Experimental Extensions" and "Experiment ID Name Space"). IANA management of this range of the TLV Name Space is unnecessary; however, IANA is responsible for managing part of the Experiment ID Name Space (see below).
4.3. FEC Type Name Space ๐
The range for FEC types is 0 - 255.
Following the policies outlined in [IANA], FEC types in the range 0 - 127 are allocated through an IETF Consensus action, types in the range 128 - 191 are allocated as First Come First Served, and types in the range 192 - 255 are reserved for Private Use. ๐ฅ
4.4. Status Code Name Space โญ
The range for Status Codes is 0x00000000 - 0x3FFFFFFF.
Following the policies outlined in [IANA], Status Codes in the range 0x00000000 - 0x1FFFFFFF are allocated through an IETF Consensus action, codes in the range 0x20000000 - 0x3EFFFFFF are allocated as First Come First Served, and codes in the range 0x3F000000 - 0x3FFFFFFF are reserved for Private Use. ๐
4.5. Experiment ID Name Space ๐ง
The range for Experiment IDs is 0x00000000 - 0xffffffff.
Following the policies outlined in [IANA], Experiment IDs in the range 0x00000000 - 0xefffffff are allocated as First Come First Served and Experiment IDs in the range 0xf0000000 - 0xffffffff are reserved for Private Use. ๐
5. Security Considerations ๐ญ
This section identifies threats to which LDP may be vulnerable and discusses means by which those threats might be mitigated. Okay, this part is serious, so pay attention ๐
5.1. Spoofing ๐
There are two types of LDP communication that could be the target of a spoofing attack. ๐ฅ
- Discovery exchanges carried by UDP
LSRs indicate their willingness to establish and maintain LDP sessions by periodically sending Hello messages. Receipt of a Hello serves to create a new "Hello adjacency", if one does not already exist, or to refresh an existing one. Spoofing a Hello packet for an existing adjacency can cause the adjacency to time out, and that can result in termination of the associated session. This can occur when the spoofed Hello specifies a small Hold Time, causing the receiver to expect Hellos within this interval, while the true neighbor continues sending Hellos at the lower, previously agreed to, frequency.
LSRs directly connected at the link level exchange Basic Hello messages over the link. The threat of spoofed Basic Hellos can be reduced by:
- Accepting Basic Hellos only on interfaces to which LSRs that can be trusted are directly connected.
- Ignoring Basic Hellos not addressed to the All Routers on this Subnet multicast group.
LSRs not directly connected at the link level may use Extended Hello messages to indicate willingness to establish an LDP session. An LSR can reduce the threat of spoofed Extended Hellos by filtering them and accepting only those originating at sources permitted by an access list.
- Session communication carried by TCP
LDP specifies use of the TCP MD5 Signature Option to provide for the authenticity and integrity of session messages.
[RFC2385] asserts that MD5 authentication is now considered by some to be too weak for this application. It also points out that a similar TCP option with a stronger hashing algorithm (it cites SHA-1 as an example) could be deployed. To our knowledge, no such TCP option has been defined and deployed. However, we note that LDP can use whatever TCP message digest techniques are available, and when one stronger than MD5 is specified and implemented, upgrading LDP to use it would be relatively straightforward. ๐ฆ
5.2. Privacy ๐
okay so LDP has no mechanism for protecting the privacy of label distribution ๐ญ that's the tea. the security needs of label distribution protocols are basically the same as the ones for the protocols that spread routing info, so LDP gives you a level of security that's at least as good as, but no better than, what the routing protocols can already give you ๐ the bigger question of whether routing protocols should need privacy is out of scope for this doc, so that's a whole other convo ๐ซถ
one might argue label distribution needs privacy to stop label spoofing ๐ but nope, that privacy wouldn't even help, bc data packets carry their labels in the clear. and label spoofing can happen without knowing the FEC bound to a label, so privacy wouldn't stop that either ๐
to avoid label spoofing, you need to make sure labeled data packets get labeled by trusted LSRs, and that the labels on those packets were properly learned by the LSRs doing the labeling โจ
5.3. Denial of Service ๐ฅ
okay this part is giving serious "protect your house" energy ๐ฐ LDP has two potential targets for Denial of Service (DoS) attacks:
- Well-known UDP Port for LDP Discovery ๐ก
an LSR admin can handle the DoS threat from Basic Hellos by making sure the LSR is only directly connected to peers that can be trusted not to start that kind of attack ๐ก๏ธ interfaces to peers inside the admin's domain shouldn't be a threat, bc interior peers are under the admin's control. interfaces to peers outside the domain are a potential threat bc exterior peers aren't under that control. the admin can lower that risk by connecting the LSR only to exterior peers that can be trusted not to start a Basic Hello attack ๐ซถ
DoS attacks via Extended Hellos are potentially a more serious threat ๐ฌ you can deal with this by filtering Extended Hellos using access lists that define the addresses where Extended Discovery is permitted. the catch is that filtering costs LSR resources ๐ฅฒ
in an environment where you can identify a trusted MPLS cloud, LSRs at the edge of the cloud can protect the interior LSRs from DoS attacks via Extended Hellos. they do this by filtering out Extended Hellos that come from outside the trusted MPLS cloud, and only accepting the ones from addresses permitted by access lists ๐ง this filtering protects the LSRs in the interior of the cloud, but it uses up resources at the edges ๐
- Well-known TCP port for LDP Session Establishment ๐
like other control plane protocols that use TCP, LDP can be a target of DoS attacks, such as SYN attacks ๐ LDP is no more or less vulnerable to these than any other control plane protocol that uses TCP, so it's not like it's special in either direction ๐
the threat of these attacks can be eased a bit by doing the following:
- An LSR SHOULD avoid promiscuous TCP listens for LDP session establishment. It SHOULD use only listens that are specific to discovered peers. This lets it drop attack packets early in their processing, since they're less likely to match existing or in-progress connections ๐ฏ
- Using the MD5 option helps somewhat, since it stops a SYN from being accepted unless the MD5 segment checksum is valid. However, the receiver has to compute the checksum before it can decide to discard an otherwise acceptable SYN segment ๐งฎ
- Using access list mechanisms at the boundary of the MPLS cloud, in a way similar to the one suggested above for Extended Hellos, can protect the interior against attacks coming from outside the cloud ๐ฐ
6. Areas for Future Study โจ
okay these are the topics this version of LDP does NOT address, so they're the big "maybe later" pile ๐ฎ the following are possible areas for future study:
- Section 2.16 of the MPLS architecture [RFC3031] requires that the initial label distribution protocol negotiation between peer LSRs enable each LSR to determine whether its peer is capable of popping the label stack. This version of LDP assumes that LSRs support label popping for all link types except ATM and Frame Relay. A future version may specify means to make this determination part of the session initiation negotiation ๐
- LDP support for CoS (Class of Service) is not specified in this version. CoS support may be addressed in a future version ๐
- LDP support for multicast is not specified in this version. Multicast support may be addressed in a future version ๐ฃ
- LDP support for multipath label switching is not specified in this version. Multipath support may be addressed in a future version ๐ค๏ธ
- LDP support for signaling the maximum transmission unit is not specified in this version. It is discussed in the experimental document [LDP-MTU] ๐งช
- The current specification does not address basic peer discovery on Non-Broadcast Multi-Access (NBMA) media. The solution available in the current specification is to use extended peer discovery in such setups. The issue of defining a mechanism semantically similar to Basic Discovery (1 hop limit, bind the hello adjacency to an interface) that uses preconfigured neighbor addresses is left for further study ๐
- The current specification does not support shutting down an adjacency. The motivation for doing it and the mechanisms for achieving it are left for further study ๐ช
- The current specification does not include a method for securing Hello messages, to detect spoofing of Hellos. The scenarios where this is necessary, as well as the mechanism for achieving it, are left for future study ๐ต๏ธ
- The current specification does not have the ability to detect a stateless fast control plane restart. The method for achieving this, possibly through an "incarnation/instance" number carried in the Hello message, is left for future study ๐
- The current specification does not support an "end of LIB" message, analogous to BGP's "end of RIB" message that an LDP LSR (operating in DU mode) would use following session establishment. The discussion on the need for such a mechanism and its implementation is left for future study ๐ญ
- The current specification does not deal with situations where different LSRs advertise the same address. Such situations typically occur as the result of configuration errors, and the goal in this case is to provide the LSRs advertising the same address with enough information to enable operators to take corrective action. The specification of this mechanism is left for a separate document ๐จ
7. Changes from RFC 3036 ๐
okay so here's the glow-up list ๐ช these are the changes from RFC 3036:
- Removed the Host Address FEC and references to it, since it is not used by any implementation ๐งน
- Split the reference list into normative and informative references ๐
- Removed "MPLS using ATM VP Switching" from the list of normative references, and references to it ๐๏ธ
- Removed reference to RFC 1700 and replaced it with a link to
http://www.iana.org/assignments/address-family-numbers๐ - Removed reference to RFC 1771 and replaced it with a reference to RFC 4271 ๐
- Clarified the use of the F-bit ๐ฉ
- Added option to allow split horizon when doing Ordered Control โ๏ธ
- Clarified the processing of messages with the U-bit set during the session initialization procedures ๐ง
- Clarified the processing of the E-bit during session initialization procedures ๐ง
- Added text explaining that the Shutdown message in the state transition diagram is implemented as a notification message with a Status TLV indicating a fatal error ๐
- Added case for TLV length too short in the specification for handling malformed TLVs ๐
- Explained the security threat posed by hello spoofing ๐ต๏ธโโ๏ธ
- Added reference to 4271 and 4278 and text for standards maturity variance with regards to the MD5 option ๐
- Added text from 3031 explaining the handling of implicit NULL label ๐ซฅ
- Included the encoding of DLCIs to remove normative reference to 3034 ๐ฏ
- Moved references to 3031, 3032, and 3034 to informative ๐
- In the section describing handling of unknown TLV, removed reference to inexistent section (errata in original document) ๐งผ
- Added text clarifying how to achieve interoperability when sending vendor-private TLVs and messages ๐ค
- In the "receive label request" procedures, if a loop is detected, changed the procedure to send a notification before aborting the rest of the processing ๐
- In "receive label release" procedures, clarified the behavior for merge-capable LSRs ๐งฉ
- In "receive label release" procedures, clarified the behavior for receipt of an unknown FEC โ
- In note 4 of "Detect Change in FEC Next Hop", modified the text to reference the correct set of conditions for sending a label request procedure (typo in the original document) โ๏ธ
- In the procedures for "LSR decides to no longer label switch a FEC", clarified the fact that the label must not be reused until a label release is received ๐ท๏ธ
- In the routine "Prepare_Label_Mapping_Attributes", added a note regarding the treatment of unknown TLVs according to their U and F-bits ๐
- In the Address message processing procedures, clarified the behavior for the case where an LSR receives re-advertisement of an address previously advertised by it, or withdrawal of an address from an LSR that has not previously advertised that address ๐ฌ
- In the routine "Receive Label Mapping", clarified the meaning of PrevAdvLabel when no label advertisement message has been sent previously ๐ง
- In the "Receive Label Mapping" procedures, if a loop is detected, modified the procedure to send a notification before aborting the rest of the processing ๐
- In the "Receive Label Mapping" procedures, corrected step LMp.10 to handle label mapping messages for additional (non-merged) LSPs for the FEC ๐ ๏ธ
- In the "Receive Label Mapping" procedures, clarified behavior when receiving a duplicate label for the same FEC ๐ฏ
- In the routine "Receive Label Abort Request", clarified the behavior for non-merging LSRs ๐
- Added the following items to the section discussing areas for future study:
- extensions for communicating the maximum transmission unit ๐
- basic peer discovery on NBMA media ๐
- option of shutting down an adjacency ๐ช
- mechanisms for securing Hello messages ๐
- detection of a stateless fast control plane restart ๐
- support of "end of LIB" message ๐ญ
- mechanisms for dealing with the case where different LSRs advertise the same address ๐จ
8. Acknowledgments โจ
okay so this document is part of the push to get the LDP spec up to Draft Standard status ๐๐ฅ. It was first published as RFC 3036 back in January 2001 by the MPLS Working Group ๐. The authors were Loa Andersson, Paul Doolan, Nancy Feldman, Andre Fredette, and Bob Thomas. Iconic team ๐
The ideas and text in RFC 3036 came from a bunch of people ๐ซถ Thank you to Rick Boivie, Ross Callon, Alex Conta, Eric Gray, Yoshihiro Ohba, Eric Rosen, Bernard Suter, Yakov Rekhter, and Arun Viswanathan for their input to RFC 3036. You're all so sweet ๐ธ
The editors also want to thank Eric Gray, David Black, and Sam Hartman for their input to and review of this current document. Reviewers are the real MVPs ๐
And the whole MPLS Working Group gets a big group hug ๐ค for their ideas and support. Special shout-outs to Eric Rosen, Luca Martini, Markus Jork, Mark Duffy, Vach Kompella, Kishore Tiruveedhula, Rama Ramakrishnan, Nick Weeds, Adrian Farrel, and Andy Malis ๐
9. References ๐
9.1. Normative References
- [IANA] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
- [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.
- [ASSIGNED_AF]
http://www.iana.org/assignments/address-family-numbers - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 Signature Option", RFC 2385, August 1998.
- [RFC3035] Davie, B., Lawrence, J., McCloghrie, K., Rosen, E., Swallow, G., Rekhter, Y., and P. Doolan, "MPLS using LDP and ATM VC Switching", RFC 3035, January 2001.
- [RFC3037] Thomas, B. and E. Gray, "LDP Applicability", RFC 3037, January 2001.
9.2. Informative References
- [CRLDP] Jamoussi, B., Ed., Andersson, L., Callon, R., Dantu, R., Wu, L., Doolan, P., Worster, T., Feldman, N., Fredette, A., Girish, M., Gray, E., Heinanen, J., Kilty, T., and A. Malis, "Constraint-Based LSP Setup using LDP", RFC 3212, January 2002.
- [LDP-MTU] Black, B. and K. Kompella, "Maximum Transmission Unit Signalling Extensions for the Label Distribution Protocol", RFC 3988, January 2005.
- [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998.
- [RFC2702] Awduche, D., Malcolm, J., Agogbua, J., O'Dell, M., and J. McManus, "Requirements for Traffic Engineering Over MPLS", RFC 2702, September 1999.
- [RFC3031] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol Label Switching Architecture", RFC 3031, January 2001.
- [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack Encoding", RFC 3032, January 2001.
- [RFC3034] Conta, A., Doolan, P., and A. Malis, "Use of Label Switching on Frame Relay Networks Specification", RFC 3034, January 2001.
- [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, January 2006.
- [RFC4278] Bellovin, S. and A. Zinin, "Standards Maturity Variance Regarding the TCP MD5 Signature Option (RFC 2385) and the BGP-4 Specification", RFC 4278, January 2006.
Appendix A. LDP Label Distribution Procedures ๐ฆ
this section spells out how an LSR should behave when each of these events happens ๐ :
Receive Label Request MessageReceive Label Mapping MessageReceive Label Abort Request MessageReceive Label Release MessageReceive Label Withdraw MessageRecognize new FECDetect change in FEC next hopReceive Notification Message / Label Request AbortedReceive Notification Message / No Label ResourcesReceive Notification Message / No RouteReceive Notification Message / Loop DetectedReceive Notification Message / Label Resources AvailableDetect local label resources have become availableLSR decides to no longer label switch a FECTimeout of deferred label request
every LSR behaviour spec has three parts ๐งฉ:
- Summary. Prose that describes the LSR response to the event in overview.
- Context. A list of elements referred to by the Algorithm part of the specification. (See 3.)
- Algorithm. An algorithm for the LSR response to the event.
the summary can skip details like bookkeeping, or behaviour that depends on the LSR label advertisement mode, control mode, or label retention mode in use ๐. The point is that the Algorithm fully and unambiguously specifies the LSR response, no vibes-based guessing allowed ๐.
the algorithms in this section use procedures from the MPLS architecture spec [RFC3031] for hop-by-hop routed traffic. Here they are:
- Label Distribution procedure, performed by a downstream LSR to decide when to distribute a label for a FEC to its LDP peers. The architecture defines four of these:
Downstream Unsolicited Independent Control, calledPushUnconditionalin [RFC3031].Downstream Unsolicited Ordered Control, calledPushConditionalin [RFC3031].Downstream On Demand Independent Control, calledPulledUnconditionalin [RFC3031].Downstream On Demand Ordered Control, calledPulledConditionalin [RFC3031].
- Label Withdrawal procedure, performed by a downstream LSR to decide when to withdraw a FEC label mapping it previously distributed to LDP peers. The architecture defines just one. Whenever an LSR breaks the binding between a label and a FEC, it MUST withdraw the FEC label mapping from all LDP peers it has previously sent the mapping to.
- Label Request procedure, performed by an upstream LSR to decide when to explicitly ask a downstream LSR to bind a label to a FEC and send it the matching label mapping. The architecture defines three:
Request Never. The LSR never requests a label.Request When Needed. The LSR requests a label whenever it needs one.Request On Request. This one is used by non-label merging LSRs. The LSR requests a label when it receives a request for one, plus whenever it needs one.
- Label Release procedure, performed by an upstream LSR to decide when to release a label mapping it previously received for a FEC. The architecture defines two:
- Label Use procedure, performed by an LSR to decide when to start using a FEC label for forwarding/switching. The architecture defines three:
Use Immediate. The LSR immediately uses a label received from a FEC next hop for forwarding/switching.Use If Loop Free. The LSR uses a FEC label received from a FEC next hop for forwarding/switching only if it has figured out that doing so won't cause a forwarding loop.Use If Loop Not Detected. This is the same as Use Immediate unless the LSR has detected a loop in the FEC LSP. Using the FEC label for forwarding/switching continues until the next hop for the FEC changes or the loop is no longer detected.
this version of LDP has no loop prevention mechanism, so the procedures below don't use the Use If Loop Free procedure ๐ โโ๏ธ
- Label No Route procedure (called the NotAvailable procedure in [RFC3031]), performed by an upstream LSR to decide how to respond to a No Route notification from a downstream LSR after it asked for a FEC label mapping. The architecture spec defines two:
Request Retry. The LSR should issue the label request at a later time.No Request Retry. The LSR should assume the downstream LSR will provide a label mapping once it has a next hop, and it should not reissue the request.
A.1. Handling Label Distribution Events ๐
this section defines the LDP label distribution procedures by giving an algorithm for each label distribution event. The requirement on an LDP implementation is that its event handling has the effect the algorithms specify. So an implementation doesn't have to follow the steps exactly, as long as the effect is identical โจ
the algorithms for handling label distribution events share common actions, so the specs below bundle those into procedure units. The specs for those common procedures live in their own Section, "Common Label Distribution Procedures", which comes right after this one ๐
an implementation would use data structures to store info about protocol activity. This appendix says which info gets stored, in enough detail to describe the algorithms, and assumes you can retrieve it when needed. It doesn't pin down the details of the data structures, so go wild with your own design ๐ง
A.1.1. Receive Label Request โจ
okay so this is the part where an LSR gets a label request from an LDP peer and has to decide what to do with it ๐ The response can include one or more of these moves:
- sending a notification to the requesting LSR saying why it can't give a label mapping for the FEC ๐ โโ๏ธ
- sending a FEC label mapping back to the requesting LSR ๐
- sending a FEC label request on to the FEC next hop ๐ฆ
- installing labels for forwarding/switching use on the LSR ๐ฅ
The context, bestie:
LSR: the LSR handling the event.MsgSource: the LDP peer that sent the message.FEC: the FEC specified in the message.RAttributes: attributes received with the message, like Hop Count and Path Vector.SAttributes: attributes to include in the Label Request message, if there are any, that get passed along to the FEC Next Hop.StoredHopCount: the hop count, if there is one, that was recorded earlier for the FEC.
The algorithm (no skipping, it's giving precision โจ):
LRq.1 Execute procedure Check_Received_Attributes (MsgSource,
LabelRequest, RAttributes).
If Loop Detected, goto LRq.4.
LRq.2 Is there a Next Hop for FEC?
If not, goto LRq.5.
LRq.3 Is MsgSource the Next Hop?
If not, goto LRq.6.
LRq.4 Execute procedure Send_Notification (MsgSource, Loop
Detected).
Goto LRq.13
LRq.5 Execute procedure Send_Notification (MsgSource, No Route).
Goto LRq.13.
LRq.6 Has LSR previously received a label request for FEC from
MsgSource?
If not, goto LRq.8. (See Note 1.)
LRq.7 Is the label request a duplicate request?
If so, goto LRq.13. (See Note 2.)
LRq.8 Record label request for FEC received from MsgSource and
mark it pending.
LRq.9 Perform LSR Label Distribution procedure:
For Downstream Unsolicited Independent Control OR For
Downstream On Demand Independent Control
1. Has LSR previously received and retained a label
mapping for FEC from Next Hop?
Is so, set Propagating to IsPropagating.
If not, set Propagating to NotPropagating.
2. Execute procedure
Prepare_Label_Mapping_Attributes(MsgSource, FEC,
RAttributes, SAttributes, Propagating,
StoredHopCount).
3. Execute procedure Send_Label (MsgSource, FEC,
SAttributes).
4. Is LSR egress for FEC? OR Has LSR previously received
and retained a label mapping for FEC from Next Hop?
If so, goto LRq.11.
If not, goto LRq.10.
For Downstream Unsolicited Ordered Control OR For
Downstream On Demand Ordered Control
1. Is LSR egress for FEC? OR Has LSR previously received
and retained a label mapping for FEC from Next Hop?
(See Note 3.)
If not, goto LRq.10.
2. Execute procedure
Prepare_Label_Mapping_Attributes(MsgSource, FEC,
RAttributes, SAttributes, IsPropagating,
StoredHopCount)
3. Execute procedure Send_Label (MsgSource, FEC,
SAttributes).
Goto LRq.11.
LRq.10 Perform LSR Label Request procedure:
For Request Never
1. Goto LRq.13.
For Request When Needed OR
For Request On Request
1. Execute procedure Prepare_Label_Request_Attributes
(Next Hop, FEC, RAttributes, SAttributes);
2. Execute procedure Send_Label_Request (Next Hop, FEC,
SAttributes).
Goto LRq.13.
LRq.11 Has LSR successfully sent a label for FEC to MsgSource?
If not, goto LRq.13. (See Note 4.)
LRq.12 Perform LSR Label Use procedure.
For Use Immediate OR For Use If Loop Not Detected
1. Install label sent to MsgSource and label from Next
Hop (if LSR is not egress) for forwarding/switching
use.
LRq.13 DONE.
The notes, spill the tea ๐ต
- Say MsgSource is a non-label merging LSR. Then it sends a label request for each upstream LDP peer that asked it for a label for the FEC. The LSR has to be able to tell those apart from duplicate label requests coming from a non-label merging MsgSource ๐ง The LSR uses the message ID of received Label Request messages to spot duplicates. That means an LSR (the upstream peer) can't reuse the message ID it used for a Label Request until that Label Request transaction is finished ๐
- When an LSR sends a label request to a peer, it records that the request went out and marks it as outstanding ๐ While the request is still marked outstanding, the LSR SHOULD NOT send another request for the same label to that peer. A second one would be a duplicate ๐ โโ๏ธ The Send_Label_Request procedure described below follows this rule.
A duplicate label request counts as a protocol error and the receiving LSR SHOULD drop it (maybe sending back a suitable notification to MsgSource) ๐ซ
- If the LSR isn't merge-capable, this test is going to fail ๐
- The Send_Label procedure can fail if there aren't enough label resources. In that case the LSR SHOULD NOT perform the Label Use procedure ๐
A.1.2. Receive Label Mapping ๐ฆ
the response when an LSR gets a FEC label mapping from an LDP peer can include one or more of these:
- sending a Label Release message for the FEC label to the LDP peer ๐ซถ
- sending Label Mapping messages for the FEC to one or more LDP peers ๐
- installing the newly learned label for forwarding/switching use on the LSR ๐ฅ
The context:
LSR: the LSR handling the event.MsgSource: the LDP peer that sent the message.FEC: the FEC specified in the message.Label: the label specified in the message.PrevAdvLabel: the label for the FEC, if any, that was advertised earlier to an upstream peer. If no label was advertised before, this is the same label as the one in the Label Mapping message being processed.StoredHopCount: the hop count that was recorded earlier for the FEC.RAttributes: attributes received with the message, like Hop Count and Path Vector.SAttributes: attributes to include in the Label Mapping message, if there are any, that get propagated to upstream peers.
The algorithm (up to the cliffhanger ๐ญ):
LMp.1 Does the received label mapping match an outstanding label
request for FEC previously sent to MsgSource? If not,
goto LMp.3.
LMp.2 Delete record of outstanding FEC label request.
LMp.3 Execute procedure Check_Received_Attributes (MsgSource,
LabelMapping, RAttributes).
If No Loop Detected, goto LMp.9.
LMp.4 Does the LSR have a previously received label mapping for
FEC from MsgSource? (See Note 1.)
If not, goto LMp.8. (See Note 2.)
LMp.5 Does the label previously received from MsgSource match
Label (i.e., the label received in the message)? (See
Note 3.)
If not, goto LMp.8. (See Note 4.)
LMp.6 Delete matching label mapping for FEC previously
received from MsgSource.
LMp.7 Remove Label from forwarding/switching use. (See Note 5.)
LMp.8 Execute procedure Send_Message (MsgSource, Label Release,
FEC, Label, Loop Detected Status code). Goto LMp.33.
LMp.9 Does LSR have a previously received label mapping for FEC
from MsgSource for the LSP in question? (See Note 6.)
If not, goto LMp.11.
LMp.10 Does the label previously received from MsgSource match
Label (i.e., the label received in the message)? (See
Note 3.)
OR
Is the received label mapping in response to a previously
outstanding label request sent to MsgSource? (See Note
12.)
If so, goto LMp.11.
LMp.10a Is LSR operating in Downstream Unsolicited mode? If so,
delete the label mapping for the label previously received
from MsgSource and remove it from forwarding/switching
use.
Execute procedure Send_Message (MsgSource, Label Release,
FEC, label previously received from MsgSource).
LMp.11 Determine the Next Hop for FEC.
LMp.12 Is MsgSource the Next Hop for FEC?
If so, goto LMp.14.
LMp.13 Perform LSR Label Release procedure:
For Conservative Label retention:
A.1.2. Receive Label Mapping (continued) ๐
Okay so this part picks up mid-procedure, bestie. Here's the rest of the LMp steps, all in one block so nothing gets scrambled:
1. Goto LMp.32.
For Liberal Label retention:
1. Record label mapping for FEC with Label and
RAttributes has been received from MsgSource.
Goto LMp.33.
LMp.14 Is LSR an ingress for FEC?
If not, goto LMp.16.
LMp.15 Install Label for forwarding/switching use.
LMp.16 Record label mapping for FEC with Label and RAttributes
has been received from MsgSource.
LMp.17 Iterate through LMp.31 for each Peer. (See Note 7).
LMp.18 Has LSR previously sent a label mapping for FEC to Peer
for the LSP in question? (See Note 8.)
If so, goto LMp.22.
LMp.19 Is the Downstream Unsolicited Ordered Control Label
Distribution procedure being used by LSR?
If not, goto LMp.28.
LMp.20 Execute procedure Prepare_Label_Mapping_Attributes (Peer,
FEC, RAttributes, SAttributes, IsPropagating,
StoredHopCount).
LMp.21 Execute procedure Send_Message (Peer, Label Mapping, FEC,
PrevAdvLabel, SAttributes). (See Note 13.)
Goto LMp.28.
LMp.22 Iterate through LMp.27 for each label mapping for FEC
previously sent to Peer.
LMp.23 Are RAttributes in the received label mapping consistent
with those previously sent to Peer? If so, continue
iteration from LMp.22 for next label mapping. (See Note
9.)
LMp.24 Execute procedure Prepare_Label_Mapping_Attributes (Peer,
FEC, RAttributes, SAttributes, IsPropagating,
StoredHopCount).
LMp.25 Execute procedure Send_Message (Peer, Label Mapping, FEC,
PrevAdvLabel, SAttributes). (See Note 10.)
LMp.26 Update record of label mapping for FEC previously sent to
Peer to include the new attributes sent.
LMp.27 End iteration from LMp.22.
LMp.28 Does LSR have any label requests for FEC from Peer marked
as pending?
If not, goto LMp.30.
LMp.29 Perform LSR Label Distribution procedure:
For Downstream Unsolicited Independent Control OR For
Downstream Unsolicited Ordered Control
1. Execute procedure
Prepare_Label_Mapping_Attributes (Peer, FEC,
RAttributes, SAttributes, IsPropagating,
UnknownHopCount).
2. Execute procedure Send_Label (Peer, FEC, SAttributes).
If the procedure fails, continue iteration for next
Peer at LMp.17.
3. If no pending requests exist for Peer, goto LMp.30.
(See Note 11.)
For Downstream On Demand Independent Control OR For
Downstream On Demand Ordered Control
1. Iterate through Step 5 for each pending label request
for FEC from Peer marked as pending.
2. Execute procedure
Prepare_Label_Mapping_Attributes (Peer, FEC,
RAttributes, SAttributes, IsPropagating,
UnknownHopCount)
3. Execute procedure Send_Label (Peer, FEC, SAttributes).
If the procedure fails, continue iteration for next
Peer at LMp.17.
4. Delete record of pending request.
5. End iteration from Step 1.
6. Goto LMp.30.
LMp.30 Perform LSR Label Use procedure:
For Use Immediate OR For Use If Loop Not Detected
1. Iterate through Step 3 for each label mapping for FEC
previously sent to Peer.
2. Install label received and label sent to Peer for
forwarding/switching use.
3. End iteration from Step 1.
4. Goto LMp.31.
LMp.31 End iteration from LMp.17.
Go to LMp.33.
LMp.32 Execute procedure Send_Message (MsgSource, Label Release,
FEC, Label).
LMp.33 DONE.
Notes:
Note 1: If the LSR is merging, there should be at most 1 received mapping for the FEC for the LSP in question. In the non-merging case, there could be multiple received mappings for the FEC for the LSP in question.
Note 2: If the LSR has detected a loop and it has not previously received a label mapping from MsgSource for the FEC, it simply releases the label.
Note 3: Does the Label received in the message match any of the 1 or more label mappings identified in the previous step (LMp.4 or LMp.9)?
Note 4: An unsolicited mapping with a different label from the same peer would be an attempt to establish multipath label switching, which is not supported in this version of LDP. ๐ โโ๏ธ
Note 5: If the Label is not in forwarding/switching use, LMp.7 has no effect.
Note 6: If the received label mapping message matched an outstanding label request in LMp.1, then (by definition) the LSR has not previously received a label mapping for FEC for the LSP in question. If the LSR is merging upstream labels for the LSP in question, there should be at most 1 received mapping. In the non-merging case, there could be multiple received label mappings for the same FEC, one for each resulting LSP. โจ
Note 7: The LMp.17 iteration includes MsgSource in order to handle the case where the LSR is operating in Downstream Unsolicited Ordered Control mode. Ordered Control prevents the LSR from advertising a label for the FEC until it has received a label mapping from its next hop (MsgSource) for the FEC. ๐ง
Note 8: If the LSR is merging the LSP, it may have previously sent label mappings for the FEC LSP to one or more peers. If the LSR is not merging, it may have sent a label mapping for the LSP in question to at most one LSR.
Note 9: The Loop Detection Path Vector attribute is considered in this check. If the received RAttributes include a Path Vector and no Path Vector had been previously sent to the Peer, or if the received Path Vector is inconsistent with the Path Vector previously sent to the Peer, then the attributes are considered to be inconsistent. Note that an LSR is not required to store a received Path Vector after it propagates the Path Vector in a mapping message. If an LSR does not store the Path Vector, it has no way to check the consistency of a newly received Path Vector. This means that whenever such an LSR receives a mapping message carrying a Path Vector it must always propagate the Path Vector. ๐
Note 10: LMp.22 through LMp.27 deal with a situation that can arise when the LSR is using independent control and it receives a mapping from the downstream peer after it has sent a mapping to an upstream peer. In this situation, the LSR needs to propagate any changed attributes, such as Hop Count, upstream. If Loop Detection is configured on, the propagated attributes must include the Path Vector. ๐ซ
Note 11: An LSR operating in Downstream Unsolicited mode MUST process any Label Request messages it receives. If there are pending label requests, fall through into the Downstream on Demand procedures in order to satisfy the pending requests. ๐จ
Note 12: As determined by step LMp.1.
Note 13: An LSR operating in Ordered Control mode may choose to skip at this stage the peer from which it received the advertisement that caused it to generate the label-map message. Doing so will in effect provide a form of split-horizon. ๐
A.1.3. Receive Label Abort Request ๐ฆ
Summary:
Okay so when an LSR gets a Label Abort Request message from a peer, the first thing it checks is whether it already responded to that label request. If it did, it just silently ignores the message, no drama. If it didn't respond yet, it sends the peer a Label Request Aborted Notification. ๐ Then, if it has a label request still outstanding for that LSP to a downstream peer, it sends a Label Abort Request to that downstream peer so the LSP gets aborted all the way down. Iconic behavior, honestly. ๐
Context:
- LSR. The LSR handling the event. ๐
- MsgSource. The LDP peer that sent the message.
- FEC. The FEC specified in the message.
- RequestMessageID. The message ID of the label request message to be aborted.
- Next Hop. The next hop for the FEC.
Algorithm:
LAbR.1 Does the message match a previously received Label Request
message from MsgSource? (See Note 1.)
If not, goto LAbR.12.
LAbR.2 Has LSR responded to the previously received label
request?
If so, goto LAbR.12.
LAbR.3 Execute procedure Send_Message (MsgSource, Notification,
Label Request Aborted, TLV), where TLV is the Label
Request Message ID TLV received in the Label Abort Request
message.
LAbR.4 Does LSR have a Label Request message outstanding for FEC?
If so, goto LAbR.7.
LAbR.5 Does LSR have a label mapping for FEC? If not, goto
LAbR.11.
LAbR.6 Generate Event: Received Label Release message for FEC
from MsgSource. (See Note 2.)
Goto LAbR.11.
LAbR.7 Is LSR merging the LSP for FEC?
If not, goto LAbR.9.
LAbR.8 Are there outstanding label requests for this FEC?
If so, goto LAbR.11.
LAbR.9 Execute procedure Send_Message (Next Hop, Label Abort
Request, FEC, TLV), where TLV is a Label Request message
ID TLV containing the Message ID used by the LSR in the
outstanding Label Request message.
LAbR.10 Record that a label abort request for FEC is pending.
LAbR.11 Delete record of label request for FEC from MsgSource.
LAbR.12 DONE.
Notes:
Note 1: LSR uses FEC and the Label Request message ID TLV carried by the label abort request to locate its record (if any) for the previously received label request from MsgSource. ๐
Note 2: If LSR has received a label mapping from NextHop, it should behave as if it had advertised a label mapping to MsgSource and MsgSource has released it. ๐ซถ
A.1.4. Receive Label Release โจ
Summary: okay bestie, this is the moment an LSR gets a Label Release for a FEC from a peer ๐. It checks whether any other peers still hold the released label. If none do, it removes the label from forwarding/switching use (if it hasn't already), and if it holds a label mapping from the FEC next hop, it releases that mapping too ๐
Context:
- LSR. The LSR handling the event.
- MsgSource. The LDP peer that sent the message.
- Label. The label specified in the message.
- FEC. The FEC specified in the message.
Algorithm:
LRl.1 Does FEC match a known FEC? If not, goto LRl.14.
LRl.2 Remove MsgSource from record of peers that hold Label for
FEC. (See Note 1.)
LRl.3 Does message match an outstanding label withdraw for FEC
previously sent to MsgSource?
If not, goto LRl.5
LRl.4 Delete record of outstanding label withdraw for FEC
previously sent to MsgSource.
LRl.5 Is LSR merging labels for this FEC? If not, goto LRl.7.
(See Note 2.)
LRl.6 Does LSR have outstanding label advertisements for this
FEC?
If so, goto LRl.11.
LRl.7 Is LSR egress for the FEC?
If so, goto LRl.11.
LRl.8 Is there a Next Hop for FEC? AND Does LSR have a
previously received label mapping for FEC from Next Hop?
If not, goto LRl.11.
LRl.9 Is LSR configured to propagate releases?
If not, goto LRl.11. (See Note 3.)
LRl.10 Execute procedure Send_Message (Next Hop, Label Release,
FEC, Label from Next Hop).
LRl.11 Remove Label from forwarding/switching use for traffic
from MsgSource.
LRl.12 Do any peers still hold Label for FEC?
If so, goto LRl.14.
LRl.13 Free the Label.
LRl.14 DONE.
Notes:
- If LSR is using Downstream Unsolicited label distribution, it SHOULD NOT re-advertise a label mapping for FEC to MsgSource until MsgSource requests it.
- LRl.5 through LRl.9 deal with determining whether where the LSR should propagate the Label Release to a downstream peer (LRl.9).
- If LRl.9 is reached, no upstream LSR holds a label for the FEC, and the LSR holds a label for the FEC from the FEC Next Hop. The LSR could propagate the Label Release to the Next Hop. By propagating the Label Release, the LSR releases a potentially scarce label resource. In doing so, it also increases the latency for re-establishing the LSP should MsgSource or some other upstream LSR send it a new Label Request for FEC.
Whether or not to propagate the release is not a protocol issue. Label distribution will operate properly whether or not the release is propagated. The decision to propagate or not should take into consideration factors such as, whether labels are a scarce resource in the operating environment, the importance of keeping LSP setup latency low by keeping the amount of signaling required small, and whether LSP setup is ingress-controlled or egress-controlled in the operating environment.
A.1.5. Receive Label Withdraw โจ
Summary: when an LSR gets a Label Withdraw for a FEC from an LDP peer, it fires back a Label Release ๐ฆ and removes the label from any forwarding/switching use. If Ordered Control is in use, the LSR sends a Label Withdraw to each LDP peer it had previously sent a label mapping for that FEC to. And if the LSR is using Downstream on Demand label advertisement with independent control, it then acts as if it had just recognized the FEC. The plot thickens ๐
Context:
- LSR. The LSR handling the event.
- MsgSource. The LDP peer that sent the message.
- Label. The label specified in the message.
- FEC. The FEC specified in the message.
Algorithm:
LWd.1 Remove Label from forwarding/switching use. (See Note 1.)
LWd.2 Execute procedure Send_Message (MsgSource, Label Release,
FEC, Label).
LWd.3 Has LSR previously received and retained a matching label
mapping for FEC from MsgSource?
If not, goto LWd.13.
LWd.4 Delete matching label mapping for FEC previously received
from MsgSource.
LWd.5 Is LSR using Ordered Control?
If so, goto LWd.8.
LWd.6 Is MsgSource using Downstream On Demand label
advertisement?
If not, goto LWd.13.
LWd.7 Generate Event: Recognize New FEC for FEC. Goto LWd.13.
(See Note 2.)
LWd.8 Iterate through LWd.12 for each Peer, other than
MsgSource.
LWd.9 Has LSR previously sent a label mapping for FEC to Peer?
If not, continue iteration for next Peer at LWd.8.
LWd.10 Does the label previously sent to Peer "map" to the
withdrawn Label?
If not, continue iteration for next Peer at LWd.8. (See
Note 3.)
LWd.11 Execute procedure Send_Label_Withdraw (Peer, FEC, Label
previously sent to Peer).
LWd.12 End iteration from LWd.8.
LWd.13 DONE.
Notes:
- If the Label is not in forwarding/switching use, LWd.1 has no effect.
- LWd.7 handles the case where the LSR is using Downstream On Demand label distribution with independent control. In this situation, the LSR should send a label request to the FEC next hop as if it had just recognized the FEC.
- LWd.10 handles both label merging (one or more incoming labels map to the same outgoing label) and no label merging (one label maps to the outgoing label) cases.
A.1.6. Recognize New FEC โจ
Summary: when an LSR learns about a brand-new FEC through the routing table, it can do one or more of these things ๐ธ
- Send label mappings for the FEC to one or more LDP peers;
- Send a label request for the FEC to the FEC next hop;
- Do any of the things that can happen when the LSR receives a label mapping for the FEC from the FEC next hop.
Context:
- LSR. The LSR handling the event.
- FEC. The newly recognized FEC.
- Next Hop. The next hop for the FEC.
- InitAttributes. Attributes to be associated with the new FEC. (See Note 1.)
- SAttributes. Attributes to be included in Label Mapping or Label Request messages, if any, sent to peers.
- StoredHopCount. Hop count associated with FEC label mapping, if any, previously received from Next Hop.
Algorithm:
FEC.1 Perform LSR Label Distribution procedure:
For Downstream Unsolicited Independent Control
1. Iterate through 5 for each Peer.
2. Has LSR previously received and retained a label
mapping for FEC from Next Hop?
If so, set Propagating to IsPropagating.
If not, set Propagating to NotPropagating.
3. Execute procedure Prepare_Label_Mapping_Attributes
(Peer, FEC, InitAttributes, SAttributes, Propagating,
Unknown hop count(0)).
4. Execute procedure Send_Label (Peer, FEC, SAttributes).
5. End iteration from 1.
Goto FEC.2.
For Downstream Unsolicited Ordered Control
1. Iterate through 5 for each Peer.
2. Is LSR egress for the FEC? OR Has LSR previously
received and retained a label mapping for FEC from
Next Hop?
If not, continue iteration for next Peer.
3. Execute procedure Prepare_Label_Mapping_Attributes
(Peer, FEC, InitAttributes, SAttributes, Propagating,
StoredHopCount).
4. Execute procedure Send_Label (Peer, FEC, SAttributes).
5. End iteration from 1.
Goto FEC.2.
For Downstream On Demand Independent Control OR
For Downstream On Demand Ordered Control
1. Goto FEC.2. (See Note 2.)
FEC.2 Has LSR previously received and retained a label mapping
for FEC from Next Hop?
If so, goto FEC.5
FEC.3 Is Next Hop an LDP peer?
If not, Goto FEC.6
FEC.4 Perform LSR Label Request procedure:
For Request Never
1. Goto FEC.6
For Request When Needed OR
For Request On Request
1. Execute procedure
Prepare_Label_Request_Attributes (Next Hop, FEC,
InitAttributes, SAttributes);
2. Execute procedure Send_Label_Request (Next Hop, FEC,
SAttributes).
Goto FEC.6.
FEC.5 Generate Event: Received Label Mapping from Next Hop.
(See Note 3.)
FEC.6 DONE.
Notes:
- An example of an attribute that might be part of InitAttributes is one that specifies desired LSP characteristics, such as Class of Service (CoS). (Note that while the current version of LDP does not specify a CoS attribute, LDP extensions may.)
The means by which FEC InitAttributes, if any, are specified is beyond the scope of LDP. Note that the InitAttributes will not include a known Hop Count or a Path Vector.
- An LSR using Downstream On Demand label distribution would send a label only if it had a previously received label request marked as pending. The LSR would have no such pending requests because it responds to any label request for an unknown FEC by sending the requesting LSR a No Route notification and discarding the label request; see LRq.3
- If the LSR has a label for the FEC from the Next Hop, it should behave as if it had just received the label from the Next Hop. This occurs in the case of Liberal Label retention mode.
A.1.7. Detect Change in FEC Next Hop ๐ฆ
Summary
okay so when an LSR notices that the next hop for a FEC changed, it has a few possible moves ๐
- yank the label off the FEC's old next hop from forwarding/switching use
- send label mapping messages for the FEC to one or more LDP peers
- send a label request to the FEC's new next hop
- do anything that can happen when the LSR gets a label mapping from the FEC's new next hop โจ
Context
LSR. The LSR handling the event. ๐FEC. The FEC whose next hop changed.New Next Hop. The current next hop for the FEC.Old Next Hop. The previous next hop for the FEC.OldLabel. Label, if any, previously received from Old Next Hop.CurAttributes. The attributes, if any, currently associated with the FEC.SAttributes. Attributes to be included in the Label Request message, if any, sent to New Next Hop.
Algorithm
NH.1Has the LSR previously received and retained a label mapping for the FEC from the Old Next Hop? If not, gotoNH.6. ๐ธNH.2Remove the label from forwarding/switching use. (See Note 1.)NH.3Is the LSR using Liberal Label retention? If so, gotoNH.6.NH.4Execute procedureSend_Message (Old Next Hop, Label Release, OldLabel).NH.5Delete the label mapping for the FEC previously received from the Old Next Hop.NH.6Does the LSR have a label request pending with the Old Next Hop? If not, gotoNH.10.NH.7Is the LSR using Conservative Label retention? If not, gotoNH.10.NH.8Execute procedureSend_Message (Old Next Hop, Label Abort Request, FEC, TLV), where TLV is a Label Request Message ID TLV that carries the message ID of the pending label request.NH.9Record that a label abort request is pending for the FEC with the Old Next Hop.NH.10Is there a New Next Hop for the FEC? If not, gotoNH.16.NH.11Has the LSR previously received and retained a label mapping for the FEC from the New Next Hop? If not, gotoNH.13.NH.12Generate Event: Received Label Mapping from New Next Hop. GotoNH.20. (See Note 2.) ๐ฅNH.13Is the LSR using Downstream on Demand advertisement? OR is the Next Hop using Downstream on Demand advertisement? OR is the LSR using Conservative Label retention? (See Note 3.) If so, gotoNH.14. If not, gotoNH.20.NH.14Execute procedurePrepare_Label_Request_Attributes (Next Hop, FEC, CurAttributes, SAttributes).NH.15Execute procedureSend_Label_Request (New Next Hop, FEC, SAttributes). (See Note 4.) GotoNH.20.NH.16Iterate throughNH.19for each Peer.NH.17Has the LSR previously sent a label mapping for the FEC to the Peer? If not, continue iteration for the next Peer atNH.16.NH.18Execute procedureSend_Label_Withdraw (Peer, FEC, Label previously sent to Peer).NH.19End iteration fromNH.16.NH.20DONE. ๐
Notes
- If the Label is not in forwarding/switching use,
NH.2has no effect. - If the LSR has a label for the FEC from the New Next Hop, it should behave as if it had just received the label from the New Next Hop.
- The purpose of the check on label retention mode is to avoid a race with steps
LMp.12-LMp.13of the procedure for handling a Label Mapping message, where the LSR operating in Conservative Label retention mode may have released a label mapping received from the New Next Hop before it detected that the FEC next hop had changed. ๐ - Regardless of the Label Request procedure in use by the LSR, it MUST send a label request if the conditions in
NH.13hold. Therefore, it executes theSend_Label_Requestprocedure directly rather than performing the LSR Label Request procedure. ๐ซถ
A.1.8. Receive Notification / Label Request Aborted ๐
Summary
When an LSR gets a Label Request Aborted notification from an LDP peer, it records that the matching label request transaction, if any, has completed. โจ
Context
LSR. The LSR handling the event.FEC. The FEC for which a label was requested.RequestMessageID. The message ID of the label request message to be aborted.MsgSource. The LDP peer that sent the Notification message.
Algorithm
LRqA.1Does the notification correspond to an outstanding label request abort for the FEC? (See Note 1.) If not, gotoLRqA.3.LRqA.2Record that the label request for the FEC has been aborted.LRqA.3DONE.
Note
- The LSR uses the FEC and
RequestMessageIDto locate its record, if any, of the outstanding label request abort. ๐
A.1.9. Receive Notification / No Label Resources ๐ท
Summary
When an LSR receives a No Label Resources notification from an LDP peer, it stops sending label request messages to that peer until it receives a Label Resources Available notification from the peer. ๐ โโ๏ธ
Context
LSR. The LSR handling the event.FEC. The FEC for which a label was requested.MsgSource. The LDP peer that sent the Notification message.
Algorithm
NoRes.1Delete the record of the outstanding label request for the FEC sent toMsgSource.NoRes.2Record that a label mapping for the FEC fromMsgSourceis needed but that no label resources are available.NoRes.3Set a status record indicating it is not OK to send label requests toMsgSource.NoRes.4DONE.
A.1.10. Receive Notification / No Route ๐ง
Summary
When an LSR receives a No Route notification from an LDP peer in response to a Label Request message, the Label No Route procedure in use decides what happens next. The LSR either takes no further action, or it defers the label request by starting a timer and sends another Label Request message to the peer when the timer later expires. โฐ
Context
LSR. The LSR handling the event.FEC. The FEC for which a label was requested.Attributes. The attributes associated with the label request.MsgSource. The LDP peer that sent the Notification message.
Algorithm
NoNH.1Delete the record of the outstanding label request for the FEC sent toMsgSource.NoNH.2Perform the LSR Label No Route procedure.- For Request No Retry:
- Goto
NoNH.3.
- Goto
- For Request Retry:
- Record the deferred label request for the FEC and Attributes to be sent to
MsgSource. - Start timeout. Goto
NoNH.3.
- Record the deferred label request for the FEC and Attributes to be sent to
- For Request No Retry:
NoNH.3DONE.
A.1.11. Receive Notification / Loop Detected ๐
Summary
When an LSR receives a Loop Detected Status Code from an LDP peer in response to a Label Request message or a Label Mapping message, it behaves as if it had received a No Route notification. ๐
Context
See "Receive Notification / No Route".
Algorithm
See "Receive Notification / No Route".
Note
- When the Loop Detected notification is in response to a Label Request message, it arrives in a Status Code TLV in a Notification message. When it is in response to a Label Mapping message, it arrives in a Status Code TLV in a Label Release message. ๐ฆ
A.1.12. Receive Notification / Label Resources Available ๐
Summary
When an LSR receives a Label Resources Available notification from an LDP peer, it resumes sending label requests to that peer. ๐ฅณ
Context
LSR. The LSR handling the event.MsgSource. The LDP peer that sent the Notification message.SAttributes. Attributes stored with the postponed Label Request message.
Algorithm
Res.1Set a status record indicating it is OK to send label requests toMsgSource.Res.2Iterate throughRes.6for each record of a FEC label mapping needed fromMsgSourcefor which no label resources are available.Res.3IsMsgSourcethe next hop for the FEC? If not, gotoRes.5.Res.4Execute procedureSend_Label_Request (MsgSource, FEC, SAttributes). If the procedure fails, terminate iteration.Res.5Delete the record that no resources are available for a label mapping for the FEC needed fromMsgSource.Res.6End iteration fromRes.2.Res.7DONE. ๐
A.1.13. Detect Local Label Resources Have Become Available ๐
Summary
After an LSR has sent a No Label Resources notification to an LDP peer, once label resources become available again it sends a Label Resources Available notification to each such peer. ๐
Context
LSR. The LSR handling the event.Attributes. Attributes stored with the postponed Label Mapping message.
Algorithm
ResA.1Iterate throughResA.4for each Peer to which the LSR has previously sent a No Label Resources notification.ResA.2Execute procedureSend_Notification (Peer, Label Resources Available).ResA.3Delete the record that a No Label Resources notification was previously sent to the Peer.ResA.4End iteration fromResA.1.ResA.5Iterate throughResA.8for each record of a label mapping needed for the FEC for the Peer but no-label-resources. (See Note 1.)ResA.6Execute procedureSend_Label (Peer, FEC, Attributes). If the procedure fails, terminate iteration.ResA.7Clear the record of the FEC label mapping needed for the Peer but no-label-resources.ResA.8End iteration fromResA.5.ResA.9DONE.
Note
- Iteration
ResA.5throughResA.8handles the situation where the LSR is using Downstream Unsolicited label distribution and was previously unable to allocate a label for a FEC. ๐ง
A.1.14. LSR Decides to No Longer Label Switch a FEC ๐ซ
Summary
An LSR can decide, all on its own, to stop label switching a FEC for an LDP peer. An LSR that does this MUST send a Label Withdraw message for the FEC to the peer. ๐
Context
Peer. The peer.FEC. The FEC.PrevAdvLabel. The label for the FEC previously advertised to the Peer.
Algorithm
NoLS.1Execute procedureSend_Label_Withdraw (Peer, FEC, PrevAdvLabel). (See Note 1.)NoLS.2DONE.
Note
- The LSR may remove the label from forwarding/switching use as part of this event, or as part of processing the Label Release from the peer in response to the label withdraw. If the LSR doesn't wait for the Label Release message from the peer, it SHOULD NOT reuse the label until it receives the Label Release. Stay tuned, bestie, there's more! ๐ฆ
A.1.15. Timeout of Deferred Label Request โณ
okay so label requests can get deferred (parked for later) when a No Route or Loop Detected notification comes in ๐ when a deferred FEC label request for a peer times out, the LSR finally sends it. ๐ซถ
- LSR. The LSR handling the event.
- FEC. The FEC associated with the timeout event.
- Peer. The LDP peer associated with the timeout event.
- Attributes. Attributes stored with the deferred Label Request message.
TO.1 Retrieve the record of the deferred label request.
TO.2 Is Peer the next hop for FEC?
If not, goto TO.4.
TO.3 Execute procedure Send_Label_Request (Peer, FEC).
TO.4 DONE.
A.2. Common Label Distribution Procedures ๐
this section is the toolbox ๐งฐ it lays out the utility procedures that the algorithms for handling label distribution events all borrow from.
A.2.1. Send_Label ๐
the Send_Label procedure tries to allocate a label for a FEC for an LDP peer, and if it works, it sends that peer a label mapping for the FEC. if the LSR can't allocate the label and it has a pending label request from that peer, it sends the LDP peer a No Label Resources notification ๐ญ
- Peer. The LDP peer to which the label mapping is to be sent.
- FEC. The FEC for which a label mapping is to be sent.
- Attributes. Attributes to be included with the label mapping.
Additional Context:
- LSR. The LSR executing the procedure.
- Label. The label allocated and sent to Peer.
SL.1 Does LSR have a label to allocate?
If not, goto SL.9.
SL.2 Allocate Label and bind it to the FEC.
SL.3 Install Label for forwarding/switching use.
SL.4 Execute procedure Send_Message (Peer, Label Mapping, FEC,
Label, Attributes).
SL.5 Record label mapping for FEC with Label and Attributes has
been sent to Peer.
SL.6 Does LSR have a record of a FEC label request from Peer marked as
pending?
If not, goto SL.8.
SL.7 Delete record of pending label request for FEC from Peer.
SL.8 Return success.
SL.9 Does LSR have a label request for FEC from Peer marked as
pending?
If not, goto SL.13.
SL.10 Execute procedure Send_Notification (Peer, No Label
Resources).
SL.11 Delete record of pending label request for FEC from Peer.
SL.12 Record No Label Resources notification has been sent to
Peer.
Goto SL.14.
SL.13 Record label mapping needed for FEC and Attributes for
Peer, but no-label-resources. (See Note 1.)
SL.14 Return failure.
Note:
- SL.13 handles the case of Downstream Unsolicited label distribution when the LSR is unable to allocate a label for a FEC to send to a Peer.
A.2.2. Send_Label_Request ๐โโ๏ธ
an LSR uses Send_Label_Request to ask an LDP peer for a label for a FEC, but only if it's currently allowed to ๐ฆ
- Peer. The LDP peer to which the label request is to be sent.
- FEC. The FEC for which a label request is to be sent.
- Attributes. Attributes to be included in the label request, e.g., Hop Count, Path Vector.
Additional Context:
- LSR. The LSR executing the procedure.
SLRq.1 Has a label request for FEC previously been sent to Peer
and is it marked as outstanding?
If so, Return success. (See Note 1.)
SLRq.2 Is status record indicating it is OK to send label
requests to Peer set?
If not, goto SLRq.6
SLRq.3 Execute procedure Send_Message (Peer, Label Request, FEC,
Attributes).
SLRq.4 Record that label request for FEC has been sent to Peer
and mark it as outstanding.
SLRq.5 Return success.
SLRq.6 Postpone the label request by recording that label mapping
for FEC and Attributes from Peer is needed but that no
label resources are available.
SLRq.7 Return failure.
Note:
- If the LSR is a non-merging LSR, it has to tell apart label request attempts for a FEC that were triggered by different upstream LDP peers from plain duplicates. This procedure will not send a duplicate label request.
A.2.3. Send_Label_Withdraw ๐
an LSR uses Send_Label_Withdraw to take back a label for a FEC from an LDP peer. to do that, it sends the peer a Label Withdraw message ๐
- Peer. The LDP peer to which the label withdraw is to be sent.
- FEC. The FEC for which a label is being withdrawn.
- Label. The label being withdrawn.
Additional Context:
- LSR. The LSR executing the procedure.
SWd.1 Execute procedure Send_Message (Peer, Label Withdraw, FEC,
Label).
SWd.2 Record that label withdraw for FEC has been sent to Peer
and mark it as outstanding.
A.2.4. Send_Notification ๐ฃ
an LSR uses Send_Notification to send an LDP peer a Notification message โจ
- Peer. The LDP peer to which the Notification message is to be sent.
- Status. Status code to be included in the Notification message.
Additional Context:
- None.
SNt.1 Execute procedure Send_Message (Peer, Notification, Status)
A.2.5. Send_Message ๐จ
an LSR uses Send_Message to send an LDP peer an LDP message ๐
- Peer. The LDP peer to which the message is to be sent.
- Message Type. The type of message to be sent.
- Additional message contents . . . .
Additional Context:
- None.
This procedure is the means by which an LSR sends an LDP message of the specified type to the specified LDP peer.
A.2.6. Check_Received_Attributes ๐
this one checks the attributes that came in on a Label Mapping or Label Request message ๐ต๏ธโโ๏ธ if the attributes include a Hop Count or Path Vector, it runs a Loop Detection check. if it finds a loop, it causes a Loop Detected Notification message to be sent to MsgSource. ๐จ
- MsgSource. The LDP peer that sent the message.
- MsgType. The type of message received.
- RAttributes. The attributes in the message.
Additional Context:
- LSR Id. The unique LSR Id of this LSR.
- Hop Count. The Hop Count, if any, in the received attributes.
- Path Vector. The Path Vector, if any, in the received attributes.
CRa.1 Do RAttributes include Hop Count?
If not, goto CRa.5.
CRa.2 Does Hop Count exceed Max allowable hop count?
If so, goto CRa.6.
CRa.3 Do RAttributes include Path Vector?
If not, goto CRa.5.
CRa.4 Does Path Vector include LSR Id? OR Does length of Path
Vector exceed Max allowable length?
If so, goto CRa.6
CRa.5 Return No Loop Detected.
CRa.6 Is MsgType LabelMapping?
If so, goto CRa.8. (See Note 1.)
CRa.7 Execute procedure Send_Notification (MsgSource, Loop
Detected).
CRa.8 Return Loop Detected.
CRa.9 DONE.
Note:
- When the attributes being checked were received in a Label Mapping message, the LSR sends the Loop Detected notification in a Status Code TLV in a Label Release message. (See Section "Receive Label Mapping".)
A.2.7. Prepare_Label_Request_Attributes ๐งฎ
this procedure runs whenever a Label Request is about to go to a Peer. it works out the Hop Count and Path Vector, if any, to put in the message ๐ธ
- Peer. The LDP peer to which the message is to be sent.
- FEC. The FEC for which a label request is to be sent.
- RAttributes. The attributes this LSR associates with the LSP for FEC.
- SAttributes. The attributes to be included in the Label Request message.
Additional Context:
- LSR Id. The unique LSR Id of this LSR.
PRqA.1 Is Hop Count required for this Peer? (See Note 1.) OR Do
RAttributes include a Hop Count? OR Is Loop Detection
configured on LSR?
If not, goto PRqA.14.
PRqA.2 Is LSR ingress for FEC?
If not, goto PRqA.6.
PRqA.3 Include Hop Count of 1 in SAttributes.
PRqA.4 Is Loop Detection configured on LSR? If not, goto
PRqA.14.
PRqA.5 Is LSR merge-capable?
If so, goto PRqA.14.
If not, goto PRqA.13.
PRqA.6 Do RAttributes include a Hop Count?
If not, goto PRqA.8.
PRqA.7 Increment RAttributes Hop Count and copy the resulting Hop
Count to SAttributes. (See Note 2.)
Goto PRqA.9.
PRqA.8 Include Hop Count of unknown (0) in SAttributes.
PRqA.9 Is Loop Detection configured on LSR?
If not, goto PRqA.14.
PRqA.10 Do RAttributes have a Path Vector?
If so, goto PRqA.12.
PRqA.11 Is LSR merge-capable?
If so, goto PRqA.14.
If not, goto PRqA.13.
PRqA.12 Add LSR Id to beginning of Path Vector from RAttributes
and copy the resulting Path Vector into SAttributes.
Goto PRqA.14.
PRqA.13 Include Path Vector of length 1 containing LSR Id in
SAttributes.
PRqA.14 DONE.
Notes:
- The link with Peer may require that Hop Count be included in Label Request messages; for example, see [RFC3035] and [RFC3034].
- For hop count arithmetic,
unknown + 1 = unknown.
A.2.8. Prepare_Label_Mapping_Attributes ๐
Summary: okay bestie, this procedure runs every single time a Label Mapping is about to go out to a Peer. Its whole job is to work out the Hop Count and Path Vector (if any) that go in the message. main character energy ๐ โจ
Parameters:
- Peer. The LDP peer the message is going to. ๐ฆ
- FEC. The FEC that a label request is being sent for. ๐ธ
- RAttributes. The attributes this LSR attaches to the LSP for FEC. ๐ง
- SAttributes. The attributes that go into the Label Mapping message. ๐
- IsPropagating. The LSR is sending the Label Mapping message to pass along one it got from the FEC next hop. ๐ฅ
- PrevHopCount. The Hop Count, if any, this LSR has tied to the LSP for the FEC. ๐
Additional Context:
- LSR Id. The unique LSR Id of this LSR. ๐
Algorithm:
PMpA.1 Do the RAttributes include any unknown TLVs?
If not, goto PMpA.4.
PMpA.2 Do the settings of the U- and F-bits require forwarding of
these TLVs?
If not, goto PMpA.4.
PMpA.3 Copy the unknown TLVs in SAttributes.
PMpA.4 Is Hop Count required for this Peer? (see Note 1.) OR Do
RAttributes include a Hop Count? OR Is Loop Detection
configured on LSR?
If not, goto PMpA.24.
PMpA.5 Is LSR egress for FEC?
If not, goto PMpA.7.
PMpA.6 Include Hop Count of 1 in SAttributes. Goto PMpA.24.
PMpA.7 Do RAttributes have a Hop Count?
If not, goto PMpA.11.
PMpA.8 Is LSR a member of the edge set for an LSR domain whose
LSRs do not perform TTL decrement AND Is Peer in that
domain? (See Note 2.) If not, goto PMpA.10.
PMpA.9 Include Hop Count of 1 in SAttributes. Goto PMpA.12.
PMpA.10 Increment RAttributes Hop Count and copy the resulting Hop
Count to SAttributes. (See Note 2.) Goto PMpA.12.
PMpA.11 Include Hop Count of unknown (0) in SAttributes.
PMpA.12 Is Loop Detection configured on LSR?
If not, goto PMpA.24.
PMpA.13 Do RAttributes have a Path Vector?
If so, goto PMpA.22.
PMpA.14 Is LSR propagating a received Label Mapping?
If not, goto PMpA.23.
PMpA.15 Does LSR support merging?
If not, goto PMpA.17.
PMpA.16 Has LSR previously sent a Label Mapping for FEC to Peer?
If not, goto PMpA.23.
PMpA.17 Do RAttributes include a Hop Count?
If not, goto PMpA.24.
PMpA.18 Is Hop Count in RAttributes unknown(0)?
If so, goto PMpA.23.
PMpA.19 Has LSR previously sent a Label Mapping for FEC to Peer?
If not, goto PMpA.24.
PMpA.20 Is Hop Count in RAttributes different from PrevHopCount?
If not, goto PMpA.24.
PMpA.21 Is the Hop Count in RAttributes > PrevHopCount? OR Is
PrevHopCount unknown(0)?
If not, goto PMpA.24.
PMpA.22 Add LSR Id to beginning of Path Vector from RAttributes
and copy the resulting Path Vector into SAttributes.
Goto PMpA.24.
PMpA.23 Include Path Vector of length 1 containing LSR Id in
SAttributes.
PMpA.24 DONE.
Notes:
- Okay so, the link with Peer might need Hop Count to be included in Label Mapping messages. See [RFC3035] and [RFC3034] for examples. ๐ง
- If the LSR sits at the edge of a cloud of LSRs that don't do TTL-decrement, and it's passing the Label Mapping upstream into that cloud, it sets the Hop Count to 1. That way the Hop Count across the cloud gets calculated properly ๐ซถ. This keeps TTL management right for packets forwarded over the part of the LSP that runs through the cloud. It's giving precision ๐
- For hop count arithmetic,
unknown + 1 = unknown. Unknown stays unknown, no cap ๐
Editors' Addresses ๐
Here are the people who edited this one, bestie:
Loa Andersson
Acreo AB
Isafjordsgatan 22
Kista, Sweden
EMail: loa.andersson@acreo.se
loa@pi.se
Ina Minei
Juniper Networks
1194 N. Mathilda Ave.
Sunnyvale, CA 94089
EMail: ina@juniper.net
Bob Thomas
Cisco Systems, Inc.
1414 Massachusetts Ave
Boxborough, MA 01719
EMail: rhthomas@cisco.com
Full Copyright Statement ๐
Copyright (C) The IETF Trust (2007) ๐ธ
This document is subject to the rights, licenses and restrictions in BCP 78. Except as set forth there, the authors keep all their rights. ๐ง
This document and the information in it are provided on an "AS IS" basis. THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐ญ
Intellectual Property ๐ฆ
The IETF doesn't take a position on whether any Intellectual Property Rights, or other rights that someone might claim over the technology in this document, are valid or in scope. It also doesn't say whether licenses for those rights are available, or whether it tried to find any such rights. ngl that's a very careful non-answer ๐ Info on how RFC documents handle rights is in BCP 78 and BCP 79.
Copies of IPR disclosures sent to the IETF Secretariat, plus any assurances of licenses, or the results of any attempt to get a general license or permission to use those proprietary rights, can be found in the IETF online IPR repository at http://www.ietf.org/ipr ๐ฅ
The IETF invites anyone to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that might cover technology needed to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org ๐ And that's a wrap, periodt โจ
๐ฆ where this page comes from
- ietf: rfc5036 2007-10
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms