view Side-By-Side changes
Date: Tue, 09 Apr 2002 05:37:52 GMT Server: Apache/1.3.20 (Unix) Last-Modified: Thu, 13 Aug 1998 08:51:27 GMT ETag: "2e6a68-2cf85-35d2a90f" Accept-Ranges: bytes Content-Length: 184197 Connection: close Content-Type: text/plain Network Working Group Loa Andersson Internet DraftBayNortel Networks Inc. Expiration Date:FebruaryMay 1999 Paul Doolan Ennovate Networks Nancy Feldman IBM Corp Andre FredetteBayNortel Networks Inc. Bob Thomas Cisco Systems, Inc.AugustNovember 1998 LDP Specificationdraft-ietf-mpls-ldp-01.txtdraft-ietf-mpls-ldp-02.txt Status of this Memo This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." To learn the current status of any Internet-Draft, please check the "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim),ftp.ietf.orgds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). Abstract An overview of Multi Protocol Label Switching (MPLS) is provided in [FRAMEWORK] and a proposed architecture in [ARCH]. A fundamental concept in MPLS is that two Label Switching Routers (LSRs) must agree on the meaning of the labels used to forward traffic between and Andersson, et al. [Page 1] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 through them. This common understanding is achieved by using the Label Distribution Protocol (LDP) referenced in[FRAMEWORK] and[ARCH]. This document defines the LDP protocol.Open Issues The following LDP issues are left unresolved with this version of the spec:Changes from Previous Draft -The loop prevention/detection mechanism to be employed by LDP.Thisspec has retaineddraft removes the explicit pathvectorsetup mechanism fromprevious drafts. However, draft-ohba-mpls-loop-prevention-01.txt has been proposed as an alternative.the spec. -Support for explicitly routed LSPs. The need for this feature has been debated at length.Thisspec refines the previous version ofdraft removes loop prevention from thespec in this area. However, there remains some belief inspec. The MPLS working group will continue to evaluate and compare theWGtwo leading contenders for loop prevention: loop prevention via path vectors and draft-ohba-mpls-loop-prevention-01.txt. We expect thatexplicitly routed LSPs shouldone of these methods will besupported by enhancements to RSVPselected andnot LDP. The support for explicitly routed LSPs in the spec is independentadded to a later version ofother LDP featuresLDP. - This draft retains andcould, shouldrefines theWG decide to do so, be removed without impactpath vector mechanism for optional loop detection. In addition, it introduces an upper limit onother LDP features.the size of path vectors. -Traffic engineering considerations beyond supportThis draft specifies parameters forexplicit routing. - The needthe exponential backup used to throttle session setup retry attempts. It also specifies a mechanism forall ofresetting theFEC types (called FEC elementsbackoff parameters inthis version ofresponse to LSR configuration changes by adding an optional parameter to thespec, SMDs in previous versions) is being debated.Hello message. - Thisversion of the spec defines fewer FEC types than previous versions.draft adds Appendix "LDP Label Distribution Procedures". -LDP supportThis draft adds rules formulticast is not definedresolving differences inthis version. Multicast support will be addressedthe Label Distribution Discipline and Merge session parameters exchanged ina future version.the Initialization message. -TheThis draft modifies message and TLV encodingsareslightly by adding explicit specification of LSR behavior when an LSR does not recognize the message or TLV. - This draft modifies the encodings for the Initialization and Hello messages to group parameters likely tochange inbe used together and to reduce message sizes. It defines someminor ways in the nextnew TLVs for use with these messages and eliminates some previously defined TLVs. - This draftofspecifies a procedure for negotiating thespec.maximum PDU length to be used for a session. Andersson, et al. [Page 2] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Table of Contents 1 LDP Overview ....................................... 6 1.1 LDP Peers .......................................... 6 1.2 LDP- This draft simplifies the encodings for the Label Mapping, Label Request, Label Withdraw and Label Release messages by eliminating the FEC-Label Mapping, FEC-Request, and FEC-Withdraw-Release TLVs. - This draft modifies the CoS TLV by specifying that its detailed definition is a subject for further study. - This draft adds a Return MessageExchange ............................... 6 1.3 LDP Error Handling ................................. 7 1.4 LDP ExtensibilityId optional parameter to the Label Request message andFuture Compatibility ......... 8 2 LDP Operation ...................................... 8 2.1 FEC Types .......................................... 8 2.2a Label Request Message Id parameter to the Label Mappingpacketsmessage toFECs ........................... 9 2.3enable an LSR to match received LabelSpaces, Identifiers, SessionsMapping messages with outstanding Label Request messages. - This draft refines support for vendor-private protocol extensions andTransport .. 10 2.4specifies support for experimental protocol extensions. - This draft specifies optional use of the TCP MD5 Signature Option to protect against the introduction of spoofed TCP segments into LDPSessions between non-Directly Connected LSRs ... 11 2.5session connection streams. Open Issues The following LDPDiscovery ..................................... 12 2.5.1 Basic Discovery Mechanism .......................... 12 2.5.2 Extended Discovery Mechanism .......................issues are left unresolved with this version of the spec: - LDP support for CoS is not completely specified in this version. Cos support will be more fully addressed in a future version. - LDP support for multicast is not specified in this version. Multicast support will be addressed in a future version. - LDP support for multipath label switching is not specified in this version. Multipath support will be addressed in a future version. Andersson, et al. [Page 3] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Table of Contents 1 LDP Overview ....................................... 7 1.1 LDP Peers .......................................... 7 1.2 LDP Message Exchange ............................... 7 1.3 LDP Message Structure .............................. 8 1.4 LDP Error Handling ................................. 8 1.5 LDP Extensibility and Future Compatibility ......... 9 2 LDP Operation ...................................... 9 2.1 FECs ............................................... 9 2.2 Label Spaces, Identifiers, Sessions and Transport .. 10 2.2.1 Label Spaces ....................................... 10 2.2.2 LDP Identifiers .................................... 11 2.2.3 LDP Sessions ....................................... 11 2.2.4 LDP Transport ...................................... 11 2.3 LDP Sessions between non-Directly Connected LSRs ... 122.62.4 LDP Discovery ..................................... 12 2.4.1 Basic Discovery Mechanism .......................... 12 2.4.2 Extended Discovery Mechanism ....................... 13 2.5 Establishing and Maintaining LDP Sessions ..........13 2.6.114 2.5.1 LDP Session Establishment ..........................13 2.6.214 2.5.2 Transport Connection Establishment .................13 2.6.314 2.5.3 Session Initialization .............................14 2.6.415 2.5.4 Initialization State Machine .......................16 2.6.517 2.5.5 Maintaining Hello Adjacencies ......................19 2.6.620 2.5.6 Maintaining LDP Sessions ...........................19 2.720 2.6 Label Distribution and Management ..................20 2.7.121 2.6.1 Label Distribution Control Mode ....................20 2.7.221 2.6.1.1 Independent Label Distribution Control ............. 21 2.6.1.2 Ordered Label Distribution Control ................. 21 2.6.2 Label Retention Mode ...............................21 2.7.322 2.6.2.1 Conservative Label Retention Mode .................. 22 2.6.2.2 Liberal Label Retention Mode ....................... 22 2.6.3 Label Advertisement Mode ...........................22 2.823 2.7 LDP Identifiers and Next Hop Addresses .............22 2.923 2.8 Loop Detection .....................................22 2.10 Loop Prevention via Diffusion ...................... 23 2.11 Explicitly Routing LSPs ............................242.12 ERLSP State Machine ................................ 28 2.12.1 Loose Segment Peg LSR Transitions: ................. 29 2.12.2 Loose Segment Non-Peg LSR Transitions: ............. 33 2.12.2.1 Strict Segment Transitions ......................... 35 2.12.3 ERLSP Timeouts ..................................... 35 2.12.4 ERLSP Error Codes .................................. 352.8.1 Label Request Message .............................. 24 2.8.2 Label Mapping Message .............................. 26 2.8.3 Discussion ......................................... 27 3 Protocol Specification .............................3628 3.1 LDP PDUs ...........................................3628 3.2 LDP Procedures ..................................... 29 3.3 Type-Length-Value Encoding .........................37 3.330 3.4 TLV Encodings for Commonly UsedTLVs ................................. 38 3.3.1Parameters ......... 31 3.4.1 FEC TLV ............................................38 3.3.1.131 3.4.1.1 FEC Procedures .....................................41 3.3.234 Andersson, et al. [Page 4] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3.4.2 Label TLVs .........................................41 3.3.2.134 3.4.2.1 Generic Label TLV ..................................42 3.3.2.234 3.4.2.2 ATM Label TLV ......................................42 3.3.2.334 3.4.2.3 Frame Relay Label TLV ..............................43 Andersson, et al. [Page 3] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 3.3.335 3.4.3 Address List TLV ...................................43 3.3.436 3.4.4 COS TLV ............................................44 3.3.537 3.4.5 Hop Count TLV ......................................45 3.3.5.137 3.4.5.1 Hop Count Procedures ...............................45 3.3.638 3.4.6 Path Vector TLV ....................................46 3.3.6.138 3.4.6.1 Path Vector Procedures .............................46 3.3.739 3.4.6.1.1 Label Request Path Vector .......................... 39 3.4.6.1.2 Label Mapping Path Vector .......................... 40 3.4.7 Status TLV .........................................47 3.440 3.5 LDP Messages .......................................48 3.4.142 3.5.1 Notification Message ...............................50 3.4.1.144 3.5.1.1 Notification Message Procedures ....................51 3.4.1.245 3.5.1.2 EventsSignalledSignaled by Notification Messages.......... 51 3.4.1.2.1........... 45 3.5.1.2.1 Malformed PDU or Message ...........................52 3.4.1.2.246 3.5.1.2.2 Unknown or Malformed TLV ...........................52 3.4.1.2.346 3.5.1.2.3 Session Hold Timer Expiration ......................53 3.4.1.2.447 3.5.1.2.4 Unilateral Session Shutdown ........................53 3.4.1.2.547 3.5.1.2.5 Initialization Message Events ......................53 3.4.1.2.647 3.5.1.2.6 Events Resulting From Other Messages ...............54 3.4.1.2.7 Explicitly Routed LSP Setup Events ................. 54 3.4.1.2.847 3.5.1.2.7 Miscellaneous Events ...............................54 3.4.248 3.5.2 Hello Message ......................................54 3.4.2.148 3.5.2.1 Hello Message Procedures ...........................55 3.4.350 3.5.3 Initialization Message .............................57 3.4.3.151 3.5.3.1 Initialization Message Procedures ..................61 3.4.458 3.5.4 KeepAlive Message ..................................61 3.4.4.159 3.5.4.1 KeepAlive Message Procedures .......................62 3.4.559 3.5.5 Address Message ....................................62 3.4.5.159 3.5.5.1 Address Message Procedures .........................63 3.4.660 3.5.6 Address Withdraw Message ...........................64 3.4.6.161 3.5.6.1 Address Withdraw Message Procedures ................64 3.4.761 3.5.7 Label Mapping Message ..............................64 3.4.7.161 3.5.7.1 Label Mapping Message Procedures ...................66 3.4.7.1.163 3.5.7.1.1 Independent Control Mapping ........................66 3.4.7.1.263 3.5.7.1.2 Ordered Control Mapping ............................67 3.4.7.1.364 3.5.7.1.3 Downstream-on-Demand Label Advertisement ...........67 3.4.7.1.464 3.5.7.1.4 DownstreamAllocationUnsolicited Label Advertisement.......... 68 3.4.8......... 65 3.5.8 Label Request Message ..............................68 3.4.8.165 3.5.8.1 Label Request Message Procedures ...................69 3.4.966 3.5.9 Label Withdraw Message .............................70 3.4.9.167 3.5.9.1 Label Withdraw Message Procedures ..................71 3.4.1068 3.5.10 Label Release Message ..............................72 3.4.10.169 3.5.10.1 Label Release Message Procedures ...................73 3.4.11 Label Query Message ................................ 73 3.4.11.1 Label Query Message Procecures ..................... 74 3.4.12 Explicit Route Request Message ..................... 74 3.4.12.1 Explicit Route Request Procedures .................. 78 3.4.13 Explicit Route Response Message .................... 78 3.4.13.1 Explicit Route Response Procedures ................. 79 3.570 3.6 Messages and TLVs for Extensibility ................8071 3.6.1 LDP Vendor-private Extensions ...................... 71 Andersson, et al. [Page4]5] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.5.1 Procedures for Unknown Messages and TLVs ........... 80 3.5.1.1 Unknown Message Types .............................. 80 3.5.1.2 Unknown TLV in Known Message Type .................. 80 3.5.2 LDP Vendor-Private Extensions ...................... 81 3.5.2.13.6.1.1 LDPVendor-Private TLV ............................. 81 3.5.2.2Vendor-private TLVs ............................ 71 3.6.1.2 LDPVendor-PrivateVendor-private Messages ........................82 3.672 3.6.2 LDP Experimental Extensions ........................ 74 3.7 Message Summary .................................... 74 3.8 TLV Summary ........................................83 3.775 3.9 Status Code Summary ................................8476 3.10 UDP and TCP Ports .................................. 76 4 Security ...........................................8477 4.1 The TCP MD5 Signature Option ....................... 77 4.2 LDP Use of the TCP MD5 Signature Option ............ 78 5Acknowledgments .................................... 84Intellectual Property Considerations ............... 79 6 Acknowledgments .................................... 79 7 References .........................................84 779 8 Author Information ................................. 80 Appendix.A LDP Label Distribution Procedures .................. 82 A.1 Handling Label Distribution Events ................. 84 A.1.1 Receive Label Request .............................. 85 A.1.2 Receive Label Mapping .............................. 88 A.1.3 Receive Label Release .............................. 92 A.1.4 Receive Label Withdraw ............................. 94 A.1.5 Recognize New FEC .................................. 95 A.1.6 Detect change in FEC next hop ...................... 98 A.1.7 Receive Notification / No Label Resources .......... 100 A.1.8 Receive Notification / No Route .................... 101 A.1.9 Receive Notification / Loop Detected ............... 102 A.1.10 Receive Notification / Label Resources Available ... 102 A.1.11 Detect local label resources have become available . 103 A.1.12 LSR decides to no longer label switch a FEC ........ 104 A.1.13 Timeout of deferred label request .................. 104 A.2 Common Label Distribution Procedures ............... 105 A.2.1 Send_Label ......................................... 105 A.2.2 Send_Label_Request ................................. 107 A.2.3 Send_Label_Withdraw ................................ 108 A.2.4 Send_Notification .................................. 108 A.2.5 Send_Message ....................................... 109 A.2.6 Check_Received_Attributes .......................... 109 A.2.7 Prepare_Label_Request_Attributes ................... 110 A.2.8 Prepare_Label_Mapping_Attributes ................... 112 Andersson, et al. [Page5]6] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 1. LDP Overview LDP is the set of procedures and messages by which Label Switched Routers (LSRs) establish Label Switched Paths (LSPs) through a network by mapping network-layer routing information directly to data-link layer switched paths. These LSPs may have an endpoint at a directly attached neighbor (comparable to IP hop-by-hop forwarding), or may have an endpoint at a network egress node, enabling switching via all intermediary nodes. LDP associates aforwarding equivalence classForwarding Equivalence Class (FEC) [ARCH] with each LSP it creates. The FEC associated with an LSP specifies which packets are "mapped" to that LSP. LSPs are extended through a network as each LSR "splices" incoming labels for a FEC to the outgoing label assigned to the next hop for the given FEC. Note that this document is written with respect to unicast routing only. Multicast will be addressed in a future revision.Note that this document is written with respect to control-driven traffic. It describes mappings which are initiated for routes in the forwarding table, regardless of traffic over those routes. However, LDP does not preclude data-driven support.1.1. LDP Peers Two LSRs which use LDP to exchange label/stream mapping information are known as "LDP Peers" with respect to that information and we speak of there being an "LDP Session" between them. A single LDPadjacencysession allows each peer to learn the other's labelmappings i.e.mappings; i.e., the protocol is bi-directional. 1.2. LDP Message Exchange There are four categories of LDP messages: 1. Discovery messages, used to announce and maintain the presence of an LSR in a network. 2. Session messages, used toestablishestablish, maintain, andmaintainterminate sessions betweenLSRLDP peers. 3. Advertisement messages, used to create, change, and delete label mappings for FECs.Andersson, et al. [Page 6] Internet Draft draft-ietf-mpls-ldp-00.txt August 19984. Notification messages, used to provide advisory information and to signalerrors.error information. Discovery messages provide a mechanism whereby LSRscontinuallyindicate their presence in a networkviaby sending the Hellomessage.message periodically. This is transmitted as a UDP packet to the LDP port at the `allLSRAndersson, et al. [Page 7] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 routers' group multicast address. When an LSR chooses to establish a session withananother LSR learned via thehelloHello message, it uses the LDP initialization procedure over TCP transport. Upon successful completion of the initialization procedure, the two LSRs are LDP peers, and may exchange advertisement messages. When to request a label or advertise a label mapping to a peer is largely a local decision made by an LSR. In general, the LSR requests a label mapping from a neighboring LSR when it needs one, and advertises a label mapping to a neighboring LSR when it wishes the neighbor to use a label. Correct operation of LDP requires reliable and in order delivery ofmappings (although there are circumstances when this second requirement could be relaxed).messages. To satisfy these requirements LDP uses the TCP transport foradjacency,session, advertisement and notificationmessages.messages; i.e., for everything but the UDP-based discovery mechanism. 1.3. LDP Message Structure All LDP messages have a common structure that 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, may itself contain one or more TLVs. 1.4. LDP Error Handling LDP errors and other events of interest are signaled to anLSRLDP peer by notification messages. There are two kinds of LDP notification messages: 1. Error notifications, used to signal fatal errors. If an LSR receives an error notification from a peer for an LDPsession with a peer,session, it terminates thepeerLDP session by closing the TCP transport connection for the session and discarding all label mappings learned via the session. 2. Advisory notifications, used to pass an LSR information about the LDP session or the status of some previous message received from the peer. Andersson, et al. [Page7]8] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19981.4.1.5. LDP Extensibility and Future CompatibilityIt is likely that functionality willFunctionality may be added to LDPafter its initial release.in the future. It isalsolikely thatthis additionalfuture functionality will utilize new messages and object types (TLVs). It may be desirable to employ such new messages and TLVs within a network using older implementations that do not recognize them. While it is not possible to make every future enhancement backwards compatible, some prior planning can ease the introduction of new capabilities. This specification defines rules for handling unknown message types and unknown TLVs for this purpose. 2. LDP Operation 2.1.FEC TypesFECs It is necessary to preciselydefinespecify which IP packets may be mapped to each LSP. This is done by providing a FEC specification for each LSP. The FECdefines whichidentifies the set of IP packets which may be mapped tothe same LSP, using a unique label. LDP supports LSP granularity ranging from end-to-end flows to the aggregation of all traffic through a common egress node; the choice of granularity is determined by the FEC choice.that LSP. Each FEC is specified as alistset of one or more FEC elements. Each FEC elementspecifiesidentifies a set of IP packets which may be mapped to the corresponding LSP. When an LSP is shared by multiple FEC elements, that LSP is terminated at (or before) the node where the FEC elements can no longer share the same path. Following are the currently defined types of FEC elements. New element types may be added as needed: 1. IP Address Prefix. This elementprovides a list of one or more IP address prefixes. Anyis an IPpacket whose destinationaddressmatches one or moreprefix ofthe specified prefixes may be forwarded using the associated LSP.any length from 0 to 32 bits, inclusive. 2.Router IDHost Address. This elementprovidesis aRouter ID (ie,32-bit IP address. We say that a32 bitparticular IP addressof"matches" arouter). Anyparticular IP address prefix if and only if that address begins with that prefix. We also say that a particular packetformatches a particular LSP if and only if that LSP has an IP Address Prefix FEC element which matches thepath to thepacket's IP destinationis knownaddress. With respect totraverse the specified router may be forwarded using the associated LSP. Thisa particular packet and a particular LSP, we refer to any IP Address Prefix FEC elementallowswhich matches thefull set of destinations reachable viapacket as the "matching prefix". The procedure for mapping aspecified routerparticular packet to a particular LSP uses the following rules. Each rule is applied in turn until the packet can beindicatedmapped to an LSP. Andersson, et al. [Page8]9] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998in- If there is exactly one LSP which has asingleHost Address FECelement. 3. Flow This element specifies a set of datagram information, such as port, dest-addr, src-addr, etc. Thiselementprovides LDP with the abilitythat is identical tosupport MPLS flows with no aggregation. Where athe packet's IP destination address, then the packetmapsis mapped tomore than onethat LSP. - If there multiple LSPs, each containing a Host Address FECitelement that istransmitted onidentical to theLSP associated withpacket's IP destination address, then theFECpacket is mapped towhichone of those LSPs. The procedure for selecting one of those LSPs is beyond the scope of this document. - If a packethasmatches exactly one LSP, the'most specific' match. 2.2. Mapping packetspacket is mapped toFECs FEC objects (TLVs) are transmitted in the LDP messagesthatdeal with (advertise, request, release ad withdraw) FEC-Label mappings. A stream of packets with a given destination network can be characterized byLSP. - If asingle Address Prefix FEC Element. This results in each specified address prefix sustaining its ownpacket matches multiple LSPs, it is mapped to the LSPtree. This singular mappingwhose matching prefix is the longest. If there isrecommended in environments where little ornoaggregation informationone LSP whose matching prefix isprovided by the routing protocols (such as within a simple IGP), or in networks wherelongest, thenumberpacket is mapped to one ofdestination prefixesthose LSPs. The procedure for selecting one of those LSPs islimited. In environments where additional aggregation not provided bybeyond therouting protocolsscope of this document. - If it isdesired, an aggregation list may be created. In this, all prefixesknown thatare to shareacommonpacket must traverse a particular egresspoint may be advertised within the same FEC. This type of aggregationrouter, and there isconfigured. The router ID FEC type may be used in any environment inan LSP whichthe routing protocols allow routers to determine the egress point for specifichas an IPpackets. For example, the router IDAddress Prefix FECtype may be used in combination with BGP, OSPF, and/or IS-IS. For example, the mapping between IP packets and the router ID may be provided via the BGP NEXT_HOP attribute. When a BGP border LSR injects routes into the BGP mesh, it may use its own IP address or theelement (of length 32 bits) which is an address ofits external BGP peer as the value of the NEXT_HOP attribute. If the BGP border ISR uses its own IP address as the NEXT_HOP attribute,that router, thenone LSP is created which terminates at the BGP border, and the border LSR will forward traffic at layer-3 towards its external BGP neighbors. If the BGP border LSR uses the external BGP peer astheNEXT_HOP attribute, then a separate LSP may be createdpacket is mapped to that LSP. The procedure foreach external BGP neighbor, thereby allowingobtaining this knowledge is beyond theborder LSR to switch traffic directly to eachscope ofits external BGP Andersson, et al. [Page 9] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 neighbors. Similarly, the mapping between IP packetthis document. 2.2. Label Spaces, Identifiers, Sessions androuter ID may be provided by OSPF. This is comprisedTransport 2.2.1. Label Spaces The notion of "label space" is useful for discussing theRouter IDassignment and distribution ofthe routerlabels. There are two types of label spaces: - Per interface label space. Interface-specific incoming labels are used for interfaces thatinitiated the link state advertisement. The Router ID may also be the OSPF Area Border Router. Note that BGP and OSPF may share the same LSP when a given Router ID is found in both protocol's Routing Information Base. The Router ID FEC allows aggregation of multiple IP address prefixes to the same LSP, without requiring that the prefixes be explicitly listed in the FEC. Also, it allows addresses advertised using OSPF and addresses advertised using BGP to be aggregated using the same LSP. Finally, when the set of addresses reachable via a router changes, and the changes are announced into the routing protocol (BGP, OSPF, and/or IS-IS), use of the routerID FEC eliminates the need to explicitly announce the route changes into LDP. 2.3. Label Spaces, Identifiers, Sessions and Transport The notion of "label space" is useful for discussing the assignment and distribution of labels. 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 of such an interface is a label- controlled ATM interface which uses VCIs as labels, or a frame Relay interface which uses DLCIs as labels.use interface resources for labels. An example of such an interface is a label-controlled ATM interface that uses VCIs as labels, or a Frame Relay interface that uses DLCIs as labels. Note that the use of 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. Andersson, et al. [Page 10] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 2.2.2. LDP Identifiers An LDP identifier is a six octet quantity used to identify an LSR label space. The first four octets encode an IP address assigned to the LSR, and the last two octets identify a specific label space within the LSR. The last two octets of LDPIdentif- iersIdentifiers for platform-wide label spaces are always both zero. This document uses the following print representation for LDPIden- tifiers: Andersson, et al. [Page 10] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998Identifiers: <IP address> :<Label<label spaceId> for example,id> e.g., 171.32.27.28:0, 192.0.3.5:2. Note that an LSR that manages and advertisesmore than onemultiple labelspacespaces uses a different LDP Identifier for each such label space. A situation where an LSR would need to advertise more than one label space to a peer and hence use more than one LDP Identifier occurs when the LSR has two links to the peer and both are ATM (and use per interface labels). Another situation would be where the LSR had two links to the peer, one of which isether- netethernet (and uses per platformlables)labels) and the other of which is ATM. 2.2.3. LDP Sessions LDP sessions exist between LSRs to support label exchange between them. Whenaan LSRmust useuses LDP to advertise more than one label space to another LSR it uses a separate LDP session for each labelspace rather than a singlespace. 2.2.4. LDPsession for all the label spaces.Transport LDP uses TCP as a reliable transport for sessions. When multiple LDP sessions are required between twoplatformsLSRs there is oneLDP session perTCPconnection rather than manysession for each LDPsessions per TCP connection. 2.4.session. Andersson, et al. [Page 11] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 2.3. LDP Sessions between non-Directly Connected LSRs LDP sessions between LSRs that are not directly connected at the link level may be desirable in some situations. For example, consider a "traffic engineering" application whereLSR LSR1LSRa sends traffic matching some criteria via an LSP to non-directly connectedLSR LSR2LSRb rather than forwarding the traffic along itsnor- mallynormally routed path. The path between LSRa and LSRb would include one or more intermediate LSRs (LSR1,...LSRn). An LDP session betweenLSR1LSRa andLSR2 enables LSR2LSRb would enable LSRb to label switch traffic arriving on the LSP fromLSR1.LSRa by providing LSRb means to advertise labels for this purpose to LSRa. In this situationLSR1 appliesLSRa would apply 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.First, itLSRa first adds the label learned viatheits LDP session withLSR2LSRb to the packet label stack (either 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.Andersson, et al. [Page 11] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 2.5.2.4. LDP Discovery LDP discovery is a mechanism that enables an LSR to discoverpoten- tialpotential LDP peers. Discovery makes it unnecessary to explicitlyconfig- ureconfigure an LSR's label switching peers. 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.5.1.2.4.1. Basic Discovery Mechanism To engage in LDP Basic Discovery on an interface an LSR periodically sends LDP Link Hellos out the interface. LDP Link Hellos are sent as UDP packets addressed to thewell knownwell-known LDP discovery port for the "all routers" group multicast address. Andersson, et al. [Page 12] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 additional information. Receipt of an LDP Link Hello on an interface identifies a "Hello adjacency" with a potential LDP peer reachable at the link level on the interface as well as the label space the peer intends to use for the interface.2.5.2.2.4.2. Extended Discovery Mechanism LDP sessions between non-directly connected LSRs are supported by LDP Extended Discovery. To engage in LDP Extended Discovery an LSR periodically sends LDP Targeted Hellos to a specific IP address. LDP Targeted Hellos are sent as UDP packets addressed to thewell knownwell-known LDP discovery port at the specific address. An LDP Targeted Hello sent by an LSR carries the LDP Identifier for the label space the LSR intends to use and possibly additional optional information. Extended Discovery differs from Basic Discovery in the following ways:Andersson, et al. [Page 12] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998- A Targeted Hello is sent to a specific IP 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 to the initiating LSR. Receipt of an LDP Targeted Hello identifies a "Hello adjacency" with a potential LDP peer reachable at the network level and the label space the peer intends to use.2.6.Andersson, et al. [Page 13] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 2.5. Establishing and Maintaining LDP Sessions2.6.1.2.5.1. LDP Session Establishment The exchange of LDP Discovery Hellos between two LSRs 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.6.2.2.5.2. Transport Connection Establishment The exchange of Hellos results in the creation of a Hello adjacency at LSR1which bindsthat serves to bind the link (L) and the label spaces LSR1:a and LSR2:b. 1. If LSR1 does not already have an LDP session for the exchange of label spaces LSR1:a and LSR2:b it attempts to openan LDPa TCP connection for a new LDP session with LSR2. LSR1 determines the transport addresses to be used at its end (A1) and LSR2's end (A2) of the LDP TCP connection. Address A1 is determined as follows:Andersson, et al. [Page 13] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 a)a. If LSR1 uses the Transport Address optional object (TLV) in Hello's it sends tospecifyLSR2 to advertise an address, A1 is the address LSR1 advertises via the optional object;b)b. If LSR1 does not use the Transport Address optional object, A1 is the source IP address usedforin Hellos it sends to LSR2. Similarly, address A2 is determined as follows:a)a. If LSR2 uses the Transport Address optionalobject (TLV),object, A2 is the address LSR2 advertises via the optional object;b)b. If LSR2 does not use the Transport Address optional object, A2 is the source IP addressused forin Hellos received from LSR2. 2. LSR1 determines whether it will play the active or passive role in session establishment by comparing addresses A1 and A2 as Andersson, et al. [Page 14] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 unsigned integers. If A1 > A2, LSR1 plays the active role; otherwise it is passive. 3. If LSR1 is active, it attempts to establish the LDP TCPcon- nectionconnection by connecting to thewell knownwell-known LDP port at address A2. If LSR1 is passive, it waits for LSR2 to establish the LDP TCP connection to itswell knownwell-known LDP port.2.6.3.2.5.3. Session Initialization After LSR1 and LSR2 establish a transport connection they negotiate session parameters by exchanging LDP Initialization messages. The parameters negotiated include LDP protocol version, labeldistribu- tiondistribution method, timer values, VPI/VCI ranges for label controlled ATM, DLCI ranges for label controlled Frame Relay, etc. Successful negotiation completes establishment of an LDP session between LSR1 and LSR2 for the advertisement of label spaces LSR1:a and LSR2:b. The following describes the session initialization from LSR1's point of view.1.After the connection is established, if LSR1 is playing the active role, it initiates negotiation of session parameters by sending an Initialization message to LSR2. If LSR1 isAndersson, et al. [Page 14] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998passive, it waits for LSR2 to initiate the parameternegotia- tion.negotiation. In general when there are multiple links between LSR1 and LSR2 and multiple label spaces to be advertised by each, thepas- sivepassive LSR cannot know which label space to advertise over a newly established TCP connection until it receives the first LDP PDU on the connection. By waiting for the Initialization message from its peer the passive LSR can match the label space to be advertised by the peer (as determined from the LDP Identifier in thecommonPDU header for the Initialization message) with a Hello adjacency previously created when Hellos were exchanged.2.1. When LSR1 plays the passive role:a)a. If LSR1 receives an Initialization message it attempts to match the LDP Identifier carried by the message PDU with a Hello adjacency.b)b. If there is a matching Hello adjacency, the adjacency specifies the local label space for the session. Andersson, et al. [Page 15] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 wishes to use and a KeepAlive message to signal acceptance of LSR2's parameters. If theparame- tersparameters are not acceptable, LSR1 responds by sending aNakSession Rejected/Parameters Error Notification message and closing the TCP connection.c)c. If LSR1 cannot find a matching Hello adjacency it sends aNakSession Rejected/No Hello Error Notification message and closes the TCP connection.d)d. If LSR1 receives a KeepAlive in response to itsInitiali- zationInitialization message, the session is operational from LSR1's point of view.e)e. If LSR1 receivesa Nakan Error Notification message, LSR2 has rejected its proposed sessionparametersand LSR1 closes the TCPcon- nection. 3.connection. 2. When LSR1 plays the active role:a)a. If LSR1 receivesa Nakan Error Notification message, LSR2 has rejected its proposed sessionparametersand LSR1 closes the TCPcon- nection. Andersson, et al. [Page 15] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 b)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 sessionparame- tersparameters are unacceptable, LSR1 sends aNakSession Rejected/Parameters Error Notification message and closes the connection.c)c. If LSR1 receives a KeepAlive message, LSR2 has accepted its proposed session parameters.d)d. When LSR1 has received both an acceptable Initialization message and a KeepAlive message the session isopera- tionaloperational from LSR1's point of view. It is possible for a pair of incompatibly configured LSRs that disagree on session parameters to engage in an endless sequence of messages as eachNaksNAKs the other's Initialization messages with Error Notification messages. An LSR must throttle its session setup retry attempts with an exponential backoff in situations where Initialization messages Andersson, et al. [Page 16] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 are beingNak'd.NAK'd. It is also recommended that an LSR detecting such asitua- tionsituation take action to notify an operator.2.6.4. Initialization State Machine It is convenient to describe LDPThe sessionnegotiation behaviorestablishment setup attempt following 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 sequence of Initialization NAKs is unlikely to cease until operator intervention reconfigures one of the LSRs. After such a configuration action there is no further need to throttle subsequent session establishment attempts (until their initialization messages are NAK'd). Due to the asymmetric nature of session establishment, reconfiguration of the passive LSR will go unnoticed by the active LSR without some further action. 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 is convenient to describe LDP session negotiation behavior in terms of a state machine. We define the LDP state machine to have five possible states and present the behavior as a state transition table and as a state transition diagram. Andersson, et al. [Page16]17] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 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: TransmitNakError Notification msg (NAK) and close transport connection OPENREC Receive KeepAlive msg OPERATIONAL Receive Any other LDP msg NON EXISTENT Action: TransmitNakError 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: TransmitNakError 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 Andersson, et al. [Page17]18] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 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 / | +---| |-+ | TxNakNAK msg | | +-----------+ | | | | (Passive Role) | (Active Role) | | | Rx Acceptble | Tx Init msg/|Tx| | Init msg / | | | | Tx Init msg | | | | Tx KeepAlive | | | V msg V | | +-------+ +--------+ | | | | | | | +---|OPENREC| |OPENSENT|----------------->| +---| | | | Rx Any other msg | | +-------+ +--------+ or Timeout | Rx KeepAlive | ^ | TxNakNAK msg | msg | | | | | | | Rx Acceptable | | | | Init msg / | | +----------------+ Tx KeepAlive msg | | | | +-----------+ | +----->| | | |OPERATIONAL| | | |---------------------------->+ +-----------+ Rx Shutdown msg All other | ^ orTIMEOUTTimeout / LDP msgs | | Tx Shutdown msg | | +---+ Andersson, et al. [Page18]19] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19982.6.5.2.5.5. Maintaining Hello Adjacencies An LDP session with a peer has one or more Hello adjacencies. An LDP session has multiple Hello adjacencies when a pair of LSRsareis connected by multiple links that share the same label space; for example, multiple PPP links between a pair of routers. In this situation the Hellos an LSR sends on each such linkcarriescarry the same LDP Identifier. LDP includes mechanisms to monitor the necessity of an LDP session and its Hello adjacencies. LDP uses the regular receipt of LDP Discovery Hellos to indicate a peer's intent to use the label space identified by the Hello. An LSR maintains a hold timer with each Hello adjacency which it restarts when it receives a Hello that matches the adjacency. If the timer expires without receipt of a matching Hello from the peer, LDPcon- cludesconcludes that the peer no longer wishes to label switch using that label space forthethat link (or target, in the case of Targeted Hellos)in questionor that the peer hasfailed, and itfailed. The LSR then deletes the Hello adjacency. When the last Hello adjacency for a LDP session is deleted, the LSR terminates the LDP session by closing the transport connection.2.6.6.2.5.6. Maintaining LDP Sessions LDP includes mechanisms to monitor the integrity of thesession tran- sport connection.LDP session. LDP uses the regular receipt of LDP PDUs on the session transport connection to monitor the integrity of theconnection.session. An LSRmain- tainsmaintains akeepaliveKeepAlive timer for each peer session which it resetswhen- everwhenever it receives an LDP PDU from the session peer. If thekeepaliveKeepAlive timer expires without receipt of an LDP PDU from the peer the LSR concludes that the transport connection is bad or that the peer has failed, and it terminates thepeerLDP session by closing the transport connection.AnAfter an LDP session has been established, an LSR must arrange that itsLDPpeerseesreceive an LDP PDU from it at least everykeepaliveKeepAlive time period to ensure the peer restarts the sessionkeepaliveKeepAlive timer. The LSR may send any protocol message to meet this requirement. In circumstances where an LSR has no other information to communicate to its peer, it sends a KeepAlive message. An LSR may choose to terminate an LDP session with a peer at any time. Should it choose to do so, it informs the peer with a Shutdown message. Andersson, et al. [Page19]20] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998message. 2.7.2.6. Label Distribution and Management2.7.1. Label Distribution Control ModeThebehavior of the initial setup of LSPs is determined by whether theMPLS architecture [ARCH] allows an LSR to distribute a FEC label binding in response to an explicit request from another LSR. This isoperating with independent or ordered LSP control. An LSR may support both types of controlknown asa configurableDownstream On Demand label distribution. It also allows an LSR to distribute label bindings to LSRs that have not explicitly requested them. This is known as Downstream Unsolicited label distribution. Both of these label distribution techniques may be used in the same network at the same time. However, for any given LDP session, each LSR must be aware of the label distribution method used by its peer in order to avoid situations where one peer using Downstream Unsolicted label distribution assumes its peer is also. See Section "Downstream-on-Demand label Advertisement". 2.6.1. Label Distribution Control Mode The behavior of the initial setup of LSPs is determined by whether the LSR is operating with independent or ordered LSP control. An LSR may support both types of control as a configurable option.2.7.1.1.2.6.1.1. Independent Label Distribution Control When using independent LSP control, eachnodeLSR may advertise label mappings to its neighbors at any time it desires. For example, when operating in independent Downstream-on-Demand mode, an LSR may answer requests for label mappings immediately, without waiting for a label mapping from the next hop. When operating in independent DownstreamallocationUnsolicited mode, an LSR may advertise a label mapping for a FEC to its neighbors whenever it is prepared to label-switch that FEC. A consequence of using independent mode is that an upstream label can be advertised before a downstream label is received. This can result in unlabeled packets being sent to the downstreamnode. 2.7.1.2.LSR. 2.6.1.2. Ordered Label Distribution Control When using LSP ordered control, an LSR may initiate the transmission of a label mapping only forana FEC for which it has a label mapping for the FEC next hop, or for which the LSR is the egress. For each FEC for which the LSR is not the egress and no mapping exists, the LSR MUST wait until a label from a downstream LSRforis received before mapping the FEC and passing corresponding labels to upstream LSRs. Andersson, et al. [Page 21] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 An LSR may be an egress for someFECs,FECs and a non-egress for others. An LSR may act as an egress LSR, with respect to a particular FEC, under any of the following conditions: 1. The FEC refers to the LSR itself (including one of its directly attached interfaces). 2. The next hop router for the FEC is outside of the Label Switching Network. 3 FEC elements are reachable by crossing a routing domainboun- dary,boundary, such as another area for OSPF summarynet-works,networks, or another autonomous system for OSPF AS externals and BGP routesAndersson, et al. [Page 20] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998[rfc1583] [rfc1771].2.7.2.2.6.2. Label Retention Mode2.7.2.1.2.6.2.1. Conservative Label Retention Mode In DownstreamAllocationUnsolicited advertisement mode, label mappingadvertisementsadver- tisements for all routes may be received from all peer LSRs. When using conservative label retention, advertised label mappings areonlyretained only if they will be used to forward packets (i.e., if they are received from a valid next hop according to routing). Ifoperatingoperat- ing inDownstream- on-DemandDownstream-on-Demand mode, an LSR will request label mappingswillonlybe requested offrom theappropriatenext hop LSR according to routing. SinceDownstream-on- DemandDownstream- on-Demand mode is primarily used when label conservation is desired (e.g., an ATM switch with limited cross connect space), it is typi- cally used with the conservative label retention mode. The main advantage of the conservative mode is thattheonly the labels that are required for the forwarding of data are allocated andmaintained.main- tained. This is particularly important in LSRs where the label space is inherently limited, such as in an ATM switch. Adisadvan- tagedisadvantage of the conservative mode is that if routing changes the next hop for a given destination, a new label must be obtained from the new next hop before labeled packets can be forwarded.2.7.2.2.2.6.2.2. Liberal Label Retention Mode In DownstreamAllocationUnsolicited advertisement mode, label mappingadvertisementsadver- tisements for all routes may be received from allpeer LSRs.LDP peers. When using liberal label retention,advertisedevery label mappingsare retainedreceived fromall next hopsa peer LSR is retained regardless of whetherthey are validthe LSR is the nexthopshop for the advertised mapping. When operating in Downstream-on-Demandmode,mode with liberal label retention, an LSR might choose to request Andersson, et al. [Page 22] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 label mappingsare requested offor all known prefixes from all peer LSRs. Note,however,how- ever, thatDownstream-on- DemandDownstream-on-Demand mode is typicallyassociated withused by devices such as ATM switch-based LSRswherefor which the conservative approach is recommended. The main advantage of the liberal label retention mode is that reac- tion to routing changes can be quick because labels already exist. The main disadvantage of the liberal mode is that unneeded label map- pings are distributed and maintained.Andersson, et al. [Page 21] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 2.7.3.2.6.3. Label Advertisement Mode Each interface on an LSR is configured to operate in either Down- stream Unsolicited or Downstream-on-Demandallocationadvertisement mode. LSRs exchangeadver- tisementadvertisement modes during initialization. The major difference between Downstream Unsolicited and Downstream-on-Demand modes is in which LSR takes responsibility for initiating mapping requests and mappingadvertise- ments 2.8.advertisements. 2.7. LDP Identifiers and Next Hop Addresses An LSR maintains learned labels in a Label Information Base (LIB). When operating in Downstream(as opposed to Downstream-on-Demand) more,Unsolicited mode, the LIB entry for an address prefix associates a collection of (LDP Identifier, label) pairs with the prefix, one such pair for each peer advertising a label for the prefix. When the next hop for a prefix changes the LSR must retrieve the label advertised by the new next hop from the LIB for use in forward- ing. To retrieve the label the LSR must be able to map the next hop address for the prefix to an LDP Identifier. Similarly, when the LSR learns a label for a prefix from an LDP peer, it must be able to determine whether that peer is currently a next hop for the prefix to determine whether it needs to start using the newly learned label when forwarding packets that match the prefix. To make that decision the LSR must be able to map an LDP Identifier to the peer's addresses to check whether any are a next hop for the prefix. To enable LSRs to map between a peer LDP identifier and the peer's addresses, LSRs advertise their addresses using LDP Address and With- draw Address messages. An LSR sends an Address message to advertise its addresses to a peer. An LSR sends a Withdraw Address message to withdraw previouslyadver- tisedAndersson, et al. [Page 23] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 advertised addresses from a peer2.9.2.8. Loop DetectionEach LSR MUST support the configurable loop-detection option. LSRs perform loopLoop detectionviais a configurable option which provides a mechanism for finding looping LSPs and for preventing Label Request messages from looping in theLSR-path-vector object (TLV) contained within each Mappingpresence of non-merge capable LSRs. The mechanism makes use of Path Vector andQuery message. Upon receiving suchHop Count TLVs carried by Label Request and Label Mapping messages. It builds on the following basic properties of these TLVs: - A Path Vector TLV contains ames- sage,list of the LSRs that its containing message has traversed. An LSRperforms loop detectionis identified in a Path Vector list byverifying thatits uniquerouter-idLSR Identifier (Id), which isnot already present inthelist. IfIP address component of its LDP Identifier. When an LSR propagates aloop is detected,mes- sage containing a Path Vector TLV it adds its LSR Id to the Path Vector list. An LSRmust transmitthat receives aNAKmessagetowith a Path Vector that contains its LSR Id detects that thesending node, and does Andersson, et al. [Page 22] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 not installmessage has traversed a loop. LDP supports themapping or propagatenotion of a maximum allowable Path Vector length; an LSR that detects a Path Vector has reached themessage any further. In addition,maximum length behaves as ifthere is an upstream label spliced tothedownstream label forcontaining message has traversed a loop. - A Hop Count TLV contains a count of theFEC,LSRS that the containing message has traversed. When an LSRmust unsplice the labels. On those mes- sages in which no loop is detected,propagates a message contain- ing a Hop Count TLV it increments the count. An LSRmust concatenate itselfthat 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 interpreted to mean theLSR-path-vector before propagating. Ifhop count is unknown. Incrementing an unknown hop count value results in an unknown hop count value (0). The following paragraphs describes LDP loop detectionis desiredprocedures. In these paragraphs, "MUST" means "MUST if configured for loop detec- tion". The paragraphs specify messages that must carry Path Vector and Hop Count TLVs. Note that the Hop Count TLV and its procedures are used without the Path Vector TLV insome portionsituations when loop detec- tion is not configured (see [ATM]). 2.8.1. Label Request Message The use of thenetwork, then it should be turned onPath Vector TLV and Hop Count TLV prevent Label Request messages from looping inALL LSRs withinenvironments thatportioninclude non-merge capable LSRs. The rules that govern use of thenetwork, else loop detection will not operate properly. 2.10. Loop Prevention via DiffusionHop Count TLV in Label Request Andersson, et al. [Page 24] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 messages by LSRdiffusion supportR when Loop Detection is enabled are the following: - The Label Request message MUST include aconfigurable option, which permits an LSR to verify that a new routed pathHop Count TLV. - If R isloop free before installing an LSP on that path. An LSR which supports diffusion does not splice an upstream label to a new downstream label until it ensures that con- catenation of the upstream path withsending thenew downstream path will be loop free. A LSR which detectsLabel Request because it is anew next hop for anFECtransmitsingress, it MUST include aQuery mes- sage containing its unique router id to each of its upstream peers. An LSR that receives such a Query message processesHop Count TLV with hop count value 1. - If R is sending theQueryLabel Request asfol- lows. (The following procedures are described in terms of Ack and Nak messages. An Ack isaNotification message signalling Success;result of having received aNak isLabel Request from an upstream LSR, and if the received Label Request contains aNotification message signalling Loop Detected) o IfHop Count TLV, R MUST increment thedownstream LSR notreceived hop count value by 1 and MUST pass thecorrectresulting value in a Hop Count TLV to its next hopfor the given FEC, the upstream LSR respondsalong withan Ack message, indicatingthe Label Request message; The rules that govern use of thedownstreamPath Vector TLV in Label Request messages by LSRmay change toR when Loop Detection is enabled are thenew path. ofollowing: - Ifthe downstream LSRR is sending thecorrect next hop for the given FEC, the upstream LSR performs loop detection via the LSR- path-vector. o IfLabel Request because it is aloopFEC ingress, then if R isdetected, the upstream LSR responds withnon-merge capable, it MUST include aNak message that indicates thePath Vector TLV of length 1 containing its own LSR Id. - If R isto be "pruned, and the LSR unsplices all connections for that FEC tosending thedownstream node, thereby pruning itself offLabel Request as a result of having received a Label Request from an upstream LSR, then if thetree. o Ifreceived Label Request contains aloopPath Vector TLV or if R isnot detected, the upstream node concatenatesnon-merge capable: R MUST add itsunique router-idown LSR Id to theLSR-path-vector,Path Vector, andpropagatesMUST pass theQuery messageresulting Path Vector to itsupstream peers. o Each LSR whichnext 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 receivesan Acka Label Request messagefrom its upstream peer in responsefor a particular FEC, and R has previously sent a Label Request message for that FEC to its next hop and has not yet received aquery message, in turn forwardsreply, and if R intends to merge the newly received Label Request with theack- nowledgementexisting outstanding Label Request, then R does not propagate the Label Request to thedownstreamnext hop. If R receives a Label Request message from its next hop with a Hop Count TLV which exceeds the configured maximum value, or with a Path Vector TLV containing its own LSR Id or whichsentexceeds the maximum allowable length, then R detects that theQueryLabel Reqeust message has traveled in a loop. When R detects a loop, it MUST send a Loop Detected Notification mes-sage.sage to the source of the Label Request message and drop the Label Request message. Andersson, et al. [Page23]25] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998o If an LSR doesn't receive a Ack2.8.2. Label Mapping Messagefor a given query within a "reasonable" periodThe use oftime, it "unsplices"theupstream peer that has not responded,Path Vector TLV andresponds with a NakHop Count TLV in the Label Mapping message provide a mechanism toits downstream peer, indicating the pruning of the upstream peer. o Anfind and terminate looping LSPs. When an LSRwhichreceives anew QueryLabel Mapping messagefor an FEC before it has received responsesfromall of its upstream peers foraprevious Query message must concatenate the old and the new LSR-path-vector withinnext hop, thenew query advertisement before pro- pagating. o The diffusion computation continues until eachmessage is propagated upstreampath responds withas specified below until anacknowledgment. Ana ingress LSRthat does not have any upstream LDP peers must acknowledge the Query message.is reached or a loop is found. TheLSR which beganrules that govern thediffusion may splice its upstream label touse of thenew downstream label only after receivingHop Count TLV in Label Mapping messages sent by anacknowledge mes- sage from the upstream peer. AsLSRdiffusion supportR when Loop Detection is enabled are the fol- lowing: - R MUST include aconfigurable option, an LSR which does not support diffusion will never originate a Query message. However, these LSRs must still recognize and processHop Count TLV. - If R is theQuery mes- sages, as described above. 2.11. Explicitly Routing LSPs The need for explicit routing (ER) in MPLS has been explored else- where [ARCH] [FRAME]. Ategress, theMPLS WG meeting held duringhop count value MUST be 1. - If theWash- ington IETF there was consensus that LDP should support explicit routing of LSPs with provision for indication of associated (forward- ing) priority. This section specifies mechanismsLabel Mapping message is being sent toprovide that support, and providespropagate ameansLabel Mapping message received from the next hop toallowan upstream peer, the hop count value MUST be thereservationresult of'resources' forincrementing theexplicitly routed LSP. In this document we propose an end to end setup mechanism that could, in principal, be invokedhop count value received fromeither end oftheexplicitly routed LSP (ERLSP). However we specify it here only fornext hop. - If thecaseLabel Mapping message is not being sent to propagate a Label Mapping message, the hop count value MUST be the result of incre- menting R's current knowledge ofinitiation bytheingress inhop count to thebeliefegress. Note thatsuch a mechanism maps naturally tothesetup inhop count to theopposite direction. We believe that the, inevit- able, latency associated with this (end to end) setup mechanism is tolerable since most ofegress will be unknown if R has not received a Label Mapping message from themotivations for ERLSPs, for example 'traffic engineering' implynext hop. Any Label Mapping message MAY contain a Path Vector TLV. The rules that govern theLSPs setupmandatory use of the Path Vector TLV inthis manner will have a long lifetime (at leastLabel Mapping messages sent by LSR R whencompared to those setup in response to dynamic routing). Andersson, et al. [Page 24] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 We introduce objects and procedures that provide support for: - Strict and Loose explicit routing - Specification of class of service - Reservation of bandwidthLoop Detection is enabled are the follow- ing: -Route pinningIf R is the egress, the Label Mapping message need not include a Path Vector TLV. -ERLSP preemption Only unidirectional point-to-point ERLSPIf R isspecified currently. The scheme can be easily extended to accommodate multipoint-to- point ERLSPs. The FEC object (TLV) may be used to determined which ERLSPs are "merged"sending the Label Mapping message toform a multipoint-to- point ERLSP. Alterna- tively,propagate amultipoint-to-point ERLSP can be setupLabel Map- ping message received from theegress by completely specifying the multipoint- to-point tree. Also, tunnel- ing ERLSPs within other ERLSPsnext hop to an upstream peer, then: o If R isfor future study. To setupmerge capable and if R has not previously sent aERLSP an LSR (that will beLabel Mapping message to the'ingress' ofupstream peer, then it MUST include a Path Vector TLV. o If theLSP) generates an explicit request. The explicit requestreceived message contains anexplicit route object which in turn contains a sequence of explicit request nextunknown hopobjects andcount, then R MUST include a Path Vector TLV. o If R has previously sent apointerLabel Mapping message to thecurrent entry in that sequence. The explicit request next hop objects specify the IP address of the LSRs through which the ERLSP should pass. These LSR hops specified in the explicit route are referred to as 'peg LSRs'. An explicit requestupstream peer, then it MUSTspecify the stream that will be associated with the ERLSP by inserting the appropriate FEC value in the request. The FEC value 'opaque tunnel' exists to support ERLSPs where the intermediate LSRs on the LSP need know nothing about the traffic flowing on the LSP. The setup mechanism for ERLSPs employs an end to end protocol. Individual ERLSPs are uniquely identified by an ERLSPID associated with them by the LSR that initiates their setup. The ERLSPID is generated by the ingress LSR of the LSP. The ERLSPID has another component called Peg ERLSPID which is generated by each peg LSR when the next peg LSR from itself is loosely routed. This is used by the intermediate LSRs to identify a loosely routed segment. The Peg ERLSPID is not used ininclude asegment that is strictly routed. Requests travel from the 'ingress' ofPath Vector TLV if the received message reports an LSPtoward what will be the 'egress'. Responses indicating the status of the ERLSP request travel back toward the ingress of the ERLSP. ERLSPID is used in both Request and Response messages. The addresses specified in the nexthopobjectscount increase, a change inthe explicitAndersson, et al. [Page25]26] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998route object should be those of the LSR's IP addresshop count from unknown to known, or a change from known to unknown. If theincom- ing interfaces onabove rules require R include a Path Vector TLV in theLSRs through whichLabel Mapping message, R computes it as follows: o If theLSP should pass. The ERLSPID, FEC, incoming interface (previous hop) and LDP identifier ofreceived Label Mapping message included a Path Vector, the Path Vector sent upstream MUST be the result of adding R's LSRthat generatedId to the received Path Vector. o If the received messageare all stored in an ERLSP control block. Here'shad no Path Vector, the Path Vector sent upstream MUST be asynopsispath vector of length 1 containing R's LSR Id. - If theentire mechanism to instantiate an ERLSP: An ingress node originates a ERLSP request message. TheLabel Mapping messagecontains an unique ERLSPID, FEC object, explicit route object, and an optional object for resource assignment for the ERLSP. At an intermediate node the 'active' ERNH objectisidentified by the pointer in the explicit route object. On message receipt the pointer always pointsnot being sent to propagate a received message upstream, thereceiving LSR object in the explicit routeLabel Mapping messagein case of strict routing. IfMUST include asegmentPath Vector ofERLSP is loosely routed then pointer always points to the upstream peglength 1 containing R's LSRat all the intermediate LSRs in this segment. The penultimateId. If R receives a Label Mapping message from its next hoptowith a Hop Count TLV which exceeds thedownstream pegconfigured maximum value, or with a Path Vector TLV containing its own LSRadvances the pointer to the next ERNH object in the list. IfId or which exceeds theERNH objects subtype indicates 'Strict'maximum allowable length, thendependent onR detects that thenext ERNH IP addresscorresponding LSP contains a loop. When R detects a loop, it MUST stop using theappropriate LDP Identifierlabel for forwarding, drop theLDP session with the next hopLabel Mapping message. andthe appropriate output inter- face are discovered (by using the information learnt from the addresssend a Loop Detected Notification messagesee Section "LDP Identifiers"). The outgoing interface (next hop) information is also stored in the ERLSP control block. Into thecasesource ofstrict ERLSP,theneighbor MUST be directly adjacentLabel Mapping message. 2.8.3. Discussion LSRs which are configured for loop detection are NOT expected to store thecurrent LSR. If the ERNH object subtype indicates 'Loose' then dependent uponpath vectors as part of thenext ERNH IP address a next hop is selected as per the FIB information for the downstream peg LSR. This information is again maintainedLSP state. Note that inthe ERLSP control block. Pega network where only non-merge capable LSRs areallowed to change the Explicit Route Object if the pathpresent, Path Vectors are passed downstream from ingress tothe next Peg LSRegress, and are not passed upstream. Even when merge isselected tosupported, Path Vectors need not be'loose'. This allows the Peg LSRs to select a specific path to the next Peg LSR. The default path to the next Peg LSR in case the segment is chosen as 'loose'passed upstream along an LSP which isdetermined by the hop-by- hop forwarding pathknown to reach thenext Peg LSR. However, Pegegress. When an LSRare allowed only to selectexperiences apath downstream to thechange of nextPeg LSR, theyhop, it need pass Path Vectors upstream only when it cannot tell from the hop count that the changepaths on any other segmentof next hop does not result in a loop. In theERLSP. Bandwidth reservations (if any)case of ordered label distribution, Label Mapping messages areprocessed. How this hap- pens, i.e. the precise connection admission procedures is out- sidepropagated from egress toward ingress, naturally creating thescope ofPath Vector along theLDP specification. The admission control must also useway. In thepreemption value specifiedcase of independent label distribution, an LSR may originate a Label Mapping message for an FEC before receiving a Label Mapping message from its downstream peer for that FEC. In this case, theLSP in determining if resources are availablesubsequent Label Mapping message for theLSP. If a reser- vation cannot be accommodated a response indicating that fact isFEC Andersson, et al. [Page26]27] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998returnedreceived from the downstream peer is treated as an update to LSP attributes, and theprevious hop. NoteLabel Mapping message must be propagated upstream. Thus, it is recommended thatthe resources are only reserved at this time. The LSRs will commit the bandwidth with the labels when the response comes back from the egress LSR. If the ERLSP canloop detection beaccommodated the pointer in the explicit request object is incremented to point at the next explicit request next hop objectconfigured incase of strict routing and the request message is sentconjunction with ordered label distribution, to minimize theLDP peer discovered as described above. In casenumber ofloose routing, the pointer is incremented only if the direct next hop is the next downstream peg LSR.Label Mapping update messages. Ifan LSR finds it impossible to satisfy a Explicit request then an 'Explicit response' message is created indicating the reason. The ERLSPID from (failed) requestloop detection isinserteddesired in some portion of themessage andnetwork, then itis sent to the LDP peer identified in the associated entryshould be turned on inthe ERLSP control block after which the ERLSP block is freed.ALL LSRsreceiving Explicit responses indicating failure process them in a similar manner. They create a new Explicit request and copy the ERLSPID and Status fromwithin that portion of theExplicit request they received into it. They usenetwork, else loop detection will not operate properly. 3. Protocol Specification Previous sections that describe LDP operation have discussed scenarios that involve theERLSPID to obtainexchange of messages among LDP peers. This section specifies theappropri- ate ERLSP control blockmessage encodings andthus identifyprocedures for pro- cessing the messages. LDPpeer toward which the 'new' Explicit responsemessageshould be sent. Hav- ing doneexchanges are accomplished by sending LDP protocol data units (PDUs) over LDP session TCP connections. Each LDP PDU can carry one or more LDP messages. Note thatthey free the ERLSP control block. When an Explicit request reaches the LSR specified inthelast ERNH objectmes- sages inthat request and that LSR accedes to the request it generatesanExplicit response indicating successful setup of the ERLSP. The egress node also includes a label in the response message. The Explicit response is (reverse path) for- warded through the LSRs that the original Explicit request traversed using the mechanism described above (inspection of ERLSP control block). In this case, of course, the ERLSP con- trol block isLDP PDU need notdeleted. An intermediate LSR receiving suchbe related to one another. For example, aresponse message allocatessingle PDU could carry anewmessage advertising FEC-label bindings for several FECs, another message requesting labelon its incoming interfacebindings for several other FECs, andcreatesaconnection between the new and the given label in the message. The LSR also commits the previously reserved bandwidth to this connection at the appropriate scheduler(s). The LSR then forwards thethird notification messageto its previous hop with the new label. When the successful response reachessignaling some event. 3.1. LDP PDUs Each LDP PDU is an LDP header followed by one or more LDP messages. The LDP header 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | PDU Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LDP Identifier | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version Two octet unsigned integer containing theingress LSRversion number of theERLSP is declared in-service. There is also support for route pinning for loosely routed seg- ments. When a ERLSP is pinnedprotocol. This version of theloose path is not changed when `better' paths become available. Once a ERLSP goes in- service there isspecification specifies LDP protocolsupport to reassign resources to the ERLSP if required.version 1. Andersson, et al. [Page27]28] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19982.12. ERLSP State Machine The ERLSP control block may contain the following information: - ERLSPID/Peg ERLSPID - State - FEC object - Flags o Self is Peg Node o Pinned path o Upstream segment (Strict/Loose) type o downstream segment (Strict/Loose) type - next peg node - preemption level - upstream neighbor (next hop/interface) - downstream neighbor (next hop/interface) - BW information (only at peg LSRs with loose downstream segment) - Explicit Route Object (only at peg LSRs with loose downstream segment) ForPDU Length Two octet integer specifying thepurposetotal length ofmatching message to existing ERLSP control block, both the ERLSPID and Peg ERLSPID in the message are matched against the onesthis PDU in octets, excluding thecontrol block. Its onlyVersion and PDU Length fields. The maximum allowable PDU Length is negotiable whenboth of them match that the messagean LDP session isconsideredinitialized. Prior tobe forcompletion of thematched control block, otherwise itnegotiation the maximum allowable length istreated as a new ERLSP request.4096 bytes. LDP Identifier Six octet field that uniquely identifies the label space for which this PDU applies. Theingress may usefirst four octets encode an IP address assigned to theERLSPID asLSR. This address should be the router-id, also used to identify thepeg ERLSPID. AtLSR in loop detection Path Vectors. The last two octets identify a label space within thepeg nodes,LSR. For a platform- wide label space, these should both be zero. Note that there is no alignment requirement for thecontrol block fields ERLSPIDfirst octet of an LDP PDU. 3.2. LDP Procedures LDP defines messages, TLVs andPrevious Peg ERLSDID are compared because Peg ERLSPID containsprocedures in theself assigned Peg ERLSPID. Also notefollowing areas: - Peer discovery; - Session management; - Label distribution; - Notification of errors and advisory information. The sections that follow describe theRequestmessageat Peg node is only comparedand TLV encodings forERLSPIDthese areas and the procedures that apply toselect a control block.them. Thestate tables for peg node and non peg nodeslabel distribution procedures aregiven separately. Separate state tablescomplex and areused only for illustrative purposes. The state engines can be collapsed into a single state engine. Moreover, a completely strict ERLSP can be treateddifficult to describe fully, coherently and unambiguously as aspecial casecollection ofloosely routed where every neighborseparate 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 apeg LSRprocedure described elsewhere in this document conflicts withseveral of the state transitions optimized.Appendix A, Appendix A specifies LDP behavior. Andersson, et al. [Page28]29] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19982.12.1. Loose Segment Peg LSR Transitions: Peg LSRs in3.3. Type-Length-Value Encoding LDP uses aloosely routed ERLSP segment are those that are expli- citly listed in the explicit route object as the starting or endingType-Length-Value (TLV) encoding scheme to encode much ofa loose segment. State NULL Event Action New State Request Create ERLSP control block; store Response relevant information from the Awaited message into the control block; select a new peg ERLSPID; reserve BW specified in the message; obtain next hop (or interface) towards next peg LSR; propagate message towardstheobtained next hop. If last nodeinformation carried inthe explicit route Established object, allocate an upstream label; commit BW; originateLDP messages. An LDP TLV is encoded as aResponse message upstream. If unable2 octet field that uses 14 bits toprocess request for No change any reason, issuespecify aNAK message to the sender with appropriate error code. Response Send NAK messageType and 2 bits tothe sender. No change Others Silently ignore event. No change State RESPONSE_AWAITED Event Action New State Response Install downstream label in Established message; choosespecify behavior when anupstream label; connect upstream to downstream label; commit BW toLSR doesn't recognize theconnection; propagate Response upstream with upstream label. If unable to process Response Null message for any reason then recover resources; originateType, followed by aNak message Andersson, et al. [Page 29] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 upstream; originate2 octet Length Field, followed by aRelease message downstream; delete control block. Upstream Release resources; propagate Nak Null lost downstream; delete control block. Downstream Reassign a new Peg ERLSPID. Start Retry lost RETRY timer. Nak from Reassignvariable 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), anew Peg ERLSPID. RETRY Retry downstream timer. If error code in Naknotification must be returned to the message originator and the entire message must be ignored; if U issevere then Null propagateset (=1), theNak upstream; release resources; delete control block. Nak from Release resources; propagate Nak Null upstream downstream; delete control block. New NH If ERLSPunknown TLV ispinned, ignore event. Retry Otherwise, send a Nak downstream; change NH insilently ignored and the rest of thecontrol block; reassign a new Peg ERLSPID. Start RETRY timer. Others Silently ignore event. No change State RETRY Event Action New State Retry Originate Requestmessagetowards Response Timeris processed as if thenext hop inunknown TLV did not exist. F bit Forward unknown TLV bit. This bit applies only when thecontrol block. Awaited New NH If ERLSPU bit ispinned, ignoreset and theNo change event. Otherwise change next hop information inLDP message containing thecontrol block. Nak from Release all resources (BW, label, Null upstream timer); delete control block. Upstream Release all resources (BW, label, Null lost timer); delete control block. Release Release all resources (BW, label, Null timer); delete control block. Andersson, et al. [Page 30] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Downstreamunknown TLV is to be for- warded. IfthereF isa new next hop, update No change lost that inclear (=0), thecontrol block. Otherwise, delete timer; recover Null resources; send Nak upstream; delete control block. Others Silently ignore event. No change State RECONNECT_AWAITED Event Action New State Request Make appropriate changes in the Established control block; make label connection; send a Response message upstreamunknown TLV is not forwarded withupstream label. If unable to process Request Null message for any reason then send a Release message downstream and a Nak message upstream; release resources; delete control block. Reconnect Release resources; send Release Null Awaited message downstream; delete control Timer block. Upstream Ignore event. No change lost Downstream Release resources; delete control Null lost block. New NH Release resources; delete control Null block. Nak from Release resources; delete control Null downstream block. Others Silently ignore event. No change State ESTABLISHED Event Action New State Andersson, et al. [Page 31] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Upstream Start RECONNECT_AWAITED timer. Reconnect lost Awaited Downstream Reassign a new Peg ERLSPID. Start Retry lost RETRY timer. Nak from Reassign a new Peg ERLSPID. Start Retry downstream RETRY timer. If error code in Nakthe containing message; if F issevere then Null propagateset (=1), theNak upstream; release resources; delete control block. Nak from Reassign a new Peg ERLSPID. Start Reconnect upstream RECONNECT_AWAITED timer. Awaited If error code in Nakunknown TLV issevere, Null then propagatefor- warded with theNak downstream; release resources; delete control block. New NH If ERLSPcontaining message. Type Encodes how the Value field ispinned, ignoreto be interpreted. Length Specifies theRetry event. Otherwise, send a Nak downstream; change next hoplength of the Value field incontrol block; reassign a new Peg ERLSPID. Start RETRY timer. Release Release resources; propagate Null message downstream; delete control block. Others Silently ignore event. No changeoctets. Value Octet string of Length octets that encodes information to be inter- preted as specified by the Type field. Andersson, et al. [Page32]30] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19982.12.2. Loose Segment Non-Peg LSR Transitions: Non-peg LSRs in a loose segment of an ERLSP are the LSRs intermediate to two peg LSRs and through which the loose segmentNote that there isrouted usingno alignment requirement for thehop-by-hop forwarding path. State NULL Event Action New State Request Create ERLSP control block; reserve Response BW specified infirst octect of a TLV. Note that themessage; obtain Awaited next hop (or interface) towards next peg LSR; if penultimate hop to next peg LSR then increment pointerValue field itself may contain TLV encodings. That is, TLVs may be nested. The TLV encoding scheme is very general. In principle, everything appearing inERNH object; propagate message towards the obtained next hop If unable to process request for No change any reason, issuean LDP PDU could be encoded as aNak messageTLV. This specifica- tion 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 thesender with appropriate error code. Response Sendtype of aNak messagevalue tothe sender. No change Others Silently ignore event. No change State RESPONSE_AWAITED Event Action New State Response Install downstream labelbe encoded is known, for example by its position inEstablished message; choosea mes- sage or anupstream label; connect upstream to downstream label; commit BW to connection; propagate Response upstream with upstream label. If unable to process Response Null messageenclosing TLV, and the length of the value is fixed or readily derivable from the value encoding itself. Some of the TLVs defined forany reason then recovery resources; propagateLDP are similar to one another. For example, there is aNak message upstream; originateGeneric Label TLV, an ATM Label TLV, and aRelease message downstream; delete control block. Upstream OriginateFrame 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 aNak message downstream; Null lost delete control block. Andersson, et al. [Page 33] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Downstream OriginateTLV type that specifies aNak message upstream; Null lost delete control block. Nak from Propagate Nak message upstream; Null downstream release reserved BW; delete control block. Nak from Propagate Nak message downstream; Null upstream release reserved BW; delete control block; New NH If ERLSP is pinned, ignore the Null event. Otherwise, send Nak message upstream and downstream; release reserved BW; delete control block. Release Propagate message downstream; Null release resources; delete control block. Others Silently ignore event. No change State ESTABLISHED Event Action New State Upstream Send Nak message downstream; Null lost release resources (BW, label); delete control block. Downstream Send Nak message upstream; release Null lost resources; delete control block. Nak from Release resources; propagate Nak Null downstream message upstream; delete control block. Nak from Release resources; propagate Null upstream message Nak downstream; delete control block. New NH If ERLSP is pinned, ignore the Null event. Otherwise, release resources; originate Nak message upstream; originate Nak message downstream; delete control block. Andersson, et al. [Page 34] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Release Release resources; propagate Null message downstream; delete control block. Others Silently ignore event. No change 2.12.2.1. Strict Segment Transitions A LSR whose upstreamTLV class anddownstream segment of an ERLSP is strict hasastate transition exactly similar to the non-peg LSR (only different beingTLV subtype that specifies a particular kind of TLV within that class, this specifica- tion does nothandleformalize thecasenotion ofpinned down option). 2.12.3. ERLSP Timeouts The following timeouts are used in the state transition: RETRY Default value TBD. This timer is set by the peg LSR to ori- ginateaRequest message downstream onTLV subtype. The specification assigns type values for related TLVs, such as theelapselabel TLVs, from ofthe timer whenadownstream loose segment is lost. RECONNECT Default value TBD. This timer is set bycontiguous block in thepeg LSR to dein- stall an ERLSP on16-bit TLV type number space. Section "TLV Summary" lists theelapseTLVs defined in this version of thetimer when a upstream loose segment is lost. 2.12.4. ERLSP Error Codes NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: To be supplied. This subsection should be moved to Section 3. END NOTE * END NOTE * END NOTE: Andersson, et al. [Page 35] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 3. Protocol Specification Previous sectionsprotocol and the section in this document thatdescribe LDP operation have discussed scenarios that involve the exchange of messages among LDP peers. This section specifies the message encodings and proceduresdescribes each. 3.4. TLV Encodings forpro- cessing the messages. LDP message exchangesCommonly Used Parameters There areaccomplishedseveral parameters used bysending LDP protocol data units (PDUs) over LDP session TCP connections. Each LDP PDU can carry one ormore than one LDPmessages. Note that the mes- sagesmessage. The TLV encodings for these commonly used parameters are specified inan LDP PDU need not be relatedthis section. 3.4.1. FEC TLV Labels are bound toone another. For example, a single PDU could carry a message advertising FEC-label bindings for several FECs, another message requesting label bindings for several other FECs, andForwarding Equivalence Classes (FECs). athird notification message signalling some event. 3.1. LDP PDUs Each LDP PDUFEC is afixed LDP header followed bylist of one or moreLDP mes- sages.FEC elements. Thefixed LDP headerFEC TLV encodes FEC items. Its encoding is: Andersson, et al. [Page 31] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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| FEC (0x0100) |Version | PDULength | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |LDP IdentifierFEC Element 1 |+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |Res~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Version Two octet unsigned integer containing the version number| FEC Element n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ FEC Element 1 to FEC Element n There are several types of FEC elements; see Section "FECs". The FEC element encoding depends on theprotocol. This versiontype ofthe specification specifies LDP protocol version 1. PDU Length TwoFEC element. A FEC Element value is encoded as a 1 octetinteger specifyingfield that specifies thetotalelement type, and a variable lengthof this PDU in bytes, excluding the Version and PDU Length fields. LDP Identifier Six octetfield thatuniquely identifiesis thelabel space for which this PDU applies.type- dependent element value. Note that while the representation of the FEC element value is type-dependent, the FEC element encoding itself is one where standard LDP TLV encoding is not used. Thefirst four octets encode anFEC 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. Host Address 0x03 4 octet full IPaddress assignedaddress; see below. Wildcard FEC Element To be used only in the Label Withdraw and Label Release Messages. Indicates the withdraw/release is to be applied to all FECs asso- ciated with theLSR. This address shouldlabel within the following label TLV. Must be therouter-id, also usedonly FEC Element inLSR Path Vector used by loop detection and loop preventionthe FEC TLV. Prefix FEC Element value encoding: Andersson, et al. [Page36]32] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998procedures. The last two octets identify a label space within the LSR. For a platform-wide label space, these should both be zero. Res This field is reserved. It must be set to zero on transmission and must be ignored on receipt. 3.2. Type-Length-Value Encoding LDP uses a Type-Length-Value (TLV) encoding scheme to encode much of LDP message contents. An LDP TLV is encoded as a 2 octet Type field, followed by a 2 octet Length Field followed by 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Prefix (2) | Address Family |ValuePreLen |~ ~+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix || +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type Encodes how+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Address Family Two octet quantity containing a value from ADDRESS FAMILY NUMBERS in [rfc1700] that encodes theValue field is to be interpreted. Length Specifiesaddress family for the address prefix in the Prefix field. PreLen One octet unsigned integer containing the length in bits of theValue fieldaddress prefix that follows. Prefix An address prefix encoded according to the Address Family field, whose length, inoctets. Value Octet string of Length octetsbits, was specified in the PreLen field, padded to a byte boundary. Host Address FEC Element 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Host Addr (3) | Address Family | Host Addr Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Host Addr | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Address Family Two octet quantity containing a value from ADDRESS FAMILY NUMBERS in [rfc1700] that encodesinformationtheinterpretation of which is specfied byaddress family for theTypeaddress prefix in the Prefix field.Note thatHost Addr Len Length of theValue field itself may contain TLV encodings. That is, TLVs may be nested. The TLV encoding scheme is very general. In principle, everything appearingHost address inan LDP PDU could beoctets. Host Addr An address encodedas a TLV. This specifica- tion does not use the TLV schemeaccording toits full generality. It is not used where its generality is unnecessary and its use would waste space unnecessarily. These are usually places wherethetype of aAddress Family field. Andersson, et al. [Page37]33] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998value to be encoded is known, for example by its position3.4.1.1. FEC Procedures If in decoding ames- sage orFEC TLV anenclosing TLV, and the length ofLSR encounters a FEC Element type it can- not decode, it should stop decoding thevalue is fixed or readily derivable fromFEC TLV, abort processing thevalue encoding itself. Some ofmessage containing theTLVs defined for LDP are similar to one another. For example, there is a Generic LabelTLV, and send anATMNotification message to its LDP peer signaling an error. 3.4.2. LabelTLV, and a Frame Relay TLV; see Sections "GenericTLVs LabelTLV", "ATMTLVs encode labels. LabelTLV", and "Frame Relay TLV". While is possible to think aboutTLVsrelated in this way in terms of a TLV type that specifies a TLV classare carried by the messages used to advertise, request, release anda TLV subtype that speci- fies a particular kindwithdraw label mappings. There are several different kinds ofTLV withinLabel TLVs which can appear in situations thatclass, this specification does not formalize the notion ofrequire a Label TLV. 3.4.2.1. Generic Label TLVsubtype. The specification assigns type valuesAn LSR uses Generic Label TLVs to encode labels forrelated TLVs, such as theuse on links for which labelTLVs, fromvalues are independent ofa contiguous block in the 16-bit TLV type number space. Section "TLV Summary" liststheTLVs defined in this versionunderlying link technology. Examples ofthe protocol and the document section that describes each. 3.3. Commonly Used TLVs Theresuch links areseveral TLV encodings used by more than one LDP message. The encodings for these commonly used TLVs are specified in this sec- tion. 3.3.1. FEC TLV Labels are bound to Forwarding Equivalence Classes (FECs). An FEC is a list of one or more FEC elements. The FEC TLV encodes FEC items. Its encoding is: Andersson, et al. [Page 38] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998PPP and Ethernet. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| FEC (0x0100)|U|F| Generic Label (0x0200) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FEC Element 1Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label This is a 20-bit label value as specified in [ENCAP] represented as a 20-bit number in a 4 octet field. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|F| ATM Label (0x0201) || ~ ~ |Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Res| V |FEC Element nVPI | VCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+FEC Element 1Andersson, et al. [Page 34] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Res This field is reserved. It must be set toFEC Element n There are several types of FEC elements; see Section "FEC Types". The FEC element encoding dependszero onthe type of FEC element. Note that while the representation of the FEC element valuetransmission and must be ignored on receipt. V-bits Two-bit switching indicator. If V-bits istype- dependent that00, both thevalue encoding itselfVPI and VCI are significant. If V-bits isone where standard LDP TLV encoding01, only the VPI field isnot used. A FEC Element valuesignifi- cant. If V-bit isencoded as a 1 octet field that specifies10, only theelement type, and a variable length field thatVCI is significant. VPI Virtual Path Identifier. If VPI is less than 12-bits it should be right justified in this field and preceding bits should be set to 0. VCI Virtual Channel Identifier. If thetype- dependent element value. 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 Prefix value encoding below. Router Id 0x03 4 octet full IP address. Flow 0x04 See Flow value encoding below. Wildcard FEC Element ToVCI is less than 16- bits, it should beused onlyright justified in theLabel Withdrawfield andLabel Release Messages. Indicatesthewithdraw/release is topreceding bits must beappliedset toall FECs asso- ciated with the label within0. If Virtual Path switching is indicated in thefollowing label TLV. MustV-bits field, then this field must be ignored by theonly FEC Element inreceiver and set to 0 by theFEC TLV. Prefix FEC Element value encoding: Andersson, et al. [Page 39] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998sender. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|F| Frame Relay Label (0x0202)| Length |Address Family | PreLen | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | Prefix |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved |Len| DLCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Address Family Two octet quantity containing a value from ADDRESS FAMILY NUMBERS in Assigned Numbers [ref] that encodes the address fam- ily for the address prefix in the Prefix field. PreLen One octet unsigned integer containing the length in bits ofRes This field is reserved. It must be set to zero on transmission and must be ignored on receipt. Len This field specifies theaddress prefix that follows. Prefix An address prefix encoded accordingnumber of bits of the DLCI. The following values are supported: 0 = 10 bits DLCI 1 = 17 bits DLCI 2 = 23 bits DLCI Andersson, et al. [Page 35] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 DLCI The Data Link Connection Identifier. Refer to [FR] for the label values and formats. 3.4.3. AddressFamily field, whose length, in bits, was specifiedList TLV The Address List TLV appears inthe PreLen field, padded to a byte boundary. Flow FEC Element value encoding:Address and Address Withdraw mes- sages. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Network Source|U|F| Address List (0x0101) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Network DestinationAddress Family |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Source Port+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Dest Port|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Protocol|DirectionAddresses | ~ ~ |Reserved| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Network SourceAddressFourFamily Two octetsource IPv4 address. Network Destinationquantity containing a value from ADDRESS FAMILY NUMBERS in [rfc1700] that encodes the addresses contained in the Addresses field. Addresses A list of addresses from the specified Address Family. The encod- ing of the individual addresses depends on the Address Family. The following address encodings are defined by this version of the protocol: Address Family AddressFourEncoding IPv4 4 octetdestinationfull IPv4address. NOTE*NOTE*NOTE*NOTE*NOTE*NOTE:address Andersson, et al. [Page40]36] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998For generality the address encodings here should include an Address Family field, etc. END NOTE * END NOTE * END NOTE: Source Port Two octet source port. Destination Port Two octet destination port. Protocol Protocol type. Direction One octet indicating the direction3.4.4. COS TLV The COS (Class ofthe LSP. Field is set to 1 on Downstream;Service) TLV may appear as an optional fieldis set to 2 on Upstream. NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: Use of this FEC is not fully specified in this version of the protocol END NOTE * END NOTE * END NOTE: 3.3.1.1. FEC Procedures Ifindecoding a FEC TLV an LSR encounters a FEC Element type it can- not decode, it should stop decoding the FEC TLV, abort processing the message containing the TLV, and send an Ack/Nack message to its LSR peer signalling an error. 3.3.2. Label TLVs Label TLVs encode labels. Label TLVs are carried by themessagesused to advertise, request, releasethat request andwithdrawcarry label mappings.There are several different kinds of Label TLVs which can appear in situations that require a Label TLV. Andersson, et al. [Page 41] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 3.3.2.1. Generic Label TLV An LSR uses Generic Label TLVsIt is used toencode labels for use on links for which label values are independent of the underlying link technology. Examples of such links are PPPrequest andEthernet.advertise (Label, FEC, class of service) bindings. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Generic Label (0x0200)|U|F| COS (0x0102) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Label | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label This is a 20-bit label value as specified in [ENCAP] represented as a 20-bit number in a 4 octet field. 3.3.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATM Label (0x0201)|Length|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Res| VCOS Value |VPI|VCI| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Res ThisCOS Value The value field for this TLV isreserved. 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 signifi- cant. If V-bit is 10, only the VCI is significant. VPI Virtual Path Identifier. If VPIa subject for further study. One possibility isless than 12-bits it should be right justified in this field and preceding bits should beto define a set of CoS values that map to0. Andersson, et al. [Page 42] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 VCI Virtual Connection Identifier. If the VCI is less than 16- bits, it shouldDif- ferentiated Services [DIFFSERV] code points. Other CoS values could beright justifiedsupported inthe field and the preceding bits must be setaddition to0. If Virtual Path switching is indicatedor in place of theV-bits field, then thisDifferentiated Services code points. 3.4.5. Hop Count TLV The Hop Count TLV appears as an optional fieldmust be ignored by the receiver andin messages that setto 0 byup LSPs. It calculates thesender. 3.3.2.3. Frame Relay Label TLV Annumber of LSRuses Frame Relay Label TLVs to encode labelshops along an LSP as the LSP is being setup. Note that setup procedures for LSPs that traverse ATM links require useon Frame Relay links.of the Hop Count TLV (see [ATM]). 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Frame Relay Label (0x0202)|U|F| Hop Count (0x0103) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Reserved |Len| DLCIHC Value |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 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. The following values are supported: 0 = 10 bits DLCI+-+-+-+-+-+-+-+-+ HC Value 1= 17 bits DLCI 2 = 23 bits DLCI DLCI The Data Link Connection Identifier. Refer to draft-ietf-mpls-fr-01.txt [FR] for the label values and formats. 3.3.3. Address List TLV The Address List TLV appears in Address and Address Withdraw mes- sages. Its encoding is:octet unsigned integer hop count value. Andersson, et al. [Page43]37] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19980 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address List (0x0101) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address Family | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | Addresses | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Address Family Two octet quantity containing3.4.5.1. Hop Count Procedures During setup of an LSP an LSR may receive avalue from ADDRESS FAMILY NUMBERS in Assigned Numbers [ref]Label Mapping or Label Request message for the LSP thatencodescontains theaddresses contained inHop Count TLV. If it does, it should record theAddresses field. Addresses A list of addresses fromhop count value. If thespecified Address Family. The encod- ing ofLSR then pro- pagates theindividual addresses depends onLabel Mapping message for theAddress Family.LSP to an upstream peer or the Label Request message to a downstream peer to continue the LSP setup, it must increment the recorded hop count value and include it in a Hop Count TLV in the message. Thefollowing address encodings are defined by this version offirst LSR in theprotocol: Address Family Address Encoding IPv4 4 octet full IPv4 address 3.3.4. COS TLVLSP should set the hop count value to 1. By convention a value of 0 indicates an unknown hop count. TheCOS (Classresult ofService) TLV may appear asincrementing anoptional fieldunknown hop count is itself an unknown hop count (0). If an LSR receives a message containing a Hop Count TLV, it must check the hop count value to determine whether the hop count has exceeded its configured maximum allowable value. If so, it must behave as if the containing message has traversed a loop by sending a Notification message signaling Loop Detected in reply to the sender of the message. If Loop Detection is configured, the LSR must follow the procedures specified in Section "Loop Detection". 3.4.6. Path Vector TLV The Path Vector TLV is used with the Hop Count TLV in Label Request and Label Mapping messagesthat carryto implement the optional LDP loop detec- tion mechanism. See Section "Loop Detection". Its use in the Label Request message records the path of LSRs the request has traversed. Its use in the Label Mapping message records the path of LSRs a labelmappings.advertisement has traversed to setup an LSP. Its encoding is: Andersson, et al. [Page 38] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| COS (0x0102)|U|F| Path Vector (0x0104) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LSR Id 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |COS Value| ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Andersson, et al. [Page 44] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 COS Value The COS Value may be one| LSR Id n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ One or more LSR Ids A list ofseveral types, encoded as a 1 octet type followed by a variable length, type-dependent value. Note thatrouter-ids indicating theencodingpath of LSRs theCOS valuemessage has traversed. Each LSR Id isnot the standard LDP TLV encoding. Note also thatthelengthIP address (router-id) component of thetype-dependent value can be derived fromLDP identifier for thelength ofcorresponding LSR. This ensures it is unique within theCOS TLV.LSR network. 3.4.6.1. Path Vector Procedures Thefollowing COS value encodings are defined by this version of the protocol: COS Name Type code Value IP Prec 0x01 1 octet IP Precedence IfPath Vector TLV is carried indecodingLabel Mapping and Label Request messages when loop detection is configured. 3.4.6.1.1. Label Request Path Vector Section "Loop Detection" specifies situations when an LSR must include aCOSPath Vector TLVanin a Label Request message. An LSRencountersthat receives aCOS type it cannot decode, it should stop decodingPath Vector in a Label Request message must perform theCOS TLV, abort processingprocedures described in Section "Loop Detection". If themessage containingLSR detects a loop, it must reject theTLV, and send an Ack/NackLabel Request message. The LSR must: 1. Transmit a Notification message toitsthe sending LSRpeer signalling an error. 3.3.5. Hop Countsignaling "Loop Detected". 2. Not propagate the Label Reqeust message further. Note that a Label Request message with Path Vector TLV is forwarded until: Andersson, et al. [Page 39] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 1. A loop is found, 2. The LSP egress is reached, 3. The maximum Path Vector limit or maximum Hop CountTLV appearslimit is reached. This is treated as if a loop had been detected. 3.4.6.1.2. Label Mapping Path Vector Section "Loop Detection" specifies the situations when anoptional fieldLSR must include a Path Vector TLV inmessagesa Label Mapping message. An LSR thatset up LSPs. It calculatesreceives a Path Vector in a Label Mapping message must perform the procedures described in Section "Loop Detection". If thenumber ofLSRhops alongdetects a loop, it must reject the Label Mapping message in order to prevent a forwarding loop. The LSR must: 1. Transmit a Notification message to the sending LSR signaling "Loop Detected". 2. Not propagate the message further. 3. Check whether the Label Mapping message is for anLSP asexisting LSP. If so, the LSR must unsplice any upstream labels which are spliced to the downstream label for the FEC. Note that a Label Mapping message with a Path Vector TLV is forwarded until: 1. A loop is found, 2. An LSP ingress is reached, or 3. The maximum Path Vector or maximum Hop Count limit is reached. This is treated as if a loop had been detected. 3.4.7. Status TLV Notification messages carry Status TLVs to specify events beingsetup.sig- naled. The encoding for the Status TLV is: Andersson, et al. [Page 40] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Hop Count (0x0103)|U|F| Status (0x0300) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |HC ValueStatus Code |+-+-+-+-+-+-+-+-+ HC Value 1 octet+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Status Code 32-bit unsigned integerhop count value. 3.3.5.1. Hop Count Procedures During setup of an LSP an LSR may receive a Label Mapping or Label Request message for the LSP that contains the Hop Count TLV. If it does, it should record the hop count value. If the LSR then passes a Label Mapping message forencoding theLSP to an upstream peer orevent being signaled. The structure of aLabel Andersson, et al. [Page 45] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Request to a downstream peer to continue the LSP setup, it must increment the recorded hop count value and include it in a Hop Count TLV in the message. The first LSR in the LSP should set the hop count value to 1. If an LSR receives a Label Mapping message containing a Hop Count TLV, it must check the hop count value to determine whether the hop count has wrapped (hop count value = 0). If so, it must reject the Label Mapping message in order to prevent a forwarding loop. 3.3.6. Path Vector TLV The Path Vector TLV is used in messages that implement LDP loop detection and prevention. It records the path of LSRs a label adver- tisement has traversed to setup an LSP. Its encodingStatus 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Path Vector (0x0104) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LSR Id 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LSR Id n|E|F| Status Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+One or more LSR Ids A list of router-identifiers indicating the path of LSRsE bit Fatal error bit. If set (=1), this is a fatal error notifica- tion. If clear (=0), this is an advisory notification. F bit Forward bit. If set (=1), themap- ping message has traversed. Each router-id mustnotification should be forwarded to therouter-id component of the LDP identifierLSR for thecorresponding LSR. This ensures it is unique within the LSR network. 3.3.6.1. Path Vector Procedures During setup of an LSP an LSR may receive a Label Mapping messagenext-hop or previous-hop for theLSP that containsLSP, if any, associated with thePath Vector TLV.event being signaled. Ifit does,clear (=0), theLSR must pass a Label Mapping message fornotification should not be forwarded. Status Data 30-bit unsigned integer which specifies theLSP tostatus information. This specification defines Status Codes (32-bit unsigned integers with theupstream peer(s) to continueabove encoding). A Status Code of 0 signals success. Message ID If non-zero, 32-bit value that identifies theLSP setup. Thispeer messagemust include a Path Vectorto which the Status TLVinrefers. If zero, no specific peer message is being identified. Message Type If non-zero, themessage. The valuetype of thepath vector inpeer message to which thePath VectorStatus TLV Andersson, et al. [Page46]41] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998must be the received path vector with the LSRs own LSR Id appended to it. If an LSR receives a Label Mapping message containing a Path Vector TLV, it must check the path vector value to determine whether the vector contains its own LSR-id.refers. Ifso, it must reject the Label Map- ping message in order to prevent a forwarding loop. The Path Vector TLV is also used inzero, theLabel Query message. See Sections "Loop Detection" and "Loop Prevention via Diffusion" for more details. 3.3.7.Status TLVNotification messages carry Status TLVsdoes not refer tospecify events being sig- nalled. The encoding forany specific peer message. 3.5. LDP Messages All LDP messages have theStatus TLV is:following format: 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 |Status (0x0300) |Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Status CodeMessage ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Message ID| + + | Mandatory Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Message Type|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Status Code 32-bit unsigned integer encoding the event being signalled. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |F|E| Status Data+ + | Optional Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+FU bitFatal errorUnknown message bit.If set (=1), this is a fatal error notifica- tion. If clear (=0), this isUpon receipt of anadvisory notification. Andersson, et al. [Page 47] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 E bit End-to-end bit. If set (=1), the notification should be for- warded to the LSR for the next-hop or previous-hop for the LSP,unknown message, ifany, associated with the event being signalled. IfU is clear (=0),thea notificationshould not be forwarded. Status Data 30-bit unsigned integer which 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, 32-bit value that identifiesis returned to thepeermessageto whichoriginator; if U is set (=1), theStatus TLV refers. If zero, no specific peerunknown message isbeing identified.silently ignored. Message TypeIf non-zero,Identifies the type ofthe peermessageto whichMessage Length Specifies theStatus TLV refers. If zero,cumulative length in octets of theStatus TLV does not referMessage ID, Manda- tory Parameters, and Optional Parameters. Message Id 32-bit value used toany specific peeridentify this message.3.4. LDP Messages All LDPUsed by the sending LSR to facilitate identifying notification messageshavethat may apply to this message. An LSR sending a notification message in response to this message should include this Message Id in thefollowing TLV format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message Type | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Mandatory Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Optional Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+notification message; see Section "Notification Message". Andersson, et al. [Page48]42] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Message Type Identifies the type of message Message Length Specifies the length of the message value component (Mandatory plus Optional Parameters) in octets Message Id Four octet integer used to identify this message. Used by the sending LSR to facilitate identifying notification messages that may apply to this message. An LSR sending a notification message in response to this message will include this Message Id in the notification message; see Section "Notification Message".Mandatory Parameters Variable length set of required message parameters. Some messages have no required parameters. For messages that have required parameters, the required parameters MUST appear in the order specified by the individual message specifications in the sections that follow. Optional Parameters Variable length set of optional message parameters. Many messages have no optional parameters. For messages that have optional parameters, the optional parameters may appear in any order. Note that there is no alignment requirement for the first octet of an LDP message. The following message types are defined in this version of LDP: Message NameTypeSection Title Notification0x0001"Notification Message" Hello0x0100"Hello Message" Initialization0x0200"Initialization Message" KeepAlive0x0201"KeepAlive Message" Address0x0300"Address Message" Address Withdraw0x0301"Address Withdraw Message" Label Mapping0x0401"Label Mapping Message" Label Request0x0402"Label Request Message" Label Withdraw0x0403"Label Withdraw Message" Label Release0x0404"Label Release Message"Label Query 0x0405 "Label Query Message" Explicit Route Request 0x0500 "Explicit Route Request Message" Explicit Route Response 0x0501 "Explicit Route Response Message" Andersson, et al. [Page 49] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998The sections that follow specify the encodings and procedures for these messages. Some of the abovemessagemessages are related to one another, for example the Label Mapping, Label Request, Label Withdraw, and Label Releasemes- sages.messages. While is possible to think about messages related in this way in terms of a message type that specifies a message class and a message subtype that specifies a particular kind of message within that class, this specification does not formalize the notion of a message subtype. Andersson, et al. [Page 43] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 The specification assigns type values for related messages, such as the label messages, from of a contiguous block in the 16-bit message type number space.3.4.1.3.5.1. Notification Message An LSR sends a Notification message to inform an LDP peer of a signi- ficant event. A Notification message signals a fatal error or pro- vides advisory informationregarding an itemsuch as theprocessingoutcome of processing an LDPmessagesmessage 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+||U| Notification (0x0001) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status (TLV) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message IdFour octet integer32-bit value used to identify this message. Status TLV Indicates the event beingsignalled.signaled. The encoding for the Status TLV is specified in Section "Status TLV".Andersson, et al. [Page 50] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The following Optional Parameters are generic and may appear 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, specific to the particular event beingsignalledsignaled by the Notification Messages may appear. These are Andersson, et al. [Page 44] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 described elsewhere. Extended Status The 4 octet value is an Extended Status Code that encodes addi- tional information that supplements the status information con- tained in the Notification Status Code.3.4.1.1. Notification Message Procedures If anReturned PDU An LSR uses this parameter to return part of an LDP PDU to the LSR that sent it. The value of this TLV is the PDU header and as much PDU data following the header as appropriate for the condition being signalled by the Notification message. Returned Message An LSR uses this parameter to return part of an LDP message to the LSR that sent it. The value of this TLV is the message type and length fields and as much message data following the type and length fields as appropriate for the condition being signalled by the Notification message. 3.5.1.1. Notification Message Procedures If an LSR encounters a condition requiring it to notify its peer with advisory or error information it sends the peer a Notification mes- sage containing a Status TLV that encodes the information and option- ally additional TLVs that provide more information about the event. If the condition is one that is a fatal error the Status Code carried in the notification will indicate that. In this case, after sending the Notification message the LSR should terminate the LDP session by closing the session TCP connection and discard all state associated with the session, including all label-FEC bindings learned via the session. When an LSR receives a Notification message that carries a Status Code that indicates a fatal error, it should terminate the LDP ses- sion immediately by closing the session TCP connection and discard all state associated with the session, including all label-FEC bind- ings learned via the session.3.4.1.2.3.5.1.2. EventsSignalledSignaled by Notification Messages It is useful for descriptive purpose to classify eventssignalledsignaled by Notification Messages into the following categories. Andersson, et al. [Page51]45] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.4.1.2.1.3.5.1.2.1. Malformed PDU or Message Malformed LDP PDUs or Messages that are part of the LDP Discovery mechanism are handled by silently discarding them. An LDP PDU received on a TCP connection for an LDP session is mal- formed if: - The LDP Identifier in the PDU header is unknown to the receiver, or it is known but is not the LDP Identifier associated by the receiver with the LDP session. This is a fatal errorsignalledsignaled by the Bad LDP Identifier Status Code. - The LDP protocol version is not supported by the receiver, or it is supported but is not the version negotiated for the session during session establishment. This is a fatal errorsignalledsignaled by the Bad Protocol Version Status Code. - The PDU Length field is too short (< 20) or too long (>TBD).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 is determined. An LDP Message is malformed if: - The Message Type is unknown.See Section "Unknown Message Types" for more detail.If the Message Type is <0x800000000x8000 (high order bit = 0) it is a fatal errorsignalledsignaled by the Unknown Message Type Status Code. If the Message Type is >=0x80000000x8000 (high order bit = 1) it is silently discarded. - The Message Length is too large, that is, indicates that the mes- sage extends beyond the end of the containing LDP PDU. This is a fatal errorsignalledsignaled by the Bad Message Length Status Code.3.4.1.2.2.3.5.1.2.2. Unknown or Malformed TLV Malformed TLVs contained in LDP messages that are part of the LDP Discovery mechanism are handled by silently discarding the containing message. A TLV contained in an LDP message received on a TCP connection of an LDP is malformed if: Andersson, et al. [Page52]46] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 - The TLV Length is too large, that is, indicates that the TLV extends beyond the end of the containing message. This is a fatal errorsignalledsignaled by the Bad TLV Length Status Code. - The TLV type is unknown.See Section "Unknown TLV in Known Mes- sage Type" for more detail.If the TLV type is <0x800000000x8000 (high order bit 0) it is a fatal errorsignalledsignaled by the Unknown TLV Status Code. If the TLV type is >=080000000008000 (high order bit 1) the TLV is silently dropped. Section "Unknown TLV in Known Message Type" elaborates on this behavior. - The TLV Value is malformed. This occurs when the receiver han- dles the TLV but cannot decode the TLV Value. This isintrepretedinter- preted as indicative of a bug in either the sending or receiving LSR. It is a fatal errorsignalledsignaled by the Malformed TLV Value Status Code.3.4.1.2.3.3.5.1.2.3. Session Hold Timer Expiration This is a fatal errorsignalledsignaled by the Hold Timer Expired Status Code.3.4.1.2.4.3.5.1.2.4. Unilateral Session Shutdown This is anon-fatalfatal eventsignalledsignaled by the Shutdown Status Code. The Notification Message may optionally include an Extended Status TLV to provide a reason for the Shutdown.Note that although this is a "non-fatal" event, theThe sending LSR terminates the session immediately after sending the Notification.3.4.1.2.5.3.5.1.2.5. Initialization Message Events The session initialization negotiation (see Section "Session Initial- ization") may fail if the session parameters received in the Initial- ization Message are unacceptable. This is a fatal error. The specific Status Code depends on the parameter deemed unacceptable, andareis defined in Sections "InitializationMessage Notification Status Codes". Andersson, et al. [Page 53] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 3.4.1.2.6.Message". 3.5.1.2.6. Events Resulting From Other Messages Messages other than the Initialization message may result in events that must besignalledsignaled to LDP peers via Notification Messages. These events and the Status Codes used in the Notification Messages to sig- nal them are described in the sections that describe these messages.3.4.1.2.7. Explicitly Routed LSP Setup Events Establishment of an Explicitly Routed LSP may fail for a variety of reasons. All such failures are considered non-fatal conditions and they are signalled by the Explicit Response Message. 3.4.1.2.8.Andersson, et al. [Page 47] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3.5.1.2.7. Miscellaneous Events These are events that fall into none of the categories above. There are no miscellaneous events defined in this version of the protocol.3.4.2.3.5.2. Hello Message LDP Hello Messages are exchanged as part of the LDP Discovery Mechan- ism; see Section "LDP Discovery". The encoding for the Hello 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+||U| Hello (0x0100) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Common Hello Parameters TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message IdFour octet integer32-bit value used to identify this message.OptionalCommon Hello ParametersThis variable length field contains 0 or more parameters, each encoded as a TLV. The optionalTLV Specifies parametersdefined by this version ofcommon to all Hello messages. The encoding for theprotocol are Andersson, et al. [Page 54] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Optional Parameter Type Length Value TargetedCommon Hello0x0400Parameters TLV is: 0-- Send Targeted Hello 0x04011 2 3 0-- Transport Address 0x04021 2 3 4See below Hello Hold Time 0x04035 6 7 8 9 0 1 2 3 4See below Targeted Hello This Hello is a Targeted Hello. Without this optional parameter the Hello is a Link Hello. Send Targeted Hello Requests the receiver to send periodic Targeted Hellos to the source of this Hello. An LSR initiating Extended Discovery uses this option. Transport Address Specifies the IPv4 address to be used for the sending LSR when opening the LDP session TCP connection. If this optional TLV is not present the IPv4 source address for the UDP packet carrying the Hello should be used.5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|F| Common Hello Parms(0x0400)| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hold Time |T|R| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Hold Time, Hello hold time in seconds. An LSR maintains a record of Hellos received from potential peers (seebelow) When present, this parameterSection "Hello Message Pro- cedures"). Hello Hold Time specifies the timein secondsthe sending LSR will maintain its record of Hellos from the receiving LSR without receipt of another Hello.When not present,Andersson, et al. [Page 48] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 A pair of LSRs negotiates thesender willhold times they use for Hellos from each other. Each proposes adefaulthold time. The hold time used is the minimum of the hold times proposed in their Hellos. A value of 0 means use the default. There are interface type specific defaults for Link Hellos as well as a default forTargetedTar- geted Hellos.3.4.2.1.A value of 0xfffff means infinite. T, Targeted HelloMessage Procedures An LSR receivingA value of 1 specifies that this Hello is a Targeted Hello. A value of 0 specifies that this Hello is a Link Hello. R, Request Send Targeted Hellos A value of 1 requests the receiver to send periodic Targeted Hel- los to the source of this Hello. A value of 0 makes no request. An LSR initiating Extended Discovery sets R to 1. If R is 1, the receiving LSR checks whether it has been configured to send Tar- geted Hellos to the Hello source in response to Hellos with this request. If not, it ignores the request. If so, it initiates periodic transmission of Targeted Hellos to the Hello source. Reserved This field is reserved. It must be set to zero on transmission and ignored on receipt. Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters defined by this ver- sion of the protocol are Optional Parameter Type Length Value Transport Address 0x0401 4 See below Configuration 0x0402 4 See below Sequence Number Transport Address Specifies the IPv4 address to be used for the sending LSR when opening the LDP session TCP connection. If this optional TLV is not present the IPv4 source address for the UDP packet car- rying the Hello should be used. Configuration Sequence Number Specifies a 4 octet unsigned configuration sequence number that identifies the configuration state of the sending LSR. Used by the receiving LSR to detect configuration changes on the Andersson, et al. [Page 49] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 sending LSR. 3.5.2.1. Hello Message Procedures An LSR receiving Hellos from another LSR maintains a Hello adjacencyforcorresponding to the Hellos. The LSR maintains a hold timer with the Helloadja- cencyadjacency which it restarts whenever it receives a Hello that matches the Hello adjacency. If the hold timer for a Hello adjacency expires the LSR discards the Hello adjacency: see sections"Maintaining"Maintain- ing Hello Adjacencies" and "Maintaining LDP Sessions".A LSR processesWe recommend that the interval between Hello transmissions be at most one third of the Hello hold time. An LSR processes a received LDP Hello as follows:Andersson, et al. [Page 55] Internet Draft draft-ietf-mpls-ldp-00.txt August 19981. The LSR checks whether the Hello is acceptable. The criteria for determining whether a Hello is acceptable are implementa- tion dependent (see below for example criteria). 2. If the Hello is not acceptable, the LSR ignores it. 3. If the Hello is acceptable, the LSR checks whether it has a Hello adjacency for the Hello source. If so, it restarts the hold timer for the Hello adjacency. If not it creates a Hello adjacency for the Hello source and starts its hold timer. 4. If the Hello carries any optional TLVs the LSR processes them (see below). 5. Finally, if the LSR has no LDP session for the label space specified by the LDP identifier in thecommonPDU header for the Hello, itattempts to establish a session forfollows thelabel space; see sectionprocedures of Section "LDP SessionEstablishment".Estab- lishment". The following are examples of acceptability criteria for Link and Targeted Hellos: A Link Hello is acceptable if the interface on which it was received has been configured for label switching. A Targeted Hello from IP source address a.b.c.d is acceptable if either: Andersson, et al. [Page 50] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 - The LSR has been configured to accept Targeted Hellos, or - The LSR has been configured to send Targeted Hellos to a.b.c.d. The following describes how an LSR processes Hello optional TLVs:Targeted Hello No special processing required. Send Targeted Hello If the Send Targeted Hello option is carried by the Hello, the LSR checks whether it has been configured to send Tar- geted Hellos to the Hello source in response to Hellos with this option. If not, it ignores the option. If so, it initiates periodic transmission of Targeted Hellos to the Hello source.Transport Address The LSR associates the specified transport address with theAndersson, et al. [Page 56] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998Hello adjacency.Hello Hold Time A pair of LSRs negotiate the hold times they use for Hellos from each other. Each LSR proposes a hold time in its Hel- los either explicitly by including the Hold TimeConfiguration Sequence Number The Configuration Sequence Number optionalTLV or implicitly by omitting it. The hold timeparameter is used by theLSRs issending LSR to signal configuration changes to theminimum ofreceiv- ing LSR. When a receiving LSR playing thehold times proposedactive role in LDP session establishment detects a change intheir Hellos. We recommend thattheinterval between Hello transmissions be at most one third ofsending LSR con- figuration, it may clear theHello hold time. 3.4.3. Initialization Message The LDP Initialization Message is exchanged as part ofsession setup backoff delay, if any, associated with theLDP ses- sion establishment procedure; seesending LSR (see Section"LDP Session Establish- ment". The encoding for"Session Ini- tialization"). A sending LSR using this optional parameter is responsible for maintaining the configuration sequence number it transmits in Hello messages. Whenever there is a configuration change on the sending LSR, it increments the configuration sequence number. 3.5.3. Initialization Message The LDP Initialization Message is exchanged as part of the LDP ses- sion establishment procedure; see Section "LDP Session Establish- ment". 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+||U| Initialization (0x0200) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Common Session Parameters TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Andersson, et al. [Page 51] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Message IdFour octet integer32-bit value used to identify this message. Common Session Parameters TLV Specifies values proposed by the sending LSR for parameters common to all LDP sessions. The encoding for theBasicCommon Session Parameters TLV is:Andersson, et al. [Page 57] Internet Draft draft-ietf-mpls-ldp-00.txt August 19980 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| Common SessParams (0x0500) | MessageParms (0x0500)| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Protocol Version | Hold Time | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |A|D| PVLim | Reserved | Max PDU Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver LDP Identifer | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++ Protocol Version Two octet unsigned integer containing the version number of the protocol. This version of the specification specifies LDP pro- tocol version 1. Hold Time Two octet unsigned non zero integer that indicates the number of seconds that the sending LSR proposes for the value of the KeepAlive Interval. The receiving LSR MUST calculate the value of the KeepAlive Timer by using the smaller of its proposed Hold Time and the Hold Time received in the PDU. The value chosen for Hold Time indicates the maximum number of seconds that may elapse between the receipt of successive PDUs from theLSRLDP peer. TheKeepaliveKeepAlive Timer is reset each time a PDU arrives.Receiver LDP Identifer Identifies the receiver's label space. This LDP Identifier, together with the sender's LDP Identifier in the common header enables the receiver to match the Initialization message with one of its Hello adjacencies; see Section "Hello Message Pro- cedures". Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters are: Andersson, et al. [Page 58] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Optional Parameter Type Length Value Label Allocation 0x0501 1 See below Discipline Loop Detection 0x0502 0 -- Merge 0x0503 1 See below ATM Null Encapsulation 0x0504 0 -- ATM Label Range 0x0600 8 See below Frame Relay Label Range 0x0601 8 See belowA, LabelAllocationAdvertisement Discipline Indicates the type of Labelallocation.advertisement. A value of 0ismeans Downstreamallocation, AUnsolicited advertisement; a value of 1is Downstreammeans Down- stream On Demand. Ifthis optional parameter is not specfied,one LSR proposes Downstreamalloca- tion is used. Loop DetectionUnsolicted and the other pro- poses Downstream on Demand, the rules for resolving this difference is: Andersson, et al. [Page 52] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 - Ifpresent, indicates that Loop Detectionthe session isenabled. If absent, Loop Detection is disabled. Merge Specifies the merge capabilities of anfor a label-controlled ATM link or a label-controlled Frame Relayswitch. The following values are supportedlink, then Downstream on Demand must be used. - Otherwise, Downstream Unsolicted must be used. If the label advertisement discipline determined in thisversion ofway is unacceptable to an LSR, it must send a Session Rejected/Parameters Advertisement Mode Notification message in response to thespecification: Value Meaning 0 MergeInitialization message and notsupported For ATM Merge:establish the session. D, Loop Detection Indicates whether loop detection based on path vectors is enabled. A value of 0 means loop detection is disabled; a value of 1VP Merge supported 2 VC Merge supported 3 VP & VC Merge supported For Frame Relay Merge: Non-zero Merge supported ATM Null Encapsulation If present, specifiesmeans that loop detection is enabled. PVLim, Path Vector Limit The configured maximum path vector length. Must be 0 if loop detection is disabled (D = 0). If the loop detection pro- cedures would require the LSRsupportsto send a path vector that exceeds this limit, thenull encapsulation of [rfc1483]LSR will behave as if a loop had been detected forits data VCs ontheATM link managed byFEC in question. When Loop Detection is enabled in a portion of a network, it is recommended that all LSRs in that portion of theLDP session. In this case IP packets are carried directly inside AAL5 frames. If absent,network be configured with thenull encapsulation issame path vector limit. Although knowledege of a peer's path vector limit will notsupported. ATM Label Range Andersson, et al. [Page 59] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Used whenchange anLDP session manages label exchange forLSR's behavior, it does enable the LSR to alert anATM link. The ATM Label Range TLV contains 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 may NOT establish an adjacency with neighbors whose intersection range is NULL. 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Resoperator to a possible misconfiguration. Reserved This field is reserved. It must be set to zero ontransmis- siontransmission andmust beignored on receipt.Minimum VPI (12 bits) This 12 bit field specifies the lower bound of a block of Virtual Path IdentifiersMax PDU Length Two octet unsigned integer thatis supported onproposes theoriginating switch. Ifmaximum allowable length for LDP PDUs for theVPI issession. A value of 255 or lessthan 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 fieldspecifies thelower bound of a blockdefault maximum length ofVirtual Connection Identifiers that is supported on4096 octets. The receiving LSR MUST calculate theori- ginating switch.maximum PDU length for the session by using the smaller of its and its peer's proposals for Max PDU Length. The default maximum PDU length applies before session initialization completes. If theVCImaximum PDU length determined this way isless than 16-bits it should be right justified in this field and preceding bits should be setunacceptable to0. 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-bitsan LSR, itshould 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 ofmust send ablock of Virtual Connection Identifiers that is supported on the ori- ginating switch. If the VCI is less than 16-bits it should be right justifiedSession Rejected/Parameters Max PDU Length Notification message inthis field and preceding bits should be setresponse to0.the Initialization Andersson, et al. [Page60]53] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Frame Relay Label Range Used when anmessage and not establish the session. Receiver LDPsession manages label exchange for a Frame Relay link. The Frame Relay Label Range TLV containsIdentifer Identifies the receiver's labelrange supported byspace. This LDP Identifier, together with thetransmitting LSR. A receiving LSR MUST calculatesender's LDP Identifier in theintersection betweenPDU header enables thereceived range andreceiver to match the Initialization message with one of itsown supported label range. The intersectionHello adjacencies; see Section "Hello Message Pro- cedures". If there is no matching Hello adjacency, therangeLSR must send a Session Rejected/No Hello Notification message inwhichresponse to theLSR may allocateInitialization message andaccept labels. LSRs may NOTnot establishan adjacency with neighbors whose intersection range is NULL.the session. Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters are: Optional Parameter Type Length Value ATM Session Parameters 0x0501 var See below Frame Relay Session 0x0502 var See below Parameters ATM Session Parameters Used when an LDP session manages label exchange for an ATM link to specify ATM-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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|F| ATM Sess Parms (0x0501) |Reserved |Len| Minimum DLCILength | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | M | N |E| Reserved |Maximum DLCI+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATM Label Range Component 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Len This field specifies| | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATM Label Range Component N | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ M, ATM Merge Capabilities Specifies thenumber of bitsmerge capabilities ofthe DLCI.an ATM switch. Thefollowingfollow- ing values aresupported: Len DLCI bits 0 10 1 17 2 23 3.4.3.1. Initialization Message Procedures See Section "LDP Session Establishment" and particularly Section "Session Initialization" for general procedures for handling the Ini- tialization Message. 3.4.4. KeepAlive Message An LSR sends KeepAlive Messages as part of a mechanism that monitors the integritysupported in this version of theLDP session transport connection. The encoding for the KeepAlive Message is:specification: Andersson, et al. [Page61]54] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 Value Meaning 0 Merge not supported 1 VP Merge supported 2 VC Merge supported 30 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | KeepAlive (0x0201) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message Id Four octet integer used to identify this message. Optional Parameters No optional parameters are defined forVP & VC Merge supported If theKeepAlive message. 3.4.4.1. KeepAlive Message Proceduresmerge capabilities of the LSRs differ, then: - Non-merge and VC-merge LSRs may freely interoperate. - TheHold Timer mechanism described in Section "Maintaining LDP Ses- sions" resetsinteroperability of VP-merge-capable switches with non-VPN-merge-capable switches is aseesion hold timer every time an LDP PDUsubject for future study. Note that if VP merge isreceived. The KeepAlive Messageused, it isprovided to allow resetthe responsibility of theHold Timer in circumstances where an LSR has no other information to communicateingress node toan LDP peer. Anensure that the chosen VCI is unique within the LSRmust arrangedomain. N, Number of label range components Specifies the number of ATM Label Range Components included in the TLV. E, ATM Null Encapsulation A value of 1 specifies specifies that the LSR supports the null encapsulation of [rfc1483] for itspeer sees andata VCs on the ATM link managed by the LDPMessage from it at least every Hold Time period. That message may be any other fromsession. In this case IP packets are car- ried directly inside AAL5 frames. A value of 0 specifies that theprotocol or, in circumstances where therenull encapsulation isno need to send one of them, itnot supported. Reserved This field is reserved. It must beKeepAlive Message. 3.4.5. Address Message Anset to zero on transmission and ignored on receipt. One or more ATM Label Range Components A list of ATM Label Range Components which together specify the Label range supported by the transmitting LSR. A receiving LSRsendsMUST calculate theAddress Message to an LDP peer to advertiseintersection between the received range and itsinterface addresses.own supported label range. Theencoding forinter- section is theAddress Message is: Andersson, et al. [Page 62] Internet Draft draft-ietf-mpls-ldp-00.txt Augustrange 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 Notifi- cation message in response to the Initialization message and not establish the session. The encoding for an ATM Label Range Component is: Andersson, et al. [Page 55] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Address (0x0300) | Message LengthRes |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Minimum VPI |Message IDMinimum VCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Res | Maximum VPI |Address List TLV | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional ParametersMaximum VCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Message Id Four octet integer usedRes This field is reserved. It must be set toidentify this message. Address List TLV The listzero on transmis- sion and must be ignored on receipt. Minimum VPI (12 bits) This 12 bit field specifies the lower bound ofinterface addresses being advertised bya block of Virtual Path Identifiers that is supported on thesending LSR. The encoding fororiginating switch. If theAddress List TLVVPI isspecifiedless than 12-bits it should be right justified inSection "Address List TLV". Optional Parameters No optional parameters are defined forthis field and preceding bits should be set to 0. Minimum VCI (16 bits) This 16 bit field specifies theAddress message. 3.4.5.1. Address Message Procedures An LSRlower bound of a block of Virtual Connection Identifiers thatreceives an Address Message message usesis supported on theaddressesori- ginating switch. If the VCI is less than 16-bits itlearnsshould be right justified in this field and preceding bits should be set tomaintain a database for mapping between peer LDP Identif- iers and next hop addresses; see section "LDP Identifiers and Next Hop Addresses". When0. Maximum VPI (12 bits) This 12 bit field specifies the upper bound of anew LDP sessionblock of Virtual Path Identifiers that isinitialized and before sending Label Map- ping or Label Request messages and LSR should advertise its interface addresses with one or more Address messages. Whenever an LSR "activates" a new interface address,supported on the originating switch. If the VPI is less than 12-bits it shouldadver- tisebe right justified in this field and preceding bits should be set to 0. Maximum VCI (16 bits) This 16 bit field specifies thenew address with an Address message. Whenever an LSR "de-activates"upper bound of apreviously advertised address,block of Virtual Connection Identifiers that is supported on the ori- ginating switch. If the VCI is less than 16-bits it shouldwithdraw the address withbe right justified in this field and preceding bits should be set to 0. Frame Relay Session Parameters Used when anAddress Withdraw message; see Section "Address Withdraw Message".LDP session manages label exchange for a Frame Relay link to specify Frame Relay-specific session parameters. Andersson, et al. [Page63]56] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.4.6. Address Withdraw Message An LSR sends the Address Message to an LDP peer to withdraw previ- ously 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U|F| FR Sess Parms (0x0502) |Address Withdraw (0x0301) | MessageLength | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Message IDM | N | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Frame Relay Label Range Component 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Address List TLV| ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Optional ParametersFrame Relay Label Range Component N | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Message Id Four octet integer used to identify this message. Address list TLVM, Frame Relay Merge Capabilities Specifies the merge capabilities of a Frame Relay switch. The following values are supported in this version of the specifi- cation: Value Meaning 0 Merge not supported 1 Merge supported Non-merge and merge Frame Relay LSRs may freely interoperate. N, Number of label range components Specifies the number of Frame Relay Label Range Components included in the TLV. 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 A list ofinterface addresses being withdrawnFrame Relay Label Range Components which together specify the Label range supported by thesendingtransmitting LSR.The encoding forA receiving LSR MUST calculate theAddress list TLVintersection between the received range and its own supported label range. The inter- section isspecifiedthe range inSection "Address List TLV". Optional Parameters No optional parameters are definedwhich 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, theAddress Withdraw mes- sage. 3.4.6.1. Address Withdraw Message Procedures See Section "Address Message Procedures" 3.4.7. Label Mapping Message AnLSRsendsmust send a Session Rejected/Parameters LabelMappingRange Notifi- cation message in response toan LDP peer to advertise FEC-label bindings to the peer. The encoding fortheLabel Mapping Message is:Initialization message and Andersson, et al. [Page64]57] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Label Mapping (0x0400) | Message LengthReserved |Len| Minimum DLCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Reserved |FEC-Label Mapping TLV 1Maximum DLCI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-Label Mapping TLV n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message Id Four octet integer usedReserved This field is reserved. It must be set toidentify this message. FEC-Label Mapping TLV Eachzero on transmis- sion 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 1 17 2 23 Minimum DLCI This 23-bit vield specifies the lower bound of abinding between an FECblock 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 vield specifies the upper bound of alabel. A FEC-Label Mapping TLVblock of Data Link Connection Identifiers (DLCIs) that isa nested TLVsupported on the originating switch. The DLCI should be right justified in this field and unused bits should be set to 0. Note thatcontains a FEC TLV, a Label TLV, an optional COS TLF, an optional Hop Count TLV,there is no Generic Session Parameters TLV for sessions which advertise Generic Labels. 3.5.3.1. Initialization Message Procedures See Section "LDP Session Establishment" andan optional Path Vector TLV:particularly Section "Session Initialization" for general procedures for handling the Andersson, et al. [Page 58] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U| KeepAlive (0x0201) |FEC-label Mapping (0x0700) |Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FEC TLVMessage ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Label TLVOptional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| COS TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hop Count TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Path Vector TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The encodings for the FEC, Label, COS, Hop Count, and Path Vector TLVs can be found in Section "Commonly Used TLVs". NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: Andersson, et al. [Page 65] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Need to add multipath possibility to above by allowing multiple label TLVsMessage Id 32-bit value used tothe FEC-label Mapping TLV. This will be done with the addition: Label TLV2 (optional) ... Label TLVn (optional) with discussion. END NOTE * END NOTE * END NOTE:identify this message. Optional Parameters No optional parameters are defined for theLabel MappingKeepAlive message.3.4.7.1. Label Mapping3.5.4.1. KeepAlive Message Procedures TheMapping messageHold Timer mechanism described in Section "Maintaining LDP Ses- sions" resets a session hold timer every time an LDP PDU isused byreceived. The KeepAlive Message is provided to allow reset of the Hold Timer in circumstances where an LSR has no other information todistribute a label mapping for a FECcommunicate toits LDP peers. IfanLSR distributes a mapping for a FEC to multipleLDPpeers, it is a local matter whether it maps a single label to the FEC, and distributespeer. An LSR must arrange thatmapping to allitspeers, or whetherpeer receive an LDP Message from itusesat least every Hold Time period. Any LDP protocol message will do but, in circumstances where no other LDP protocol messages have been sent within the period, adifferent mapping for each of its peers.KeepAlive message must be sent. 3.5.5. Address Message An LSRis always responsible for the consistency ofsends thelabel map- pings it has distributed, and that its peers have these mappings. 3.4.7.1.1. Independent Control Mapping IfAddress Message to anLSR is configured for independent control, a mapping message is transmitted by an LSRLDP peer topeers upon any of the following conditions: 1. The LSR recognizes a new FEC via the forwarding table, and the label advertisement mode is Downstream allocation. 2.advertise its interface addresses. TheLSR receives a Request message from an upstream peerencoding foran FEC present intheLSR's forwarding table. 3. The next hop for an FEC changes to another LDP peer, and loop detection is configured.Address Message is: Andersson, et al. [Page66]59] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19984.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| Address (0x0300) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Address List TLV | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message Id 32-bit value used to identify this message. Address List TLV Theattributeslist ofa mapping change. 5.interface addresses being advertised by the sending LSR. Thereceipt of a mapping fromencoding for thedownstream next hop AND a) no upstream mapping has been created OR b) loop detectionAddress List TLV isconfigured OR c) the attributes ofspecified in Section "Address List TLV". Optional Parameters No optional parameters are defined for themapping have changed. 3.4.7.1.2. Ordered Control Mapping If anAddress message. 3.5.5.1. Address Message Procedures An LSRis doing ordered control, a Mappingthat receives an Address Message messageis transmitted by downstream LSRs upon any ofuses thefollowing conditions: 1. The LSR recognizesaddresses it learns to maintain anew FEC via the forwarding table, and is the egressdatabase forthat FEC. 2. The LSR receives a Request message from an upstreammapping between peerfor an FEC present in the LSR's forwarding table,LDP Identif- iers andthe LSR is the egress for that FEC OR has a downstream mapping for that FEC. 3. Thenext hopfor an FEC changes to another LDP peer,addresses; see Section "LDP Identifiers andloop detection is configured. 4. The attributes of a mapping change. 5. The receipt ofNext Hop Addresses". When amapping from the downstream next hop AND a) no upstream mapping has been created OR b) loop detectionnew LDP session isconfigured OR c) the attributes of the mapping have changed. 3.4.7.1.3. Downstream-on-Demandinitialized and before sending LabelAdvertisement In general, the upstreamMap- ping or Label Request messages an LSRis responsible for requesting label map- pings when operating in Downstream-on-Demand mode. However, unless some rules are followed, it is possible for neighboring LSRsshould advertise its interface addresses withdifferent advertisement modes to get into a livelock situation where everything is functioning properly, but no labels are distributed. For example, consider two LSRs Ru and Rd where Ru is the upstreamone or more Address messages. Whenever an LSRand Rd is"activates" a new interface address, it should adver- tise thedownstreamnew address with an Address message. Whenever an LSRfor"de-activates" aparticular FEC. In this example, Ru is using Downstream allocation mode and Rd is using Downstream- on-Demand mode. In this case, Rd may assume that Ru will request a label mapping when it wants one and Ru may assume that Rd will adver- tise a label ifpreviously advertised address, itwants Ru to use one. If Rd and Ru operate as sug- gested, no labels will be distributed and packets must be routed at layer-3.should withdraw the address with an Address Withdraw message; see Section "Address Withdraw Message". Andersson, et al. [Page67]60] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998This livelock situation can be avoided if the following rule is observed: an LSR operating in Downstream-on-Demand mode should not be expected to send unsolicited mapping advertisements. Therefore, if the downstream LSR is operating in Downstream-on-Demand mode, the upstream LSR is responsible for requesting label mappings as needed. However, if all interfaces on an LSR are configured to operate in Downstream- on-Demand mode the LSR can wait to issue a request until a corresponding request has been sent from an upstream LSR. 3.4.7.1.4. Downstream Allocation Label Advertisement In general, the downstream LSR is responsible for advertising a label mapping when it wants an upstream LSR to use the label. An upstream LSR may issue a mapping request if it so desires. 3.4.8. Label Request3.5.6. Address Withdraw Message An LSR sends theLabel RequestAddress Message to an LDP peer torequest a binding (mapping) for one or more specific FECs.withdraw previ- ously advertised interface addresses. The encoding for theLabel RequestAddress 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Label Request (0x0401)|U Address Withdraw (0x0301) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FEC-Request TLV 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ||~ ~| Address List TLV |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|FEC-Request TLV n| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message IdFour octet integer32-bit value used to identify this message.FEC-RequestAddress list TLVAndersson, et al. [Page 68] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 Each specifies an FEC for which a label mapping is requested. A FEC-RequestThe list of interface addresses being withdrawn by the sending LSR. The encoding for the Address list TLV isa nested TLV that contains a FEC TLV, anspecified in Section "Address List TLV". Optional Parameters No optionalCOS TLV, andparameters are defined for the Address Withdraw mes- sage. 3.5.6.1. Address Withdraw Message Procedures See Section "Address Message Procedures" 3.5.7. Label Mapping Message An LSR sends a Label Mapping message to anoptional Hop Count TLV.LDP peer to advertise FEC-label bindings to the peer. The encoding for the Label Mapping Message is: Andersson, et al. [Page 61] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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| Label Mapping (0x0400) |FEC-Request (0x0701) |Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |COSLabel TLV(optional)| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message Id 32-bit value used to identify this message. FEC TLV Specifies the FEC component of the FEC-Label mapping being adver- tised. See Section "FEC TLV" for encoding. Label TLV Specifies the Label component of the FEC-Label mapping. See Sec- tion "Label TLV" for encoding. 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 Request 4 See below Message Id COS TLV 1 See below Hop Count TLV(optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+1 See below Path Vector TLV variable See below The encodings for theFEC,COS,andHopCountCount, and Path Vector TLVsare specifiedcan be found in Section"Commonly Used TLVs". Optional Parameters No optional parameters are defined"TLV Encodings forthe Label Request message. 3.4.8.1.Commonly Used Parameters". Label Request MessageProcedures The RequestId If this Label Mapping message isused by an upstream LSRa response toexplicitly requesta Label Request message that carried thedownstream LSR assign and advertise a label for an FEC. An LSR transmits aReturn Message Id optional parameter (see Section "Label Request Message") the Label Mapping messageunder any ofmust include thefollowing condi- tions: 1.Request Message Id optional parameter. TheLSR recognizes a new FEC via the forwarding table, and the next hopvalue of this optional parameter isan Operational LDP peer, andtheLSR doesn't already have a mapping fromMessage Id of thenext hop forcorresponding Label Request Message. Andersson, et al. [Page 62] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 COS Specifies thegiven FEC. 2. The next hopClass of Service (COS) to be associated with theFEC changes, andFEC-Label mapping. If not present, the LSRdoesn't already have a mapping from that next hopshould use its default COS for IP packets as thegiven FEC. If a request cannot be satisfied by the downstream LSR, the request- ing LSR may optionally choose to request again at a later time, or, ifCOS. Hop Count Specifies thedownstream LSR is configured for Downstream Allo- cation,running total of therequestingnumber of LSRmay wait forhops along themapping, assuming thatLSP being setup by thedownstream LSR will provideLabel Message. Section "Hop Count Pro- cedures" describes how to handle this TLV. Path Vector Specifies themapping automatically when it is available. NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: InLSRs along thecase whereLSP being setup by thedownstream LSR is doing DoD,Label Mes- sage. Section "Path Vector Procedures" describes howdoes the Andersson, et al. [Page 69] Internet Draft draft-ietf-mpls-ldp-00.txt August 1998 requesting LSR decide whentomake its request? TDP addresseshandle thisissueTLV. 3.5.7.1. Label Mapping Message Procedures The Mapping message is used byhavingan LSR to distribute a"now I havelabelresources" message which it sends to downwstream peers whose requests it has denied. This serves asmapping for asignal to themFEC tore-issue their requests.an LDPshould probably have this. Without such a signal, the denied requester has no recourse but to periodically retry. END NOTE * END NOTE * END NOTE: 3.4.9. Label Withdraw Message Anpeer. If an LSRsendsdistributes aLabel Withdraw Messagemapping for a FEC toanmultiple LDPpeerpeers, it is a local matter whether it maps a single label tosignalthepeerFEC, and distributes thatthe peer may not continuemapping touse specific FEC-labelall its peers, or whether it uses a different mapping for each of its peers. An LSR is responsible for the consistency of the label map- pings it has distributed, and that its peers have these mappings. See Appendx A "LDP Label Distribution Procedures" for more details. 3.5.7.1.1. Independent Control Mapping If an LSR is configured for independent control, a mapping message is transmitted by the LSRhad previously advertised. This breaksupon any of themapping betweenfollowing conditions: 1. The LSR recognizes a new FEC via theFECsforwarding table, and thelabels.label advertisement mode is Downstream Unsolicited advertise- ment. 2. TheencodingLSR receives a Request message from an upstream peer for a FEC present in theLabel 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Label Withdraw (0x0402) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-Withdraw-Release TLV 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-Withdraw-Release TLV n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message Id Four octet integer used to identify this message. FEC-Withdraw-Release TLV Each TLV specifies a FEC-label mapping being withdrawn. A FEC- Withdraw-Release TLV is a nested TLV that containsLSR's forwarding table. 3. The next hop for a FECTLVchanges to another LDP peer, andan optional label TLV.loop detection is configured. Andersson, et al. [Page70]63] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19980 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-Withdraw-Release (0x0702) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Label TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+4. Theencodings for the FEC and Label TLVs are specified in Section "Commonly Used TLVs". NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: Need to add multipath possibility to above by allowing multiple label TLVs toattributes of a mapping change. 5. The receipt of a mapping from theFEC-label Mapping TLV. This will be done withdownstream next hop AND a) no upstream mapping has been created OR b) loop detection is configured OR c) theaddition: Label TLV2 (optional) ... Label TLVn (optional) with discussion. END NOTE * END NOTE * END NOTE: Optional Parameters No optional parameters are defined forattributes of theLabel Withdraw message. 3.4.9.1. Label Withdraw Message Procedures Anmapping have changed. 3.5.7.1.2. Ordered Control Mapping If an LSRtransmitsis doing ordered control, aWithdrawMapping messageunderis transmitted by downstream LSRs upon any of the followingcondition:conditions: 1. The LSRno longerrecognizes apreviously knownnew FEC via the forwarding table, and is the egress for that FEC. 2.Optionally, theThe LSRhas unsplicedreceives a Request message from an upstreamlabel from the downstream label. Thepeer for a FEC present in theFEC-Withdraw-Release TLVLSR's forwarding table, and the LSR is the egress for that FEC OR has a downstream mapping for that FEC. 3. The next hop for a FEC changes to another LDP peer, and loop detection is configured. 4. The attributes of a mapping change. 5. The receipt of a mapping from the downstream next hop AND 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 In general, the upstream LSR is responsible forwhichrequesting label map- pings when operating in Downstream-on-Demand mode. However, unless some rules are followed, it is possible for neighboring LSRs with different advertisement modes to get into a livelock situation where everything is functioning properly, but no labels are distributed. For example, consider two LSRs Ru and Rd where Ru is the upstream LSR and Rd is the downstream LSR for a particular FEC. In this example, Ru is using Downstream Unsolicited advertisement mode and Rd is using Downstream-on-Demand mode. In this case, Rd may assume that Ru will request a label mapping when it wants one and Ru may assume that Rd will advertise a label if it wants Ru tobe withdrawn.use one. If Rd and Ru operate as suggested, nolabel TLV follows the FEC, alllabelsassoci- ated with the FEC arewill be distributed from Rd to Ru. This livelock situation can bewithdrawn, else only the labels specified inavoided if the followingLabel TLV are torule is observed: an LSR operating in Downstream-on-Demand mode should not bewithdrawn.Andersson, et al. [Page71]64] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.4.10. Label Release Message Anexpected to send unsolicited mapping advertisements. Therefore, if the downstream LSRsendsis operating 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 responsible for advertising a label mapping when it wants an upstream LSR to use the label. An upstream LSR may issue a mapping request if it so desires. 3.5.8. LabelRelease messageRequest Message An LSR sends the Label Request Message to an LDP peer tosignal the peer that the LSR no longer needs specific FEC-label mappings previ- ously requested of and/or advertised by the peer.request a binding (mapping) for a FEC. The encoding for the LabelReleaseRequest 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+||U| LabelRelease (0x0403)Request (0x0401) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FEC-Withdraw-Release TLV 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-Withdraw-ReleaseFEC TLVn| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Optional Parameters | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message IdFour octet integer32-bit value used to identify this message.FEC-Withdraw-Release TLVs EachFEC TLVspecifies a FEC-label mapping being released.Theencod- ingFEC forthe FEC-Withdraw-Release TLVwhich a label isspecified inbeing requested. See Section"With- draw Message". NOTE*NOTE*NOTE*NOTE*NOTE*NOTE: Need to add multipath possibility to above by allowing multiple label TLVs to the FEC-label Mapping TLV."FEC TLV" for encoding. Optional Parameters Thiswill be done with the addition: Label TLV2 (optional) ... Label TLVn (optional) with discussion. END NOTE * END NOTE * END NOTE:variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters are: Optional Parameter Length Value Return Message Id 0 See below COS TLV 1 See below Hop Count TLV 1 See below Andersson, et al. [Page72]65] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Optional Parameters No optional parameters are definedPath Vector TLV variable See below The encodings for theLabel Release message. 3.4.10.1. Label Release Message Procedures An LSR transmits a Release message to aCOS, Hop Count, and Path Vector TLVs can be found in Section "TLV Encodings for Commonly Used Parameters". Return Message Id Requests the LDP peerwhen it is no longer needsinclude the Message Id of this Label Request message in its Label Mapping message response. If an LDP peer receives alabel previously received from orLabel Request message with the Return Mes- sage Id optional parameter, its Label Mapping message response must contain a Label Request Message Id optional parameter with the Message Id of the Label Request message. See Section "Label Mapping Message". COS Specifies the Class of Service (COS) to be associated with the requested FEC-Label mapping. If not present, the LSR should use its default COS for IP packets as the COS. Hop Count Specifies the running total of the number of LSR hops along the LSP being setup by the Label Request Message. Section "Hop Count Procedures" describes how to handle this TLV. Path Vector Specifies the LSRs along the LSR being setup by the Label Request Message. Section "Path Vector Procedures" describes how to handle this TLV. 3.5.8.1. Label Request Message Procedures The Request message is used by an upstream LSR to explicitly request thatpeer.the downstream LSR assign and advertise a label for a FEC. An LSRtransmitsmay transmit aReleaseRequest message under any of the followingcondi- tions:con- ditions: 1. The LSRwhich sentrecognizes a new FEC via thelabel mapping is no longerforwarding table, and the next hopfor the mapped FEC,is an LDP peer, and the LSRis configureddoesn't already have a mapping from the next hop forconservative operation.the given FEC. 2. The next hop to the FEC changes, and the LSRdetermines thatdoesn't already have apreviously received label is no longer valid, asmapping from that next hop for thedownstreamgiven FEC. Andersson, et al. [Page 66] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3. The LSR receives a Label Request for a FEC fromwhich it was received is no longeran upstream LDP peer, the FEC next hopfor the FEC,is an LDP peer, and the LSRis config- ured for conservative operation. 3.doesn't already have a mapping from the next hop. The receiving LSRhas receivedshould respond to aWithdrawLabel Request messageforwith apreviously received label. Note that if an LSR is configuredLabel Mapping for"liberal mode",the requested label or with arelease mes- sage will never be transmitted inNotification message indicating why it cannot satisfy thecaserequest. This version ofconditions (1) and (2) as specified above. In this case, the upstream LSR keeps each unused label, so that it can immediately be used later ifthedownstream peer becomesprotocol defines thenext hopfollowing Status Codes for theFEC.Notification message that signals a request cannot be satisfied: No Route The FECin the FEC-Withdraw-Release TLVfor which a label was requested is for a Prefix FEC Ele- ment, and the LSR does not have a route forwhich labels are to be released. If nothat prefix. No Label Resources The LSR cannot provide a labelTLV follows the FEC TLV, all labels associated withbecause of resource limitations. When resources become available theFEC are to be released, else onlyLSR must notify thelabels specified inrequest- ing LSR by sending a Notification message with thefollowing Label TLV are to be released. 3.4.11.LabelQuery MessageResources Available Status Code. An LSRsendsthat receives a No LabelQuery messageResources response toan LDP peer when performinga Label Request message must not issue further Label Request messages until it receives a Notification message with theloop prevention diffusion algorithm onLabel Resources Available Status code. Loop Detected The LSR has detected a looping Label Requst message. See Appendx A "LDP Label Distribution Procedures" for more details. 3.5.9. Label Withdraw Message An LSR sends a Label Withdraw Message to anFEC.LDP peer to signal the peer that the peer may not continue to use specific FEC-label map- pings the LSR had previously advertised. This breaks the mapping between the FECs and the labels. The encoding for the LabelQueryWithdraw Message is: Andersson, et al. [Page73]67] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998 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| LabelQuery (0x0405)Withdraw (0x0402) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Path VectorLabel TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Message IdFour octet integer32-bit value used to identify this message.The encodings forFEC TLV Identifies the FECand Path Vector TLVs can be found in Sec- tion "Commonly Used TLVs".for which the FEC-label mapping is being with- drawn. Optional ParametersNoThis variable length field contains 0 or more parameters, each encoded as a TLV. The optional parametersare definedare: Optional Parameter Length Value Label TLV variable See below The encoding fortheLabelQuery message. 3.4.11.1.TLVs are found in Section "Label TLVs". Label If present, specifies the label being withdrawn (see procedures below). 3.5.9.1. LabelQueryWithdraw MessageProcecures See Section "Loop PreventionProcedures An LSR transmits a Label Withdraw message under the following condi- tions: 1. The LSR no longer recognizes a previously known FEC. 2. The LSR has decided unilaterally (e.g., viaDiffusion" for general proceduresconfiguration) to no longer label switch a FEC (or FECs) with the label mapping being withdrawn. The FEC TLV specifies the FEC forhandlingwhich labels are to be withdrawn. If no Label TLV follows theQuery Message. 3.4.12. Explicit Route Request Message 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ER Request (0x0500) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-ER TLV 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FEC-ER TLV n | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+FEC, all labels associated with the FEC Andersson, et al. [Page74]68] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Message Id Four octet integer usedare toidentify this message. FEC-ER TLV Each specifies a binding between an FEC and a label. A FEC-ERbe withdrawn; otherwise only the label specified in the optional Label TLV isa nestedto be withdrawn. The FEC TLVthat contains amay contain the Wildcard FECTLV, aElement; if so, it may con- tain no other FEC Elements. In this case, if the LabelTLV,Withdraw mes- sage contains anexplicit- route identifier (ERLSPID)optional Label TLV, then theexplict-route TLV,label is to be with- drawn from all FECs to which it is bound. If there is not an optionalCOS TLF, andLabel TLV in the Label Withdraw message, then the sending LSR is withdrawing all label mappings previously advertised to the receiving LSR. See Appendx A "LDP Label Distribution Procedures" for more details. 3.5.10. Label Release Message An LSR sends a Label Release message to anoptional Bandwith Reservation TLV:LDP peer to signal the peer that the LSR no longer needs specific FEC-label mappings previ- ously requested of and/or advertised by the peer. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |U| Label Release (0x0403) |FEC-ER TLV (0x0703) |Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FEC TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERLSPID TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Explicit Route TLVMessage ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |COSFEC TLV(optional)| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Bandwidth ReservationLabel TLV (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The encodings forMessage Id 32-bit value used to identify this message. FEC TLV Identifies the FEC for which the FEC-label mapping is being released. Optional Parameters This variable length field contains 0 or more parameters, each encoded as a TLV. The optional parameters are: Optional Parameter Length Value Andersson, et al. [Page 69] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Label TLV variable See below The encodings for Label TLVs are found in Section "Label TLVs". Label If present, the label being released (see procedures below). 3.5.10.1. Label Release Message Procedures An LSR transmits a Label Release message to a peer when it is no longer needs a label previously received from or requested of that peer. An LSR must transmit a Label Release message under any of the follow- ing conditions: 1. The LSR which sent the label mapping is no longer the next hop for the mapped FEC, and the LSR is configured for conservative operation. 2. The LSR receives a label mapping from an LSR which is not the next hop for the FEC, and the LSR is configured for conserva- tive operation. 3. The LSR has received a Label Withdraw message for a previously received label. Note that if an LSR is configured for "liberal mode", a release mes- sage will never be transmitted in the case of conditions (1) and (2) as specified above. In this case, the upstream LSR keeps each unused label, so that it can immediately be used later if the downstream peer becomes the next hop for the FEC. The FEC TLV specifies the FEC for which labels are to be released. If no Label TLV follows the FEC, all labels associated with the FEC are to be released; otherwise only the label specified in the optional Label TLV is to be released. The FEC TLV may contain the Wildcard FEC Element; if so, it may con- tain no other FEC Elements. In this case, if the Label Release mes- sage contains an optional Label TLV, then the label is to be released for all FECs to which it is bound. If there is not an optional Label TLV in the Label Release message, then the sending LSR is releasing all label mappings previously learned from the receiving LSR. See Appendx A "LDP Label Distribution Procedures" for more details. Andersson, et al. [Page 70] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3.6. Messages and TLVs for Extensibility Support for LDP extensibility includes the rules for the U and F bits that specify how an LSR should handle unknown TLVs and messages. 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 convey vendor-private information between LSRs. 3.6.1.1. LDP Vendor-private TLVs The Type range 0x2F00 through 0x2FFF 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 (0x2F00-0x2FFF) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Data.... | ~ ~ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 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 is silently ignored and the rest of the message is processed as if the unknown TLV did not exist. The determination as to whether a vendor-private message is under- stood is based on the Type and the mandatory Vendor ID field. Andersson, et al. [Page 71] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 F bit Forward unknown TLV bit. This bit only applies when the U bit is set and the LDP message containing the unknown TLF is is to be for- warded. If F is clear (=0), the unknown TLV is not forwarded with the containing message; if F is set (=1), the unknown TLV is for- warded with the containing message. Type Type value in the range 0x2F00 through 0x2FFF. Together, the Type and Vendor Id field specify how the Data field is to be inter- preted. Length Specifies the cumulative length in octets of the Vendor ID and Data fields. Vendor Id 802 Vendor ID as assigned by the IEEE. Data The remaining octets after the Vendor ID in the Value field are optional vendor-dependent data. 3.6.1.2. LDP Vendor-private Messages The Message Type range 0x2F00 through 0x2FFF is reserved for vendor- private Messages. Andersson, et al. [Page 72] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 (0x2F00-0x2FFF) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + | Remaining Mandatory Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | Optional Parameters | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ U bit Unknown message bit. Upon receipt of an unknown message, if U is clear (=0), a notification is returned to the message originator; if U is set (=1), the unknown message is silently ignored. The determination as to whether a vendor-private message is under- stood is based on the Msg Type and the Vendor ID parameter. Msg Type Message type value in the range 0x2F00 through 0x2FFF. Together, the Msg Type and the Vendor ID specify how the message is to be interpreted. Message Length Specifies the cumulative length in octets of the Message ID, Vendor ID, Remaining Mandatory Parameters and Optional Parameters. Message ID 32-bit integer used to identify this message. Used by the sending LSR to facilitate identifying notification messages that may apply to this message. An LSR sending a notification message in response to this message will include this Message Id in the notification message; see Section "Notification Message". Vendor ID 802 Vendor ID as assigned by the IEEE. Andersson, et al. [Page 73] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Remaining Mandatory Parameters Variable length set of remaining required message parameters. Optional Parameters Variable length set of optional message parameters. 3.6.2. LDP Experimental Extensions LDP support for experimentation is similar to 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 the following difference. Experimental TLVs and messages use an Experiment ID field in place of a Vendor ID field. The Experiment ID field is used with the Type or Message Type field to specify the interpretation of the experimental TLV or Message. Administration of Experiment IDs is the responsiblity of the experimenters. 3.7. Message Summary The following are the LDP messages defined in this version of the protocol. Andersson, et al. [Page 74] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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" Vendor-Private 0x2F00-0x2FFF Experimental 0x3F00-0x3FFF 3.8. TLV Summary The following are the TLVs defined in this version of the protocol. TLV Type Section Title FEC 0x0100 "FEC TLV" Address List 0x0101 "Address List TLV" COS 0x0102 "COS 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 Transport Address 0x0401 "Hello Message" Configuration 0x0402 "Hello Message" Sequence Number Common Session 0x0500 "Initialization Message" Parameters ATM Session Parameters 0x0501 "Initialization Message" Frame Relay Session 0x0502 "Initialization Message" Parameters Vendor-Private 0x2F00-0x2FFF Experimental 0x3F00-0x3FFF Andersson, et al. [Page 75] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3.9. Status Code Summary The following are the Status Codes defined in this version of the protocol. Status Code Type Section Title Success 0x00000000 "Status TLV" Bad LDP Identifer 0x80000001 "Events Signaled by ..." Bad Protocol Version 0x80000002 "Events Signaled by ..." Bad PDU Length 0x80000003 "Events Signaled by ..." Unknown Message Type 0x80000004 "Events Signaled by ..." Bad Message Length 0x80000005 "Events Signaled by ..." Unknown TLV 0x80000006 "Events Signaled by ..." Bad TLV length 0x80000007 "Events Signaled by ..." Malformed TLV Value 0x80000008 "Events Signaled by ..." Hold Timer Expired 0x80000009 "Events Signaled by ..." Shutdown 0x8000000A "Events Signaled by ..." Loop Detected 0x0000000B "Loop Detection" Unknown FEC 0x0000000C "FEC Procedures" No Route 0x0000000D "Label Request Mess ..." No Label Resources 0x0000000E "Label Request Mess ..." Label Resources Available 0x0000000F "Label Request Mess ..." Session Rejected/ 0x80000010 "Session Initialization" No Hello Session Rejected/ 0x80000011 "Session Initialization" Parameters Advertisement Mode Session Rejected/ 0x80000012 "Session Initialization" Parameters Max PDU Length Session Rejected/ 0x80000013 "Session Initialization" Parameters Label Range 3.10. UDP and TCP Ports The UDP port for LDP Hello messages is 646. The TCP port for establishing LDP session connections is 646. Andersson, et al. [Page 76] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 4. Security This section specifies an optional mechanism to protect against the introduction of spoofed TCP segments into LDP session connection streams. It is based on use of the TCP MD5 Signature Option specified in [rfc2385] for use by BGP. See [rfc1321] for a specification of the MD5 hash function. 4.1. The TCP MD5 Signature Option The following quotes from [rfc2385] outline the security properties achieved by using the TCP MD5 Signature Option and summarizes its operation: "IESG Note This document describes currrent 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 con- nection 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 pro- tect 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 appli- cation. It could even change during the lifetime of a particu- lar connection so long as this change was synchronized on both ends (although retransmission can become problematical in some Andersson, et al. [Page 77] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 insuffi- ciently 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]. 4.2. LDP Use of the TCP MD5 Signature Option LDP uses the TCP MD5 Signature Option as follows: - Use of the MD5 Signature Option for LDP TCP connections is a con- figurable LSR option. - An LSR that uses the MD5 Signature Option is configured with a password for each potential LDP peer. - The LSR applies the MD5 algorithm as specified in [RFC2385] to compute the MD5 digest for a TCP segment to be sent to a peer. This computation makes use of the peer password as well as the TCP segment. Andersson, et al. [Page 78] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 - When the LSR receives a TCP segment with an MD5 digest, it vali- dates the segment by calculating the MD5 digest (using its own record of the password) and compares the computed digest with the received digest. If the comparison fails, the segment is dropped without any response to the sender. - The LSR ignores LDP Hellos from any LSR for which a password has not been configured. This ensures that the LSR establishes LDP TCP connections only with LSRs for which a password has been con- figured. 5. Intellectual Property Considerations The IETF has been notified of intellectual property rights claimed in regard to some or all of the specification contained in this docu- ment. For more information consult the online list of claimed rights. 6. Acknowledgments The ideas and text in this document have been collected from a number of sources. We would like to thank Rick Boivie, Ross Callon, Alex Conta, Eric Gray, Yoshihiro Ohba, Eric Rosen, Bernard Suter, Yakov Rekhter, and Arun Viswanathan. 7. References [ARCH] E. Rosen, A. Viswanathan, R. Callon, "Multiprotocol Label Switching Architecture", draft-ietf-mpls-arch-02.txt, July 1998 [ATM] B. Davie, J. Lawrence, K. McCloghrie, Y. Rekhter, E. Rosen, G. Swallow, P. Doolan, "Use of Label Switching With ATM", draft-ietf- mpls-atm-00.txt, September, 1998 [DIFFSERV] S. Blake, D. Black, M. Carlson, E. Davies, Z. Wang, W. Weiss, "An Architecture for Differentiated Services", draft-ietf- diffserv-arch-02.txt, October, 1998 [ENCAP] E. Rosen, Y. Rekhter, D. Tappan, D. Farinacci, G. Fedorkow, T. Li, A. Conta, "MPLS Label Stack Encoding" draft-ietf-mpls-label- encaps-02.txt, July, 1998 [FR] A. Conta, P. Doolan, A. Malis, "Use of Label Switching on Frame Relay Networks" draft-ietf-mpls-fr-02.txt, October, 1998 Andersson, et al. [Page 79] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 [FRAMEWORK] R. Callon, P. Doolan, N. Feldman, A. Fredette, G. Swal- low, A. Viswanathan, "A Framework for Multiprotocol Label Switching" draft-ietf-mpls-framework-02.txt, November 1997 [rfc1321] Rivest, R., "The MD5 Message-Digest Algorithm," RFC 1321, April 1992. [rfc1483] J. Heinanen, "Multiprotocol Encapsulation over ATM Adapta- tion Layer 5", RFC 1483, Telecom Finland, July 1993 [rfc1583] J. Moy, "OSPF Version 2", RFC 1583, Proteon Inc, March 1994 [rfc1700] J. Reynolds, J.Postel, "ASSIGNED NUMBERS", October 1994. [rfc1771] Y. Rekhter, T. Li, "A Border Gateway Protocol 4 (BGP-4)", RFC 1771, IBM Corp, Cisco Systems, March 1995 [rfc2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5 Signature Option", RFC 2385, August 1998. 8. Author Information Loa Andersson Nortel Networks Inc Kungsgatan 34, PO Box 1788 111 97 Stockholm Sweden Phone: +46 8 441 78 34, Mobile: +46 70 522 78 34 email: loa_andersson@baynetworks.com Paul Doolan Ennovate Networks 330 Codman Hill Rd Marlborough MA 01719 Phone: 978-263-2002 email: pdoolan@ennovatenetworks.com Nancy Feldman IBM Corp. 17 Skyline Drive Hawthorne NY 10532 Phone: 914-784-3254 email: nkf@us.ibm.com Andre Fredette Nortel Networks Inc 3 Federal Street Andersson, et al. [Page 80] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Billerica, MA 01821 Phone: 978-916-8524 email: fredette@baynetworks.com Bob Thomas Cisco Systems, Inc. 250 Apollo Dr. Chelmsford, MA 01824 Phone: 978-244-8078 email: rhthomas@cisco.com Andersson, et al. [Page 81] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Appendix A. LDP Label Distribution Procedures This section specifies label distribution behavior in terms of LSR response to the following events: - Receive Label Request Message; - Receive Label Mapping Message; - Receive Label Release Message; - Receive Label Withdraw Message; - Recognize new FEC; - Detect change in FEC next hop; - Receive Notification Message / No Label Resources; - Receive Notification Message / No Route; - Receive Notification Message / Loop Detected; - Receive Notification Message / Label Resources Available; - Detect local label resources have become available; - LSR decides to no longer label switch a FEC; - Timeout of deferred label request. The specification of LSR behavior in response to an event has three parts: 1. Summary. Prose that describes LSR response to the event in overview. 2. Context. A list of elements referred to by the Algorithm part of the specification. (See 3.) 3. Algorithm. An algorithm for LSR response to the event. The Summary may omit details of the LSR response, such as bookkeeping action or behavior dependent on the LSR label advertisement mode, control mode, or label retention mode in use. The intent is that the Algorithm fully and unambiguously specify the LSR response. The algorithms in this section use procedures defined in the MPLS architecture specification [ARCH] for hop-by-hop routed traffic. These procedures are: - Label Distribution procedure, which is performed by a downstream LSR to determine when to distribute a label for a FEC to LDP peers. The architecture defines four Label Distribution pro- cedures: . Downstream Unsolicited Independent Control, called PushUncon- ditional in [ARCH]. Andersson, et al. [Page 82] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 . Downstream Unsolicited Ordered Control, called PushCondi- tional in [ARCH]. . Downstream On Demand Independent Control, called PulledUncon- ditional in [ARCH]. . Downstream On Demand Ordered Control, called PulledCondi- tional in [ARCH]. - Label Withdrawal procedure, which is performed by a downstream LSR to determine when to withdraw a FEC label mapping previously distributed to LDP peers. The architecture defines a single Label Withdrawal procedure. Whenever an LSR breaks the binding between a label and a FEC, it must withdraw the FEC label mapping from all LDP peers to which it has previously sent the mapping. - Label Request procedure, which is performed by an upstream LSR to determine when to explicitly request that a downstrem LSR bind a label to a FEC and send it the corresponding label mapping. The architecture defines three Label Request procedures: . Request Never. The LSR never requests a label. . Request When Needed. The LSR requests a label whenever it needs one. . Request On Request. This procedure is used by non-label merg- ing LSRs. The LSR requests a label when it receives a request for one, in addition to whenever it needs one. - Label Release procedure, which is performed by an upstream LSR to determine when to release a previously received label mapping for a FEC. The architecture defines two Label Release procedures: . Conservative label retention, called Release On Change in [ARCH]. . Liberal label retention, called No Release On Change in [ARCH]. - Label Use procedure, which is performed by an LSR to determine when to start using a FEC label for forwarding/switching. The architecture defines three Label Use procedures: . Use Immediate. The LSR immediately uses a label received from a FEC next hop for forwarding/switching. Andersson, et al. [Page 83] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 . Use If Loop Free. The LSR uses a FEC label received from a FEC next hop for forwarding/switching only if it has deter- mined that by doing so it will not cause a forwarding loop. . Use If Loop Not Detected. This procedure is the same as Use Immediate unless the LSR has detected a loop in the FEC LSP. Use of the FEC label for forwarding/switching will continue until the next hop for the FEC changes or the loop is no longer detected. This version of LDP does not include a loop prevention mechanism; therefore, the procedures below do not make use of the Use If Loop Free procedure. - Label No Route procedure (called Label Not Available procedure in [ARCH]), which is performed by an upstream LSR to determine how to respond to a No Route notification from a downstream LSR in response to a request for a FEC label mapping. The architecture specification defines two Label No Route procedures: . 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 when the downstream LSR has a next hop and it should not reissue the request. A.1. Handling Label Distribution Events The algorithms for handling label distribution events share common actions. The specifications below package these common actions into procedure units. Specifications for these common procedures are in their own section "Common Label Distribution Procedures", which fol- lows this. An implementation would use data structures to store information about protocol activity. This appendix specifies the information to be stored in sufficient detail to describe the algorithms, and assumes the ability to retrieve the information as needed. It does not specify the details of the data structures. Andersson, et al. [Page 84] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 A.1.1. Receive Label Request Summary: The response by an LSR to receipt of a FEC label request from an LDP peer may involve one or more of the following actions: - Transmission of a notification message to the requesting LSR indicating why a label mapping for the FEC cannot be provided; - Transmission of a FEC label mapping to the requesting LSR; - Transmission of a FEC label request to the FEC next hop; - Installation of labels for forwarding/switching use by the LSR. Context: - 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. E.g., CoS, Hop Count Path Vector. - SAttributes. Attributes to be included in Label Request message, if any, propagated to FEC Next Hop. - StoredHopCount. The hop count, if any, previously recorded for the FEC. Algorithm: LRq.1 Execute procedure Check_Received_Attributes (MsgSource, RAt- tributes). If Loop Detected, goto LRq.11. LRq.2 Is there a Next Hop for FEC? If so, goto LRq.4. LRq.3 Execute procedure Send_Notification (MsgSource, No Route). Goto LRq.11. LRq.4 Has LSR previously received a label request for FEC from MsgSource? If not, goto LRq.6. (See Note 1.) Andersson, et al. [Page 85] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 LRq.5 Is the label request a duplicate request? If so, Goto LRq.11. (See Note 2.) LRq.6 Record label request for FEC received from MsgSource and mark it pending. LRq.7 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 map- ping 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, RAt- tributes, SAttributes, Propagating, StoredHopCount). 3. Execute procedure Send_Label (MsgSource, FEC, SAttri- butes). 4. Is LSR egress for FEC? OR Has LSR previously received and retained a label map- ping for FEC from Next Hop? If so, goto LRq.9. If not, goto LRq.8. 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 map- ping for FEC from Next Hop? If not, goto LRq.8. 2. Execute procedure Prepare_Label_Mapping_Attributes(MsgSource, FEC, RAt- tributes, SAttributes, IsPropagating, StoredHopCount) 3. Execute procedure Send_Label (MsgSource, FEC, SAttri- butes). Goto LRq.9. LRq.8 Perform LSR Label Request procedure: For Request Never Andersson, et al. [Page 86] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 1. Goto LRq.11. 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.11. LRq.9 Has LSR successfully sent a label for FEC to MsgSource? If not, goto LRq.11. (See Note 3.) LRq.10 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.11 DONE Notes: 1. In the case where MsgSource is a non-label merging LSR it will send a label request for each upstream LDP peer that has requested a label for FEC from it. The LSR must be able to dis- tinguish such requests from a non-label merging MsgSource from duplicate label requests. 2. When an LSR sends a label request to a peer it records that the request has been sent and marks it as outstanding. As long as the request is marked outstanding the LSR should not send another request for the same label to the peer. Such a second request would be a duplicate. The Send_Label_Request procedure described below obeys this rule. A duplicate label request is considered a protocol error and should be dropped by the receiving LSR (perhaps with a suitable notification returned to MsgSource). Andersson, et al. [Page 87] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 3. The Send_Label procedure may fail due to lack of label resources, in which case the LSR should not perform the Label Use procedure. A.1.2. Receive Label Mapping Summary: The response by an LSR to receipt of a FEC label mapping from an LDP peer may involve one or more of the following actions: - Transmission of a label release message for the FEC label to the LDP peer; - Transmission of label mapping messages for the FEC to one or more LDP peers, - Installation of the newly learned label for forwarding/switching use by the LSR. 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 FEC, if any, previously advertised to an upstream peer. - StoredHopCount. The hop count previously recorded for the FEC. - RAttributes. Attributes received with the message. E.g., CoS, Hop Count, Path Vector. - SAttributes to be included in Label Mapping message, if any, pro- pagated to upstream peers. Algorithm: LMp.1 Does the received label mapping match an outstanding label request for FEC previously sent to MsgSource. If not, goto LMp.9. Andersson, et al. [Page 88] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 LMp.2 Delete record of outstanding FEC label request. LMp.3 Execute procedure Check_Received_Attributes (MsgSource, RAt- tributes). If No Loop Detected, goto LMp.9. LMp.4 Does the LSR have a previously received label mapping for FEC from MsgSource? If not, goto LMp.8. (See Note 1.). LMp.5 Does the label previously received from MsgSource match Label (i.e., the label received in the message)? If not, goto LMp.8. (See Note 2.) LMp.6 Delete matching label mapping for FEC previously received from MsgSource. LMp.7 Remove Label from forwarding/switching use. (See Note 3.). LMp.8 Execute procedure Send_Message (MsgSource, Label Release, FEC, Label). Goto LMp.26. LMp.9 Determine the Next Hop for FEC. LMp.10 Is MsgSource the Next Hop for FEC? If so, goto LMp.12. LMp.11 Perform LSR Label Release procedure: For Conservative Label retention: 1. Execute procedure Send_Message (MsgSource, Label Release, FEC, Label). Goto LMp.26. For Liberal Label retention: 1. Record label mapping for FEC with Label and RAttri- butes has been received from MsgSource. Goto LMp.26. LMp.12 Does LSR have a previously received label mapping for FEC from MsgSource? If not, goto LMp.14 LMp.13 Does the label previously received from MsgSource match Label (i.e., the label received in the message)? If not, goto LMp.8. (See Note 2.) Andersson, et al. [Page 89] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 for LMp.25 for each Peer, other than MsgSource. LMp.18 Has LSR previously sent a label mapping for FEC to Peer? If not, goto LMp.23. LMp.19 Are RAttributes in the received label mapping consistent with those previously sent to Peer? If so, goto LMp.24. (See Note 4.) 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 5.) LMp.22 Update record of label mapping for FEC previously sent to Peer to include the new attributes sent. Goto LMp.24. LMp.23 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, RAttri- butes, SAttributes, IsPropagating, UnknownHopCount). 2. Execute procedure Send_Label (Peer, FEC, SAttri- butes). If the procedure fails, continue iteration for next Peer at LMp.17. 3. Goto LMp.24. For Downstream On Demand Independent Control OR For Downstream On Demand Ordered Control 1. Does LSR have a label request for FEC from Peer Andersson, et al. [Page 90] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 marked as pending? If not, continue iteration for next Peer at LMp.17. 2. Execute procedure Prepare_Label_Mapping_Attributes(Peer, FEC, RAttri- butes, SAttributes, IsPropagating, UnknownHopCount) 3. Execute procedure Send_Label (Peer, FEC, SAttri- butes). If the procedure fails, continue iteration for next Peer at LMp.17. 4. Goto LMp.24. LMp.24 Perform LSR Label Use procedure: For Use Immediate OR For Use If Loop Not Detected 1. Install label received and label sent to Peer for forwarding/switching use. Goto LMp.25. LMp.25 End iteration from LMp.17. LMp.26 DONE. Notes: 1. If LSR has detected a loop and it has not previously received a label mapping from MsgSource for the FEC, it simply releases the label. 2. A 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. 3. If Label is not in forwarding/switching use, LMp.7 has no effect. 4. 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 pre- viously 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 Andersson, et al. [Page 91] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 has no way to check the consistency of a newly received Path Vector. This means that whenever such an LSR receives a map- ping message carrying a Path Vector it must always propagate the Path Vector. 5. LMp.19 through LMp.21 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 Detec- tion is configured on, the propagated attributes must include the Path Vector A.1.3. Receive Label Release Summary: When an LSR receives a label release message for a FEC from a peer, it checks whether other peers hold the released label. If none do, the LSR removes the label from forwarding/switching use, if it has not already done so, and if the LSR holds a label mapping from the FEC next hop, it releases the label mapping. 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 Remove MsgSource from record of peers that hold Label for FEC. (See Note 1.) LRl.2 Does message match an outstanding label withdraw for FEC pre- viously sent to MsgSource? If not, goto LRl.4 LRl.3 Delete record of outstanding label withdraw for FEC previ- ously sent to MsgSource. LRl.4 Is LSR merging labels for this FEC? If not, goto LRl.6. (See Note 2.) Andersson, et al. [Page 92] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 LRl.5 Has LSR previously advertised a label for this FEC to other peers? If so, goto LRl.10. LRl.6 Is LSR egress for the FEC? If so, goto LRl.10 LRl.7 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.10. LRl.8 Is LSR configured to propagate releases? If so, goto LRl.10. (See Note 3.) LRl.9 Execute procedure Send_Message (Next Hop, Label Release, FEC, Label from Next Hop). LRl.10 Remove Label from forwarding/switching use for traffic from MsgSource. LRl.11 Do any peers still hold Label for FEC? If so, goto LRl.13. LRl.12 Free the Label. LRl.13 DONE. Notes: 1. If LSR is using Downstream Unsolicted label distribution, it should not re-advertise a label mapping for FEC to MsgSource until MsgSource requests it. 2. LRl.4 through LRl.8 deal with determining whether where the LSR should propagate the label release to a downstream peer (LRl.9). 3. If LRl.8 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 Andersson, et al. [Page 93] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 impor- tance of keeping LSP setup latency low by keeping the amount of signalling required small; whether LSP setup is ingress- controlled or egress-controlled in the operating environment. A.1.4. Receive Label Withdraw Summary: When an LSR receives a label withdraw message for a FEC from an LDP peer, it responds with a label release message and it removes the label from any forwarding/switching use. If ordered control is in use, the LSR sends a label withdraw message to each LDP peer to which it had previously sent a label mapping for the FEC. If the LSR is using Downstream on Demand label advertisement with indepen- dent control, it then acts as if it had just recognized the FEC. 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? Andersson, et al. [Page 94] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 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 interation 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 pre- viously sent to Peer). LWd.12 End iteration from LWd.8. LWd.13 DONE Notes: 1. If Label is not in forwarding/switching use, LWd.1 has no effect. 2. 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. 3. 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.5. Recognize New FEC Summary: The response by an LSR to learning a new FEC may involve one or more of the following actions: - Transmission of label mappings for the FEC to one or more LDP peers; Andersson, et al. [Page 95] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 - Transmission of a label request for the FEC to the FEC next hop; - Any of the actions that can occur 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 map- ping 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. Andersson, et al. [Page 96] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 2. Is LSR egress for the FEC? OR Has LSR previously received and retained a label map- ping for FEC from Next Hop? If not, continue iteration for next Peer. 3. xecute 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. Andersson, et al. [Page 97] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Notes: 1. An example of an attribute that might be part of InitAttributes is CoS. The means by which FEC InitAttributes, if any, are specified is beyond the scope of LDP. Note that the InitAttri- butes will not include a known Hop Count or a Path Vector. 2. 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 andCOS TLVsdiscard- ing the label request; see LRq.3 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.6. Detect change in FEC next hop Summary: The response by an LSR to a change in the next hop for a FEC may involve one or more of the following actions: - Removal of the label from the FEC's old next hop from forwarding/switching use; - Transmission of label mappping messages for the FEC to one or more LDP peers; - Transmission of a label request to the FEC's new next hop; - Any of the actions that canbe found in Section "Commonly Used TLVs". ERLSPID TLVoccur when the LSR receives a label mapping from the FEC's new next hop. Context: - LSR. Theglobally unique value that identifiesLSR handling theexplicit route.event. - FEC. TheencodingFEC whose next hop changed. - New Next Hop. The current next hop for theERLSPID 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERLSPID (0x0801) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Explicit Identifier | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Peg Explicit Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Explicit Identifier A 6-octet globally unique value that identifies the explicitFEC. Andersson, et al. [Page75]98] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998route LSP. It is generated by- Old Next Hop. The previous next hop for theLSR that createsFEC. - OldLabel. Label, if any, previously received from Old Next Hop. - CurAttributes. The attributes, if any, currently associated with theExpli- citFEC. - SAttributes. Attributes to be included in Label Label Requestmessage. The first four octetsmessage, if any, sent to New Next Hop. Algorithm: NH.1 Has LSR previously received and retained a label mapping for FEC from Old Next Hop? If not, goto NH.6. NH.2 Remove label from forwarding/switching use. (See Note 1.) NH.3 Is LSR using Liberal label retention? If so, goto NH.6. NH.4 Execute procedure Send_Message (Old Next Hop, Label Release, OldLlabel). NH.5 Delete label mapping for FEC previously received from Old Next Hop. NH.6 Has LSR previously received and retained a label mapping for FEC from New Next Hop? If not, goto NH.8. NH.7 Generate Event: Received Label Mapping from New Next Hop. Goto NH.11. (See Note 2.) NH.8 Is LSR using Downstream on Demand advertisement? OR Is Next Hop using Downstream on Demand advertisement? OR Is LSR using Conservative label retention? (See Note 3.) If so, goto NH.9. If not, goto NH.11. NH.9 Execute procedure Prepare_Label_Request_Attributes (Next Hop, FEC, CurAttributes, SAttributes) NH.10 Execute procedure Send_Label_Request (New Next Hop, FEC, SAt- tributes). (See Note 4.) NH.11 DONE. Andersson, et al. [Page 99] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Notes: 1. If Label is not in forwarding/switching use, NH.2 has no effect. 2. If the LSRIP Address. The last two octets containhas a`Local identifier' value. It is incumbent on an LSR that originates an Explicit Request message to choose an unused valuelabel for theLocal Iden- tifier. Peg Explicit Identifier A 6-octet globally unique value that identifies a loose segment of an explicit route LSP. It is generated byFEC from theupstream peg LSR that createsNew Next Hop, it should behave as if it had just received theloose segment. The first four octets islabel from theLSR IP Address.New Next Hop. 3. Thelast two octets contain a 'Local iden- tifier' value. It is incumbentpurpose of the check ona peg LSR that creates a loose segmentlabel retention mode is tochoose an unused value for the Local Identif- ier every timeavoid a race with steps LMp.10-LMp.11 of thesegment is reestablished. Whenprocedure for handling asegment is strictly routed this field is set to zero byLabel Mapping message where thesender and ignored byLSR operating in Conservative Label retention mode may have released a label mapping received from thereceiver. Explicit Route TLV The sequence of ERNew Next Hop(ERNH) TLVs and a pointer tobefore it detected theone that should be processed byFEC next hop had changed. 4. Regardless of theLSR that receives this ER TLV. The encoding forLabel Request procedure in use by theExplicit Route 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Explicit Route TLV (0x0800) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next ERNH TLV Pointer | Reserved |P|Preempt| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERNH TLV (Variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next ERNH TLV Pointer This 16 bit unsigned integer points toLSR, it must send a label request if theoffsetconditions inoctets of the next ERNH TLV to be processed. The first octet afterNH.8 hold. Therefore it executes thetwo reserved octets that follow this pointer is defined to haveSend_Label_Request procedure directly rather than perform LSR Label Request procedure. A.1.7. Receive Notification / No Label Resources Summary: When anoffset value of zero. For exampleLSR receives a No Label Resources notification from anERNH TLV Pointer value of zero would pointLDP peer, it stops sending label request messages to thefirst ERNH TLV inpeer until it receives a Label Resources Available Notification from thesequence of ERNH Objects. P bit when set indicatespeer. Context: - LSR. The LSR handling the event. - FEC. The FEC for which a label was requested. - MsgSource. The LDP peer that sent theloosely routed segments must remain pinned-down. ERLSP must be rerouted only when adjacencyNotification message. Algorithm: NoRes.1 Delete record of outstanding label request for FEC sent to MsgSource. NoRes.2 Record label mapping for FEC from MsgSource islost along the segment. When not set indicates loose segmentneeded but that no label resources are available. NoRes.3 Set status record indicating it is notpinned down and must be changedOK tomatch the underlying hop-by-hop path.send label requests to MsgSource. Andersson, et al. [Page76]100] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Preempt A 16 level preemption is provided to facilitate placement of ERLSP when resources aren't available. Each LSR maintains this value in the ERLSP control block. A higher preemption value can preempt LSPs with lower value. Reserved This field is reserved. It must be set to zero on transmission and must be ignored on receipt. ERNH TLV This TLV contains the four octet IP address ofNoRes.4 DONE. A.1.8. Receive Notification / No Route Summary: When an LSRthrough which the Explicitreceives a No RouteLSP is to pass andnotification from an(optional) reservation (RES) TLVLDP peer in response tobe processed by that LSR.a Label Request message, the Label No Route procedure in use dictates its response. Thestrict TLV indicates thatLSR either will take no further action, or it will defer theER LSP setup must be routed directly vialabel request by starting a timer and send another Label Request message to theLSR indicated inpeer when theERNH object; i.e. that thattimer later expires. Context: - LSR. The LSRmust behandling thenext hop inevent. - FEC. The FEC for which a label was requested. - Attributes. The attibutes associated with theExplicit Route LSP's path.label request. - MsgSource. Theloose TLV indicatesLDP peer that sent theLSP may be routed in any way; i.e. via other unspecified LSRs, so long as it (eventually) reaches theNotification message. Algorithm: NoNH.1 Delete record of outstanding label request for FEC sent to MsgSource. NoNH.2 Perform LSRspecified in the ERNH object. This TLV mayLabel No Route procedure. For Request No Retry 1. Goto NoNH.3. For Request Retry 1. Record deferred label request for FEC and Attributes to befollowed by the optional Reservation TLV. The ERNH encodings are: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ER Strict TLV (0x0802) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ER Loose TLV (0x0803) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Ipv4 Address The IP address of the nextsent to MsgSource. 2. Start timeout. Goto NoNH.3. NoNH.3 DONE. Andersson, et al. [Page 101] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 A.1.9. Receive Notification / Loop Detected Summary: When an LSR receives a Loop Detected notification from an LDP peer inthe Explicitresponse to a Label Request message, it behaves as if it had received a No RouteLSP. Bandwidth Reservation TLV Specifiesnotification. Context: See "Receive Notification / No Route". Algorithm: See "Receive Notification / No Route" A.1.10. 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 thebandwidth reservation required at eachpeer. Context: - LSR. The LSRhop.handling the event. - MsgSource. TheencodingLDP peer that sent the Notification message. - SAttributes. Attributes stored with postponed Label Request mes- sage. Algorithm: Res.1 Set status record indicating it is OK to send label requests to MsgSource. Res.2 Iterate through Res.6 for each record of a FEC label mapping needed from MsgSource for which no label resources are avail- able. Res.3 Is MsgSource theBandwidth Reservation is:next hop for FEC? If not, goto Res.5. Res.4 Execute procedure Send_Label_Request (MsgSource, FEC, SAttri- butes). If the procedure fails, terminate iteration. Andersson, et al. [Page77]102] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19980 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Bandwidth TLV (0x0804) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BW requirement | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ BW Requirement Unsigned 32 bit integer representingRes.5 Delete record that no resources are available for a label mapping for FEC needed from MsgSource. Res.6 End iteration from Res.2 Res.7 DONE. A.1.11. Detect local label resources have become available Summary: After an LSR has sent a No Label Resources notification to an LDP peer, when label resources later become available it sends a Label Resources Available notification to each such peer. Context: - LSR. The LSR handling the event. - Attributes. Attributes stored with postponed Label Mapping mes- sage. Algorithm: ResA.1 Iterate through ResA.4 for each Peer to which LSR has previ- ously sent a No Label Resources notification. ResA.2 Execute procedure Send_Notification (Peer, Label Resources Available) ResA.3 Delete record that No Label Resources notification was previ- ously sent to Peer. ResA.4 End iteration from ResA.1 ResA.5 Iterate through ResA.8 for each record of a label mapping needed for FEC for Peer but no-label-resources. (See Note 1.) ResA.6 Execute procedure Send_Label (Peer, FEC, Attributes). If thebandwidth, in unitsprocedure fails, terminate iteration. ResA.7 Clear record ofkilo bps, that must be reservedFEC label mapping needed for peer but no- label-resources. ResA.8 End iteration from ResA.5 Andersson, et al. [Page 103] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 ResA.9 DONE. Notes: 1. Iteration ResA.5 through ResA.8 handles theLSP at every LSR identi- fied insituation where theERNH Object. The bandwidthLSR isguaranteed withinusing Downstream Unsolicited label distribution and was previously unable to allocate acoarser time period allowinglabel forsimpler implementations. The specified bandwidth is guaranteed within several milliseconds orafew seconds time period. NodesFEC. A.1.12. LSR decides to no longer label switch a FEC Summary: An LSR mayalso use this asunilaterally decide to no longer label switch aminimal bandwidth guarantee within the same time period. 3.4.12.1. Explicit Route Request Procedures See Sections "Explicitly Routing LSPs" and "ERLSP State Machine"FEC forgeneral proceduresan LDP peer. An LSR that does so must send a label withdraw message forhandlingtheExplicit Route Request Message. 3.4.13. Explicit Route Response Message 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ER Response (0x0501) | Message Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERLSPID TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Label TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Status TLV | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+FEC to the peer. Context: - Peer. Theencodingspeer. - FEC. The FEC. - PrevAdvLabel. The label for FEC previously advertised to Peer. Algorithm: NoLS.1 Execute procedure Send_Label_Withdraw (Peer, FEC, PrevAdvLa- bel). (See Note 1.) NoLS.2 DONE. Notes: 1. The LSR may remove theLabel, and Status TLVs can be foundlabel 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. A.1.13. Timeout of deferred label request Summary: Label requests are deferred inSection 3.3.3 ("Commonly Used TLVs"). Message Id Four octet integer usedresponse toidentify this message.No Route and Loop Detected notifications. When a deferred FEC label request for a peer times out, the LSR sends the label request. Andersson, et al. [Page78]104] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998ERLSPID TLVContext: - LSR. Theglobally unique value used for ERLSPID inLSR handling the event. - FEC. The FEC associated with the timeout event. - Peer. The LDP peer associated with theExplicittimeout event. - Attributes. Attributes stored with deferred Label Requestmessagemes- sage. Algorithm: 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 specifies utility procedures used by the algorithms thatelicited this Response message.handle label distribution events. A.2.1. Send_Label Summary: TheencodingSend_Label procedure allocates a label forthe ERLSPID (shown abovea FEC for an LDP peer, if possible, andrepeated heresends a label mapping forconvenience) 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERLSPID (0x0801) | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Explicit Identifier | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Peg Explicit Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Explicit Identifier A 6-octet globally unique value that identifiestheexplicit route LSP. It is generated byFEC to theLSR that createspeer. If theExplicit Request message. The first four octetsLSR is unable to allocate theLSR IP Address. The last two octets containlabel and if it has a`Local identifier' value. Itpending label request from the peer, it sends the LDP peer a No Label Resources notification. Parameters: - Peer. The LDP peer to which the label mapping isincumbent on an LSR that originates an Explicit Request messagetochoose an unused valuebe sent. - FEC. The FEC forthe Local Identifier. Peg Explicit Identifier A 6-octet globally unique value that identifieswhich aloose segment of an explicit route LSP. Itlabel mapping isgenerated byto be sent. Andersson, et al. [Page 105] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 - Attributes. The attributes to be included with theupstream peglabel mapping. Additional Context: - LSR. The LSRthat createsexecuting theloose segment.procedure. - Label. Thefirst four octets islabel allocated and sent to Peer. Algorithm: 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/switchng 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 LSRIP Address. The last two octets containhave a'Local identifier' value. It is incumbent onrecord of apegFEC 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 LSRthat createshave aloose segment to choose an unused valuelabel request forthe Local Identifier every time the segment is reestablished. When a segment is strictly routed this field is setFEC 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 tozero by the sender and ignored by the receiver. 3.4.13.1. Explicit Route Response Procedures See Sections "Explicitly Routing LSPs" and "ERLSP State Machine"Peer. Goto SL.14. SL.13 Record label mapping needed forgeneral proceduresFEC and Attributes forhandling the Explicit Response Request Mes- sage.Peer, but no-label-resources. (See Note 1.) SL.14 Return failure. Andersson, et al. [Page79]106] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.5. Messages and TLVs for Extensibility The procedures to provide for LDP extensiblity include rules for han- dling unknown messages and TLVs. The rules described inNotes: 1. SL.13 handles thesections that follow make usecase of Downstream Unsolicited label distri- bution when thehigh order bits in the message or TLV type field. In these rules, "b" represents an arbitray bit value inLSR is unable to allocate a label for a FEC to send to amessage or TLV type. 3.5.1. ProceduresPeer. A.2.2. Send_Label_Request Summary: An LSR uses the Send_Label_Request procedure to send a request forUnknown Messages and TLVs 3.5.1.1. Unknown Message Types Whenamessage with an unknown Message Type is received, there are two possibilities as described below. The choicelabel forhowa FEC tohandleanunknown Message Type is determined by the high-order bit of the Message Type field.LDP peer if currently permitted to do so. Parameters: -Message Type = 0bbbbbbbbbbbbbbbPeer. Theentire message must be rejected and the event signalled by a Notification Message withLDP peer to which theUnknown Message Type Status Code.label request is to be sent. -Message Type = 1bbbbbbbbbbbbbbbFEC. Theentire message must be dropped silently (i.e., it shouldFEC for which a label request is to beignored and no error shouldsent. - Attributes. Attributes to bereturned). In either case described above, anincluded in the label request. E.g., Hop Count, Path Vector, CoS. Additional Context: - LSR. The LSRthat does not understandexecuting themessage type must not attemptprocedure. Algorithm: SLRq.1 Has a label request for FEC previously been sent toprocess the message. 3.5.1.2. Unknown TLV in Known Message Type When an unknown TLVPeer and isfound in a known Message Type, there are three possibilitiesit marked asdescribed below. The choiceoutstanding? 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 label request forhowFEC has been sent tohandle an unknown TLV is determined by the high-order two bits of the TLV Type field. - TLV Type = 0bbbbbbbbbbbbbbb The entire message must be rejectedPeer andthe event signalled by a Notification Message with the Unknown TLV Status Code. - TLV Type = 10bbbbbbbbbbbbbb The TLV must be dropped silently (i.e.,mark itshould be ignoredas outstanding. SLRq.5 Return success. SLRq.6 Postpone the label request by recording label mapping for FEC and Attributes from Peer is needed but that noerror should be returned). If the semantics of the includinglabel resources are available. Andersson, et al. [Page80]107] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998Message Type dictate that message be forwarded to other nodes,SLRq.7 Return failure. Notes: 1. If theTLVLSR is a non-merging LSR it must distinguish between attempts to send label requests for a FEC triggered by dif- ferent upstream LDP peers from duplicate requests. This pro- cedure will notbe forwarded with the message. - TLV Type = 11bbbbbbbbbbbbbb The TLV must be silently ignored (i.e., no error should be returned). Ifsend a duplicate label request. A.2.3. Send_Label_Withdraw Summary: An LSR uses thesemantics ofSend_Label_Withdraw procedure to withdraw a label for a FEC from an LDP peer. To do this theincluding Message Type dictate thatLSR sends a Label With- draw messagebe forwardedtoother nodes, the TLV must be for- warded unmodified withthemessage. 3.5.2.peer. Parameters: - Peer. The LDPVendor-Private Extensions Both Vendor-Private Messages and Vendor-Private Objects are definedpeer toconvey vendor-private information or LDP extensions between LDP nodes. These extensions may also be useful for experimentation in existing networks. 3.5.2.1. LDP Vendor-Private TLV The following three Vendor-Private TLV classes are definedwhich the label withdraw is to beused in any message:sent. -Vendor Private TLV Class 1. TLV type values: 0x3FXX (boolean 00111111bbbbbbbb)FEC. The FEC for which a label is being withdrawn. -Vendor Private TLV Class 2. TLV type values: 0xBFXX (boolean 10111111bbbbbbbb)Label. The label being withdrawn Additional Context: -Vendor Private TLV Class 3, TLV type values: 0xFFXX (boolean 11111111bbbbbbbb) These TLVs areLSR. The LSR executing the procedure. Algorithm: SWd.1 Execute procedure Send_Message (Peer, Label Withdraw, FEC, Label) SWd.2 Record label withdraw for FEC has been sent to Peer and mark it as outstanding. A.2.4. Send_Notification Summary: An LSR uses the Send_Notification procedure to send an LDP peer a notificaction message. Andersson, et al. [Page 108] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Parameters: - Peer. The LDP peer to which the label withdraw is to behandled accordingsent. - Status. Status code to be included in thehigh order bit(s) ofNotification message. Additional Context: None. Algorithm: SNt.1 Execute procedure Send_Message (Peer, Notification, Status) A.2.5. Send_Message Summary: An LSR uses theTLV type.Send_Message procedure to send an LDP peer an LDP message. Parameters: - Peer. Theunspecified part ofLDP peer to which theTLVmessage is to be sent. - Message Type. The type of message to be sent. - Additional message contents . . . . Additional Context: None. Algorithm: This procedure isassigned bythevendor and should be interpretedmeans bya receivingwhich an LSRonly if it understandssends an LDP message of theVendor ID encodedspecified type to the specified LDP peer. A.2.6. Check_Received_Attributes Summary: Check the attributes received in a Label Mapping or Label Request message. If theTLV Value field. The Value field ofattributes include aVendor Private TLVHop Count or Path Vector, per- form a loop detection check. If a loop isdefined as follows:detected, send a Loop Detected Notification message to MsgSource. Andersson, et al. [Page81]109] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19980 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data.... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ VendorParameters: - MsgSource. The LDP peer that sent the message. - RAttributes. The attributes in the message. Additional Context: - LSR Id. The unique LSR Id802 Vendor ID as assigned byof this LSR. - Hop Count. The Hop Count, if any, in theIEEE. Datareceived attributes. - Path Vector. Theremaining octets afterPath Vector, if any in the received attributes. Algorithm: 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 Execute procedure Send_Notification (MsgSource, Loop Detected) CRa.7 Return Loop Detected. CRa.8 DONE A.2.7. Prepare_Label_Request_Attributes Summary: This procedure is used whenever a Label Request is to be sent to a Peer to compute theVendor IDHop Count and Path Vector, if any, to include in theValue field are optional vendor-dependent data. 3.5.2.2. LDP Vendor-Private Messagesmessage. Andersson, et al. [Page 110] Internet Draft draft-ietf-mpls-ldp-02.txt November 1998 Parameters: - Peer. The LDPVendor-Private Messagepeer to which the message iscarried in LDP PDUstoconvey vendor-private information or LDP extensions between LSRs. The following two Vendor-Private Message classes are defined: - Vendor Private Message Class 1. Message type values: 0x7FXX (boolean 01111111bbbbbbbb)be sent. -Vendor Private Message Class 2. Message type values: 0xFFXX (boolean 11111111bbbbbbbb)FEC. Thefirst TLV inFEC for which avendor private message mustlabel request is to be sent. - RAttributes. The attributes this LSR associates with theVendor Private ID TLV, a Vendor Private Class 3 TLV, encoded as shown below: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0xFF | 0x00 | 0x04 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Vendor-Private messages areLSP for FEC. - SAttributes. The attributes to behandled according toincluded in thehigh order bitLabel Request message. Additional Context: - LSR Id. The unique LSR Id of this LSR. Algorithm: 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 themessage type number. The determination asresulting 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? Andersson, et al. [Page82]111] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 1998whetherIf 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 theVendor-Private messageresulting Path Vector into SAttributes. Goto PRqA.14. PRqA.13 Include Path Vector of length 1 containing LSR Id in SAttri- butes. PRqA.14 DONE. Notes: 1. The link with Peer may require that Hop Count be included in Label Request messages; for example, see [ATM]. 2. For hop count arithmetic, unknown + 1 = unknown. A.2.8. Prepare_Label_Mapping_Attributes Summary: This procedure isunderstoodused whenever a Label Mapping isbased onto be sent to a Peer to compute theVendor ID in first TLVHop Count and Path Vector, if any, to include in the message. Parameters: - Peer. The LDP peer to which the messagebody. 3.6. TLV Summaryis to be sent. - FEC. Thefollowing areFEC for which a label request is to be sent. - RAttributes. The attributes this LSR associates with theTLVs definedLSP for FEC. - SAttributes. The attributes to be included inthis version oftheprotocol. TLV Type Section Title FEC 0x0100 "FEC TLV" Address List 0x0101 "Address List TLV" COS 0x0102 "COS 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" Targeted Hello 0x0400 "Hello Message" Send Targeted Hello 0x0401 "Hello Message" Transport Address 0x0402 "Hello Message" Hello Hold Time 0x0403 "Hello Message" Common Session 0x0500 "Initialization Message" Parameters Label Allocation 0x0501 "Initialization Message" Discipline Loop Detection 0x0502 "Initialization Message" Merge 0x0503 "Initialization Message" ATM Null Encapsulation 0x0504 "Initialization Message" ATMLabelRange 0x0600 "Initialization Message" Frame RelayRequest message. - IsPropagating. The LSR is sending the LabelRange 0x0601 "Initialization Message" FEC-LabelMapping0x0700 "Label Mapping Message" FEC-Request 0x0701 "Label Request Message" FEC-Withdraw-Release 0x0702 "Label Withdraw Message" FEC-ER TLV 0x0703 "Explicit Request Message" Explicit Route 0x0800 "Explicit Request Message" ERLSPID 0x0801 "Explicit Request Message" ER Strict 0x0802 "Explicit Request Message" ER Loose 0x0803 "Explicit Request Message" Bandwidth 0x0804 "Explicit Request Message"message to propagate one received from the FEC next hop. Andersson, et al. [Page83]112] Internet Draftdraft-ietf-mpls-ldp-00.txt Augustdraft-ietf-mpls-ldp-02.txt November 19983.7. Status Code Summary- PrevHopCount. Thefollowing are the Status Codes defined inHop Count, if any, thisversion ofLSR associates with theprotocol. Status Code Type Section Title Success 0x0000 "Status TLV" Bad LDP Identifer 0x8001 "Events Signalled by ..." Bad Protocol Version 0x8002 "Events Signalled by ..." Bad PDU Length 0x8003 "Events Signalled by ..." Unknown Message Type 0x8004 "Events Signalled by ..." Bad Message Length 0x8005 "Events Signalled by ..." Unknown TLV 0x8006 "Events Signalled by ..." Bad TLV length 0x8007 "Events Signalled by ..." Malformed TLV Value 0x8008 "Events Signalled by ..." Hold Timer Expired 0x8009 "Events Signalled by ..." Shutdown 0x000A "Events Signalled by ..."LSP for the FEC. Additional Context: - LSR Id. The unique LSR Id of this LSR. Algorithm: PMpA.1 Is Hop Count required for this Peer (see Note 1.) ? OR Do RAttributes include a Hop Count? OR Is LoopDetected 0x000B "LoopDetectionVia Diffusion" 4. Security Security considerations will be addressed in a future revisionconfigured on LSR? If not, goto PMpA.19. PMpA.2 Is LSR egress for FEC? If not, goto PMpA.4. PMpA.3 Include Hop Count ofthis document. 5. Acknowledgments The ideas and text1 inthis documentSAttributes. Goto PMpA.19. PMpA.4 Do RAttributes havebeen collected fromanumber of sources. We would like to thank Rick Boivie, Ross Callon, Alex Conta, Eric Rosen, Bernard Suter, Yakov Rekhter, and Arun Viswanathan. 6. References [FRAMEWORK] Callon et al, "A Framework for Multiprotocol Label Switching" draft-ietf-mpls-framework-01.txt, July 1997 [ARCH] Rosen et al, "A Proposed Architecture for MPLS" draft-ietf- mpls-arch-02.txt, July 1998 [ENCAP] Farinacci et al, "MPLS Label Stack Encoding" draft-ietf- mpls-label-encaps-02.txt, July, 1998 [FR] Conta et al, "UseHop Count? If not, goto PMpA.6. PMpA.5 Increment RAttributes Hop Count and copy the resulting Hop Count to SAttributes. See Note 2. Goto PMpA.7. PMpA.6 Include Hop Count ofLabel Switchingunknown (0) in SAttributes. PMpA.7 Is Loop Detection configured onFrame Relay Networks"LSR? If not, goto PMpA.19. PMpA.8 Do RAttributes have a Path Vector? If so, goto PMpA.17. PMpA.9 Is LSR propagating a received Label Mapping? If not, goto PMpA.18. PMpA.10 Does LSR support merging? If not, goto PMpA.12. PMpA.11 Has LSR previously sent a Label Mapping for FEC to Peer? If not, goto PMpA.18. PMpA.12 Do RAttributes include a Hop Count? If not, goto PMpA.19. Res.13 Is Hop Count in Rattributes unknown(0)? If so, goto PMpA.18. Andersson, et al. [Page84]113] Internet Draftdraft-ietf-mpls-ldp-00.txt August 1998 draft-ietf-mpls-fr-01.txt, August,draft-ietf-mpls-ldp-02.txt November 1998[rfc1583] J. Moy, "OSPF Version 2", RFC 1583, Proteon Inc, March 1994 [rfc1771] Y. Rekhter, T. Li, "A Border Gateway Protocol 4 (BGP-4)", RFC 1771, IBM Corp, Cisco Systems, March 1995 [rfc1483] J. Heinanen, "Multiprotocol Encapsulation over ATM Adapta- tion Layer 5", RFC 1483, Telecom Finland, July 1993 7. Author Information Loa Andersson Bay Networks Inc 3 Federal Street Billerica, MA 01821 email: Loa_Andersson@baynetworks.com Paul Doolan Ennovate Networks 330 Codman Hill Rd Marlborough MA 01719 Phone: 978-263-2002 email: pdoolan@ennovatenetworks.com Nancy Feldman IBM Corp. 17 Skyline Drive Hawthorne NY 10532 Phone: 914-784-3254 email: nkf@us.ibm.com Andre Fredette Bay Networks Inc 3 Federal Street Billerica, MA 01821 Phone: 978-916-8524 email: fredette@baynetworks.com Bob Thomas Cisco Systems, Inc. 250 Apollo Dr. Chelmsford, MA 01824 Phone: 978-244-8078 email: rhthomas@cisco.comPMpA.14 Has LSR previously sent a Label Mapping for FEC to Peer? If not goto PMpA.19. PMpA.15 Is Hop Count in RAttributes different from PrevHopCount ? If not goto PMpA.19. PMpA.16 Is the Hop Count in RAttributes > PrevHopCount? OR Is PrevHopCount unknown(0) If not, goto PMpA.19. PMpA.17 Add LSR Id to beginning of Path Vector from RAttributes and copy the resulting Path Vector into SAttributes. Goto PMpA.19. PMpA.18 Include Path Vector of length 1 containing LSR Id in SAttri- butes. PMpA.19 DONE. Notes: 1. The link with Peer may require that Hop Count be included in Label Mapping messages; for example, see [ATM]. 2. For hop count arithmetic, unknown + 1 = unknown. Andersson, et al. [Page85]114] ----