idnits 2.17.1 draft-ietf-grow-bgp-gshut-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (October 11, 2017) is 2360 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 8203 (Obsoleted by RFC 9003) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Francois, Ed. 3 Internet-Draft Individual Contributor 4 Intended status: Informational B. Decraene, Ed. 5 Expires: April 14, 2018 Orange 6 C. Pelsser 7 Strasbourg University 8 K. Patel 9 Arrcus, Inc. 10 C. Filsfils 11 Cisco Systems 12 October 11, 2017 14 Graceful BGP session shutdown 15 draft-ietf-grow-bgp-gshut-12 17 Abstract 19 This draft standardizes a new well-known BGP community 20 GRACEFUL_SHUTDOWN to signal the graceful shutdown of paths. This 21 draft also describes operational procedures which use this community 22 to reduce the amount of traffic lost when BGP peering sessions are 23 about to be shut down deliberately, e.g. for planned maintenance. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on April 14, 2018. 42 Copyright Notice 44 Copyright (c) 2017 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (https://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 60 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Packet loss upon manual EBGP session shutdown . . . . . . . . 3 62 4. EBGP graceful shutdown procedure . . . . . . . . . . . . . . 4 63 4.1. Pre-configuration . . . . . . . . . . . . . . . . . . . . 4 64 4.2. Operations at maintenance time . . . . . . . . . . . . . 4 65 4.3. BGP implementation support for graceful shutdown . . . . 5 66 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 67 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 68 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 5 69 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 70 8.1. Normative References . . . . . . . . . . . . . . . . . . 5 71 8.2. Informative References . . . . . . . . . . . . . . . . . 6 72 Appendix A. Alternative techniques with limited applicability . 6 73 A.1. Multi Exit Discriminator tweaking . . . . . . . . . . . . 6 74 A.2. IGP distance Poisoning . . . . . . . . . . . . . . . . . 7 75 Appendix B. Configuration Examples . . . . . . . . . . . . . . . 7 76 B.1. Cisco IOS XR . . . . . . . . . . . . . . . . . . . . . . 7 77 B.2. BIRD . . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 B.3. OpenBGPD . . . . . . . . . . . . . . . . . . . . . . . . 8 79 Appendix C. Beyond EBGP graceful shutdown . . . . . . . . . . . 8 80 C.1. IBGP graceful shutdown . . . . . . . . . . . . . . . . . 8 81 C.2. EBGP session establishment . . . . . . . . . . . . . . . 8 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 84 1. Introduction 86 Routing changes in BGP can be caused by planned maintenance 87 operations. This document defines a well-known community [RFC1997], 88 called GRACEFUL_SHUTDOWN, for the purpose of reducing the management 89 overhead of gracefully shutting down BGP sessions. The well-known 90 community allows implementers to provide an automated graceful 91 shutdown mechanism that does not require any router reconfiguration 92 at maintenance time. 94 This document discusses operational procedures to be applied in order 95 to reduce or eliminate loss of packets during a maintenance 96 operation. Loss comes from transient lack of reachability during BGP 97 convergence which follows the shutdown of an EBGP peering session 98 between two Autonomous System Border Routers (ASBR). 100 This document presents procedures for the cases where the forwarding 101 plane is impacted by the maintenance, hence when the use of Graceful 102 Restart does not apply. 104 The procedures described in this document can be applied to reduce or 105 avoid packet loss for outbound and inbound traffic flows initially 106 forwarded along the peering link to be shut down. These procedures 107 trigger, in both Autonomous Sytems (AS), rerouting to alternate paths 108 if they exist within the AS, while allowing the use of the old path 109 until alternate ones are learned. This ensures that routers always 110 have a valid route available during the convergence process. 112 The goal of the document is to meet the requirements described in 113 [RFC6198] at best, without changing the BGP protocol. 115 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 116 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 117 document are to be interpreted as described in RFC 8174 [RFC8174]. 119 2. Terminology 121 graceful shutdown initiator: a router on which the session shutdown 122 is performed for the maintenance. 124 graceful shutdown receiver: a router that has a BGP session, to be 125 shutdown, with the graceful shutdown initiator. 127 3. Packet loss upon manual EBGP session shutdown 129 Packets can be lost during the BGP convergence following a manual 130 shutdown of an EBGP session for two reasons. 132 First, some routers can have no path toward an affected prefix, and 133 drop traffic destined to this prefix. This is because alternate 134 paths can be hidden by nodes of an AS. This happens when [RFC7911] 135 is not used and the paths are not selected as best by the ASBR that 136 receive them on an EBGP session, or by Route Reflectors that do not 137 propagate them further in the IBGP topology because they do not 138 select them as best. 140 Second, the FIB can be inconsistent between routers within the AS, 141 and packets toward affected prefixes can loop and be dropped unless 142 encapsulation is used within the AS. 144 This document only addresses the first reason. 146 4. EBGP graceful shutdown procedure 148 This section describes configurations and actions to be performed for 149 the graceful shutdown of EBGP peering links. 151 The goal of this procedure is to retain the paths to be shutdown 152 between the peers, but with a lower LOCAL_PREF value, allowing the 153 paths to remain in use while alternate paths are selected and 154 propagated, rather than simply withdrawing the paths. The LOCAL_PREF 155 value SHOULD be lower than any of the alternative paths. The 156 RECOMMENDED value is 0. 158 4.1. Pre-configuration 160 On each ASBR supporting the graceful shutdown receiver procedure, an 161 inbound BGP route policy is applied on all EBGP sessions of the ASBR, 162 that: 164 o matches the GRACEFUL_SHUTDOWN community. 166 o sets the LOCAL_PREF attribute of the paths tagged with the 167 GRACEFUL_SHUTDOWN community to a low value. 169 4.2. Operations at maintenance time 171 On the graceful shutdown initiator, at maintenance time, the 172 operator: 174 o applies an outbound BGP route policy on the EBGP session to be 175 shutdown. This policy tags the paths propagated over the session 176 with the GRACEFUL_SHUTDOWN community. This will trigger the BGP 177 implementation to re-advertise all active routes previously 178 advertised, and tag them with the GRACEFUL_SHUTDOWN community. 180 o applies an inbound BGP route policy on the EBGP session to be 181 shutdown. This policy tags the paths received over the session 182 with the GRACEFUL_SHUTDOWN community and sets LOCAL_PREF to a low 183 value. 185 o wait for route readvertisement over the EBGP session, and BGP 186 routing convergence on both ASBRs. 188 o shutdown the EBGP session, optionally using [RFC8203] to 189 communicate the reason of the shutdown. 191 In the case of a shutdown of the whole router, in addition to the 192 graceful shutdown of all EBGP sessions, there is a need to gracefully 193 shutdown the routes originated by this router (e.g, BGP aggregates 194 redistributed from other protocols, including static routes). This 195 can be performed by tagging these routes with the GRACEFUL_SHUTDOWN 196 community and setting LOCAL_PREF to a low value. 198 4.3. BGP implementation support for graceful shutdown 200 BGP Implementers SHOULD provide configuration knobs that utilize the 201 GRACEFUL_SHUTDOWN community to drain BGP neighbors in preparation of 202 impending neighbor shutdown. Implementation details are outside the 203 scope of this document. 205 5. IANA Considerations 207 The IANA has assigned the community value 0xFFFF0000 to the planned- 208 shut community in the "BGP Well-known Communities" registry. IANA is 209 requested to change the name planned-shut to GRACEFUL_SHUTDOWN and 210 set this document as the reference. 212 6. Security Considerations 214 By providing the graceful shutdown service to a neighboring AS, an 215 ISP provides means to this neighbor and possibly its downstream ASes 216 to lower the LOCAL_PREF value assigned to the paths received from 217 this neighbor. 219 The neighbor could abuse the technique and do inbound traffic 220 engineering by declaring some prefixes as undergoing a maintenance so 221 as to switch traffic to another peering link. 223 If this behavior is not tolerated by the ISP, it SHOULD monitor the 224 use of the graceful shutdown community. 226 7. Acknowledgments 228 The authors wish to thank Olivier Bonaventure, Pradosh Mohapatra, Job 229 Snijders, John Heasley, and Christopher Morrow for their useful 230 comments. 232 8. References 234 8.1. Normative References 236 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 237 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 238 . 240 [RFC6198] Decraene, B., Francois, P., Pelsser, C., Ahmad, Z., 241 Elizondo Armengol, A., and T. Takeda, "Requirements for 242 the Graceful Shutdown of BGP Sessions", RFC 6198, 243 DOI 10.17487/RFC6198, April 2011, 244 . 246 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 247 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 248 May 2017, . 250 8.2. Informative References 252 [I-D.ietf-idr-best-external] 253 Marques, P., Fernando, R., Chen, E., Mohapatra, P., and H. 254 Gredler, "Advertisement of the best external route in 255 BGP", draft-ietf-idr-best-external-05 (work in progress), 256 January 2012. 258 [RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder, 259 "Advertisement of Multiple Paths in BGP", RFC 7911, 260 DOI 10.17487/RFC7911, July 2016, 261 . 263 [RFC8203] Snijders, J., Heitz, J., and J. Scudder, "BGP 264 Administrative Shutdown Communication", RFC 8203, 265 DOI 10.17487/RFC8203, July 2017, 266 . 268 Appendix A. Alternative techniques with limited applicability 270 A few alternative techniques have been considered to provide graceful 271 shutdown capabilities but have been rejected due to their limited 272 applicability. This section describes them for possible reference. 274 A.1. Multi Exit Discriminator tweaking 276 The MED attribute of the paths to be avoided can be increased so as 277 to force the routers in the neighboring AS to select other paths. 279 The solution only works if the alternate paths are as good as the 280 initial ones with respect to the LOCAL_PREF value and the AS Path 281 Length value. In the other cases, increasing the MED value will not 282 have an impact on the decision process of the routers in the 283 neighboring AS. 285 A.2. IGP distance Poisoning 287 The distance to the BGP NEXT_HOP corresponding to the maintained 288 session can be increased in the IGP so that the old paths will be 289 less preferred during the application of the IGP distance tie-break 290 rule. However, this solution only works for the paths whose 291 alternates are as good as the old paths with respect to their 292 LOCAL_PREF value, their AS Path length, and their MED value. 294 Also, this poisoning cannot be applied when BGP NEXT_HOP self is used 295 as there is no BGP NEXT_HOP specific to the maintained session to 296 poison in the IGP. 298 Appendix B. Configuration Examples 300 This appendix is non-normative. 302 Example routing policy configurations to honor the GRACEFUL_SHUTDOWN 303 well-known BGP community. 305 B.1. Cisco IOS XR 307 community-set comm-graceful-shutdown 308 65535:0 309 end-set 310 ! 311 route-policy AS64497-ebgp-inbound 312 ! normally this policy would contain much more 313 if community matches-any comm-graceful-shutdown then 314 set local-preference 0 315 endif 316 end-policy 317 ! 318 router bgp 64496 319 neighbor 2001:db8:1:2::1 320 remote-as 64497 321 address-family ipv6 unicast 322 send-community-ebgp 323 route-policy AS64497-ebgp-inbound in 325 ! 326 ! 327 ! 329 B.2. BIRD 331 function honor_graceful_shutdown() { 332 if (65535, 0) ~ bgp_community then { 333 bgp_local_pref = 0; 334 } 335 } 336 filter AS64497_ebgp_inbound 337 { 338 # normally this policy would contain much more 339 honor_graceful_shutdown(); 340 } 341 protocol bgp peer_64497_1 { 342 neighbor 2001:db8:1:2::1 as 64497; 343 local as 64496; 344 import keep filtered; 345 import filter AS64497_ebgp_inbound; 346 } 348 B.3. OpenBGPD 350 AS 64496 351 router-id 192.0.2.1 352 neighbor 2001:db8:1:2::1 { 353 remote-as 64497 354 } 355 # normally this policy would contain much more 356 match from any community GRACEFUL_SHUTDOWN set { localpref 0 } 358 Appendix C. Beyond EBGP graceful shutdown 360 C.1. IBGP graceful shutdown 362 For the shutdown of an IBGP session, provided the IBGP topology is 363 viable after the maintenance of the session, i.e, if all BGP speakers 364 of the AS have an IBGP signaling path for all prefixes advertised on 365 this graceful shutdown IBGP session, then the shutdown of an IBGP 366 session does not lead to transient unreachability. As a consequence, 367 no specific graceful shutdown action is required. 369 C.2. EBGP session establishment 371 We identify two potential causes for transient packet losses upon the 372 establishment of an EBGP session. The first one is local to the 373 startup initiator, the second one is due to the BGP convergence 374 following the injection of new best paths within the IBGP topology. 376 C.2.1. Unreachability local to the ASBR 378 An ASBR that selects as best a path received over a newly established 379 EBGP session may transiently drop traffic. This can typically happen 380 when the NEXT_HOP attribute differs from the IP address of the EBGP 381 peer, and the receiving ASBR has not yet resolved the MAC address 382 associated with the IP address of that "third party" NEXT_HOP. 384 A BGP speaker implementation MAY avoid such losses by ensuring that 385 "third party" NEXT_HOPs are resolved before installing paths using 386 these in the RIB. 388 Alternatively, the operator (script) MAY ping third party NEXT_HOPs 389 that are expected to be used before establishing the session. By 390 proceeding like this, the MAC addresses associated with these third 391 party NEXT_HOPs are resolved by the startup initiator. 393 C.2.2. IBGP convergence 395 During the establishment of an EBGP session, in some corner cases a 396 router may have no path toward an affected prefix, leading to loss of 397 connectivity. 399 A typical example for such transient unreachability for a given 400 prefix is the following: 402 Let's consider three Route Reflectors (RR): RR1, RR2, RR3. There is 403 a full mesh of IBGP sessions between them. 405 1. RR1 is initially advertising the current best path to the 406 members of its IBGP RR full-mesh. It propagated that path within 407 its RR full-mesh. RR2 knows only that path toward the prefix. 409 2. RR3 receives a new best path originated by the startup 410 initiator, being one of its RR clients. RR3 selects it as best, 411 and propagates an UPDATE within its RR full-mesh, i.e., to RR1 and 412 RR2. 414 3. RR1 receives that path, reruns its decision process, and picks 415 this new path as best. As a result, RR1 withdraws its previously 416 announced best-path on the IBGP sessions of its RR full-mesh. 418 4. If, for any reason, RR3 processes the withdraw generated in 419 step 3, before processing the update generated in step 2, RR3 420 transiently suffers from unreachability for the affected prefix. 422 The use of [RFC7911] or [I-D.ietf-idr-best-external] among the RR of 423 the IBGP full-mesh can solve these corner cases by ensuring that 424 within an AS, the advertisement of a new route is not translated into 425 the withdraw of a former route. 427 Indeed, "best-external" ensures that an ASBR does not withdraw a 428 previously advertised (EBGP) path when it receives an additional, 429 preferred path over an IBGP session. Also, "best-intra-cluster" 430 ensures that a RR does not withdraw a previously advertised (IBGP) 431 path to its non clients (e.g. other RRs in a mesh of RR) when it 432 receives a new, preferred path over an IBGP session. 434 Authors' Addresses 436 Pierre Francois (editor) 437 Individual Contributor 439 Email: pfrpfr@gmail.com 441 Bruno Decraene (editor) 442 Orange 444 Email: bruno.decraene@orange.com 446 Cristel Pelsser 447 Strasbourg University 449 Email: pelsser@unistra.fr 451 Keyur Patel 452 Arrcus, Inc. 454 Email: keyur@arrcus.com 456 Clarence Filsfils 457 Cisco Systems 459 Email: cfilsfil@cisco.com