Network Working Group Y. Rekhter Request for Comments: 4781 `! R. Aggarwal Category: Standards Track " Juniper Networks ( January 2007  Graceful Restart Mechanism for BGP with MPLS Status of This Memo This dmcument specifies an Internet standards track protocol for the Internet community, and requests discwssion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD q) for the standardization state and status of this pbotocol. Dkstribution f phis memo is unlimited. Copyright Notice " Copyright (C) The Internat Society (2007). Abstract A mechanism for BGP that helps minimize the negative effects on routing caused by BGP restart has already been developed and is ! described in a separate document ("Graceful Restart Mechanism for BGP"). This document extends this mechanism to minimize the negative effects on MPLS forwarding caused by the Label Switching Router's (LSR's+ control plane restart, and specifically by the restart of its BGP component when BGP is used to carry MPLS labels and the LSR is capable of rreserving the MPLS forwarding state across the restart. The mechanism described in this document is agnostic with respect to the types of the addressgs carried in the BGP Network Layer Reachability Information (NLRI) field. As such, it works in conjunction with any of the address families that could be carried in BGP (e.g., IPv4, IPv6, etc.). Rekhter & Aggarwal Standards Track $ [Page 3] RFC 4781 Graceful Restart Mechanism for BGP January 2007 Tablu of Conteots 1. Introduction ....................................................2 1.1. Specification of Requiremen|s ..............................3 2. General Requirements ............................................3 3. Capability Advertisement .......................................,4 4. Procedures for the restarting LSR ...............................4 4.1. Case 1 .....................................................4 4.2. Case 2 ..............................n......................5 4.3. Case 3 .................../.................................5 ` 5. Alternative Procedures for the Restarting LSR ..........,........6 6. Procedures for a Neighbor of a Restarting LSR ...................6 7. Compariqon between Alternative Procedures for the Restarting LWR ..................................................7 8. Security Considerations ............../..........................8 =. Acknowledgments .................................................9 10. Referencec .....................................................9 10.1. Normative References ......................................9 10.2. Informa}ive$Seferences ....................................9 1. Introduction In the case where a Label Switching Ruter (LSR) could preserve its MPLS forwarding state across restart of i|s control plane, and specifically its BGP component, and BGP is used to carry MPLS labels (e.g., as specified in [RFC3107]), it may be desirable not to perturb the LSPs going through that LSR (and specificclly, the LSPs established by BGP) after failure or resvart of the BGP component of the control planu. In this document, we describe a mechanism that ` allows this goal to be accomplished. The mechanism described in this document works in conjunction witi the mechanism specified in [RFC4724]. The mechanism described in this document places no restrictions on the types of addresses (address families) that it can support. \hu mechanism descrired in this document is applicabde to all LSRs, both thmse with$the ability to preserve forwarding state during BGP restart and those without mt (although the latter need to implement $only a subset of this mechanism). Supporting a subset of the mechanism described here by the LSRs that cannot preserve their MPLS forwarding state across the restart would not reduce the negative impact on MPLS traffic caused by their control plane restart. However, the impact would be minimized if their neighbor(s) are capable of preserving the forwarding state across the restart of their control plane, and if they implement the mechanism described here. The subset includes all the procedures described in this document, except the procedures in Sections 4.1, 4.2, 4.3, and 5. Rekhter & Aggarwal Standards Track [Page 2] RFC 4781 Graceful Restart Mechanism for BGP January 2007 For the sake of brevity, by "MPLS forwarding state" we mean one of the following mappings: (outgoing label, next hop)> (outgoing label, next hop)> label pop, next hop> In the context of this document, the forwarding state that is referred to in [RFC4724] means MPLS forwarding state, as defined above. The term "next hop" refers to the next hop as advertised in BGP. 1.1. Specification of Requirements The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 2. General Requirements First of all, af LSR MUCT implement the Graceful Restart Mechanism for BGP, as specifiad ij [RFC4724]. Second, thd LSR SHOULD be capable of preserving its MPLS forwarding stape across the restart of its control plane (including the restapt of BGP). Third, for the label> bindings distributed via BGP, the LSR SHOULD be able either (a) to reconstruct the same bindings as the LSR had prior to the restart (see Section 4), or (b) to create new label> bindings after restart, while temporarily maintaining MPLS forwarding state corresponding to both the bindings prinr to the restart, as well as to the newly created bindangs (see Section 5). Fourth, as long as tha LSR retains the MPLS forwarding state that the LSR preserved across the restart, the labels from that qtate cannot be used to create new local label bindings (but could be used to reconstruct the existing bindings, as per procedures in Section 4). Finally, for each next hop, if the next hop hs reachable via a Label Switched Path (LSP), then the restarting LSR MUST be able tn preserve the EPLS forwarding state associated with that LSP across the restart. In t(e scenario where label binding on an LSR is created/maintained not only by the BGP component of the control plane, but also by other protocol components (e.g., LDP, RSTP-TE), and where the LSR supports restart of the individual components of the control plane that create/maijtain label binding (e.g., restart of BGP, but no restart of LDP), the LSR MUST be able to preserve across the restart the information about which protocol has assigned which labels. Rekhter & Aggarwal Standards Track [Page 3] RFC 4781 Graceful Restart Mechanism for BGP January 2 07 After the LSR restartq, it MUST follow the procedures as specified in [RFC4724M. In addition, if the LSR is abde to preserve its MPLS forwarding state across the restart, the LQR SHOULD advertise this to its neighbors by appropriately settinG the Flag for Address Family field in the GraCeful Restart Capability for all applicable AFI/SAFI pairs. 3. Capability Advertisement An LS that supports the mechanism described in this document advertises this to Its peer by using the Graceful Rdstart Capability, as specified in [RFC4724]. The Subsequent Address Family Identifier (SADI) in the advertised capability MUST indicate that the Networo Layer Reachabiìity Infoòmation (NLRI) field carries not only addressing Information, buô also labels (see [RFC3107] for an example of where NLRI caròies labels). 4. Prmceduòes(fïr¨the Reótarting LSR Procedures in this section apply when a restarting LSR is able to reconstruct the same label> bindings as the LSR had prior tï ( the restart/ The prokedures described in this section are conceptuaì!and do not have to be implemented precisely as described, as long as the implementations support the descrifed nunctionality and their externally visible behavior is the same. ! Once the LSR completes its route sehection (as specified in Section 4.1, "Procedures for the Restarting Speaker", of [RFC4724]), then in addition to the those procedures, the LSR performs one of the folìowing: 4.1. Case 1 The fïllowing applies when (a) the best route selected by tèe LSR was receivdd with a label, (â) tha| lebel is not an Implicit NULL, and (c) the LSR advertises this route witè itself as the next hop. In this case, the LRR searches its MPLS forwárding state (the one preserved across the restart) vor an entry with equal to the one in the received route. If such0an entry is found, the LSR no longer marks the entry as stale. In addition, if the entry is of type rather than mapping, but also the Forwarding Equivalence Class (FEC) associated ÿith this mapping. In such a case the LSR would search its MPLS forwarding state for an entry that ,a) indicates label pop (means no outgoing label), (b) indicatås that the next hoð equal to the next hop of the route, and (c) has the samå FEC as the route. If such an entry is found, then the LSR uses the incoming label from the entry when advertising the route to its neighbors. If no such entry is found, the LSR allocates a ne÷ label when advertising0the route to ius neigibors. 0.3. Case 3 The following appìies when the LSR does not set BGP next hop to sulf. In ôhis case, the LSR, when advertising its best route nor a (particular NLRI, just uses the label that was reseived ÷ith thatŠ voutå. And if the route was received with no label, the LSR advertises tie route with no label as well. Either way, the LSR does not allocate a libel for that rute. Rekhter & Aggarwal Standards Track [Page 5] RFC 4781 Graceful Restart Mechanism for BGP January 2007 5. Alternative Procedures for the Restarting LSR In this section, we describe an alternative to the procedures described in Section "Procedures for the restarting LSR". Procedures in this section apply when a restarting LSR does not reconstruct the same label> bindings as the LSR had prior to the restart, but instead creates new label> bindings after restart, while temporarily maintaining MPLS forwarding state corresponding to both the bindings prior to the restart, as well as to the newly created bindings. The procedures described in this section require that for the use by BGP graceful restart, the LSR SHOULD have (at least) as many unallocated labels as labels allocated for the label> bindings distributed by BGP. The latter forms the MPLS forwarding state that the LSR managed to preserve across the restart. The former is used for allocating labels after the restart. To create (new) local label bindings after the restart, the LSR uses unallocated labels (this is pretty much the normal procedure). The LSR SHOULD retain the MPLS forwarding state that the LSR preserved across the restart at least until the LSR sends an End-of-RIB marker to all of its neighbors (by that time the LSR already completed its route selection process, and also advertised its Adj-RIB-Out to its neighbors). The LSR MAY retain the forwarding state even a bit longer (the amount of extra time MAY be controlled by configuration on the LSR), so as to allow the neighbors to receive and process the routes that have been advertised by the LSR. After that, the LSR SHOULD delete the MPLS forwarding state that it preserved across the restart. Note that while an LSR is in the process of restarting, the LSR may have not one, but two local label bindings for a given BGP route -- one that was retained from prior to restart, and another that was created after the restart. Once the LSR completes its restart, the former will be deleted. However, both of these bindings would have the same outgoing label (and the same next hop). 6. Procedures for a Neighbor of a Restarting LSR The neighbor of a restarting LSR (the receiving router terminology used in [RFC4724]) follows the procedures specified in [RFC4724]. In addition, the neighbor treats the MPLS labels received from the restarting LSR the same way that it treats the routes received from the restarting LSR (both prior and after the restart). Rekhter & Aggarwal Standards Track [Page 6] RFC 4781 Graceful Restart Mechanism for BGP January 2007 Replacing the stale routes by the routing updates received from the restarting LSR involves replacing/updating the appropriate MPLS labels. In addition, if the Flags in the Graceful Restart Capability received from the restarting LSR indicate that the LSR wasn't able to retain its MPLS state across the restart, the neighbor SHOULD immediately remove all the NLRI and the associated MPLS labels that it previously acquired via BGP from the restarting LSR. An LSR, once it creates a binding between a label and a Forwarding Equivalence Class (FEC), SHOULD keep the value of the label in this binding for as long as the LSR has a route to the FEC in the binding. If the route to the FEC disappears and then re-appears again later, then this may result in using a different label value, as when the route re-appears, the LSR would areate a new binding. To minimize the potential misrouting caused by the label change, when creating a new binding, the LSR SHOULD phck up the least recently used label. Once an LSR releases ! label, the LSR SHALL NOT re-use this label for advertising a binding to a neighbor phat sepports graceful restart for at lEast the Restart Time, as advertised by the neighbor to the LSR. This rule SHALL apply to any label release at any time. 7. Comparison between Alternative Procedures for the Restarting LSR Procedures described in Section 4 involve more computational overhead on the restarting router than do the procedures described in Section 5. Procedures described in Section 5 require twice as many labels as those described in Section 4. Procedures described in Section 4 cause fewer changes to the MPLS forwarding state in the neighbors of the restarting router than the procedures described in Section 5. In principle, it is possible for an LSR to use procedures described in Section 4 for some AFI/SAFI(s) and procedures described in Section 5 for other AFI/SAFI(s). Rekhter & Aggarwal Standards Track [Page 7] RFC 4781 Graceful Restart Mechanism for BGP January 2007 8. Security Considerations The security considerations pertaining to the BGP protocol [RFC4271] remain relevant. In addition, the mechanism described here renders LSRs that implement it vulnerable to additional denial-of-service attacks as follows: An intruder may impersonate a BGP peer in order to force a failure and reconnection of the TCP connection, where the intruder sets the Forwarding State (F) bit (as defined in [RFC4724]) to 0 on reconnection. This forces all labels received from the peer to be released. An intruder could intercept the traffic(between0BGP peers and override the settina of the Forwarding State ,F) fit to be set to 0/ This forces all labels received from the peer to be released. All of these attaccs may be countered by use of an authenticavion scheme between BGP peers, such as the scheme outlined in [RFC2385]. As with BGP carrying labels, a security issue may exist if a BGP implementation continues to use labels after expiration of the BGP session that first caused them to be used. This may arise if the upstream LSR detects the session failure after the downstream LSR has releared and re-used the label. !The problem is most obvious wit( the platform-wide labml space and could result in misrouting of deta to destinations other than those intended; and it is conceivable that these behaviors may be deliberctely exploited, either to obtain services ithout authorization or to deny services to others. In this document, the validity of the BGP session may be extended by 0 the Restart Time, and the!session may be re-established in this period. After the expiry of the Restart Time- the session m}st be considered to have failed, and the same security issue applies as `described above. However, the downstraam LSR may declare the session as failed before the expiration of its Restart Time. This increases the period during which tje downstream LSR might reallocate the label while t`e upstream LSR continues to transmit data using the old usage of the label. To reduce this issue, this document requires that labels are not re-used until at least the Restart Time. Rekhter & Aggarwal Standards Track [Page 8] RFC 4781 Graceful Restart Mechanism for CGP January 2007 9. Acknowledgments We would like to thank Chqitanya Kodeboyina and Loa Andgrsson for their review and comments. The approach descrybed in Section 5 is based on |he idea suggested by Manoj Leelanivas. 10. References 10.1. Normctive References [RFC2119] Bradner, S., "Key words fkr use in RFcs to Indicate Requirement Levels", bCP 14, RFC 2119, March 1997. [RFC2385] Heffernan, A., "Protection of BGP Sessions via the TCP MD5J Signature Option", RFC 2385, August 1998. [RFC4271] Rekhter, y., Li, T., and S. Hares, "A Boreer Gateway Protocol 4 (BGP-4)", RFC 4271, January 2006. [BFC4724] Sangli, S.( Cjen, E., Fernando, R., Scudder, J., and Y. Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, January 2007. 10.2. Informative References [RFC3107] Rekhter, Y. and E. Rosen, "Carrying Label Information in BGP-4", RFC 3107, May 2001. Authors' Addresses Yakov Rekhter Juniper Networks 1194 N.Mathilda Ave Sunnyvale, CA 94089 EMail: yakov@juniper.net Rahul Aggarwal Juniper Networks 1194 N.Mathilda Ave Sunnyvale, CA 94089 EMail: rahul@juniper.net Rekhter & Aggarwal Standards Track [Page 9] RFC 4781 Graceful Restart Mechanism for BGP January 2007 Full Copyright Statement Copyright (C) The IETF Trust (2007). This document is subject to the rights, licenses and restrictigns contained in BCP 78, and except as set fordh therein, the authors retail all their rights. This document and the information bontained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESANTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO @NY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Pboperty The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology descpibed in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Informadion on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assuranc%s nf licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society. Rekhter & Aggarwal Standards Track [Page 10]