idnits 2.17.1 draft-ietf-grow-bgp-gshut-08.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 date (June 25, 2017) is 2469 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Pierre Francois 3 Internet-Draft Individual Contributor 4 Intended status: Informational B. Decraene 5 Expires: December 27, 2017 Orange 6 C. Pelsser 7 Strasbourg University 8 K. Patel 9 Arrcus, Inc. 10 C. Filsfils 11 Cisco Systems 12 June 25, 2017 14 Graceful BGP session shutdown 15 draft-ietf-grow-bgp-gshut-08 17 Abstract 19 This draft describes operational procedures aimed at reducing the 20 amount of traffic lost during planned maintenances of routers or 21 links, involving the shutdown of BGP peering sessions. It defines a 22 well-known BGP community, called g-shut, to signal the graceful 23 shutdown of paths to other Autonomous Systems. 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 http://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 December 27, 2017. 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 (http://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. Practices to avoid packet losses . . . . . . . . . . . . . . 4 63 4.1. Improving availability of alternate paths . . . . . . . . 4 64 4.2. Make before break convergence: g-shut . . . . . . . . . . 4 65 5. Forwarding modes and transient forwarding loops during 66 convergence . . . . . . . . . . . . . . . . . . . . . . . . . 7 67 6. Link Up cases . . . . . . . . . . . . . . . . . . . . . . . . 7 68 6.1. Unreachability local to the ASBR . . . . . . . . . . . . 7 69 6.2. iBGP convergence . . . . . . . . . . . . . . . . . . . . 7 70 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 71 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 73 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 10.1. Normative References . . . . . . . . . . . . . . . . . . 9 75 10.2. Informative References . . . . . . . . . . . . . . . . . 9 76 Appendix A. Alternative techniques with limited applicability . 9 77 A.1. Multi Exit Discriminator tweaking . . . . . . . . . . . . 10 78 A.2. IGP distance Poisoning . . . . . . . . . . . . . . . . . 10 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 81 1. Introduction 83 Routing changes in BGP can be caused by planned, maintenance 84 operations. This document discusses operational procedures to be 85 applied in order to reduce or eliminate losses of packets during the 86 maintenance. These losses come from the transient lack of 87 reachability during the BGP convergence following the shutdown of an 88 EBGP peering session between two Autonomous System Border Routers 89 (ASBR). 91 This document presents procedures for the cases where the forwarding 92 plane is impacted by the maintenance, hence when the use of Graceful 93 Restart does not apply. 95 The procedures described in this document can be applied to reduce or 96 avoid packet loss for outbound and inbound traffic flows initially 97 forwarded along the peering link to be shut down. These procedures 98 trigger, in both involved ASes, rerouting to the alternate path, 99 while allowing routers to keep using old paths until alternate ones 100 are learned, installed in the RIB and in the FIB. This ensures that 101 routers always have a valid route available during the convergence 102 process. 104 The goal of the document is to meet the requirements described in 105 [RFC6198] at best, without changing the BGP protocol. 107 This document defines a well-known community [RFC1997], called 108 g-shut, for the purpose of reducing the management overhead of 109 gracefully shutting down BGP sessions. The well-known community 110 allows implementers to provide an automated graceful shutdown 111 mechanism that does not require any router reconfiguration at 112 maintenance time. 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 116 document are to be interpreted as described in RFC 2119 [RFC2119]. 118 2. Terminology 120 g-shut initiator: a router on which the session shutdown is performed 121 for the maintenance. 123 g-shut neighbor: a router that has a BGP session, to be shutdown, 124 with the g-shut initiator. 126 Initiator AS: the Autonomous System of the g-shut initiator. 128 Neighbor AS: the Autonomous System of the g-shut neighbor. 130 Loss of Connectivity (LoC: the state when a router has no path 131 towards an affected prefix. 133 3. Packet loss upon manual EBGP session shutdown 135 Packets can be lost during a manual shutdown of an EBGP session for 136 two reasons. 138 First, routers involved in the convergence process can transiently 139 lack of paths towards an affected prefix, and drop traffic destined 140 to this prefix. This is because alternate paths can be hidden by 141 nodes of an AS. This happens when the paths are not selected as best 142 by the ASBR that receive them on an EBGP session, or by Route 143 Reflectors that do not propagate them further in the iBGP topology 144 because they do not select them as best. 146 Second, within the AS, the FIB of routers can be transiently 147 inconsistent during the BGP convergence and packets towards affected 148 prefixes can loop and be dropped. Note that these loops only happen 149 when ASBR-to-ASBR encapsulation is not used within the AS. 151 This document only addresses the first reason. 153 4. Practices to avoid packet losses 155 This section describes means for an ISP to reduce the transient loss 156 of packets upon a manual shutdown of a BGP session. 158 4.1. Improving availability of alternate paths 160 All solutions that increase the availability of alternate BGP paths 161 at routers performing packet lookups in BGP tables such as 162 [I-D.ietf-idr-best-external] and [RFC7911] help in reducing the LoC 163 bound with manual shutdown of EBGP sessions. 165 One of such solutions increasing diversity in such a way that, at any 166 single step of the convergence process following the EBGP session 167 shutdown, a BGP router does not receive a message withdrawing the 168 only path it currently knows for a given NLRI, allows for a 169 simplified g-shut procedure. 171 Note that the LoC for the inbound traffic of the maintained router, 172 induced by a lack of alternate path propagation within the iBGP 173 topology of a neighboring AS is not under the control of the operator 174 performing the maintenance. The part of the procedure aimed at 175 avoiding LoC for incoming paths can thus be applied even if no LoC 176 are expected for the outgoing paths. 178 4.2. Make before break convergence: g-shut 180 This section describes configurations and actions to be performed for 181 the graceful shutdown of BGP sessions. 183 The goal of this procedure is to let, in both ASes, the paths being 184 shutdown visible, but with a lower LOCAL_PREF value, while alternate 185 paths spread through the iBGP topology. Instead of withdrawing the 186 path, routers of an AS will keep on using it until they become aware 187 of alternate paths. 189 4.2.1. EBGP g-shut 191 This section describes configurations and actions to be performed for 192 the graceful shutdown of EBGP peering links. 194 4.2.1.1. Pre-configuration 196 On each ASBR supporting the g-shut procedure, an outbound BGP route 197 policy is applied on all iBGP sessions of the ASBR, that: 199 o matches the g-shut community 201 o sets the LOCAL_PREF attribute of the paths tagged with the g-shut 202 community to a low value 204 o removes the g-shut community from the paths. 206 o optionally, adds an AS specific g-shut community on these paths to 207 indicate that these are to be withdrawn soon. If some ingress 208 ASBRs reset the LOCAL_PREF attribute, this AS specific g-shut 209 community will be used to override other LOCAL_PREF preference 210 changes. 212 Note that in the case where an AS is aggregating multiple routes 213 under a covering prefix, it is recommended to filter out the g-shut 214 community from the resulting aggregate BGP route. By doing so, the 215 setting of the g-shut community on one of the aggregated routes will 216 not let the entire aggregate inherit the community. Not doing so 217 would let the entire aggregate undergo the g-shut behavior. 219 4.2.1.2. Operations at maintenance time 221 On the g-shut initiator, upon maintenance time, it is required to: 223 o apply an outbound BGP route policy on the EBGP session to be 224 shutdown. This policy tags the paths propagated over the session 225 with the g-shut community. This will trigger the BGP 226 implementation to re-advertise all active routes previously 227 advertised, and tag them with the g-shut community. 229 o apply an inbound BGP route policy on the maintained EBGP session 230 to tag the paths received over the session with the g-shut 231 community. 233 o wait for convergence to happen. 235 o shutdown the EBGP session, optionally using 236 [I-D.ietf-idr-shutdown] to communicate the reason of the shutdown. 238 4.2.1.3. BGP implementation support for g-Shut 240 A BGP router implementation MAY provide features aimed at automating 241 the application of the graceful shutdown procedures described above. 243 Upon a session shutdown specified as graceful by the operator, a BGP 244 implementation supporting a g-shut feature SHOULD: 246 1. On the EBGP side, update all the paths propagated over the 247 corresponding EBGP session, tagging the g-shut community to them. 248 Any subsequent update sent over the session being gracefully shut 249 down would be tagged with the g-shut community. 251 2. On the iBGP side, lower the LOCAL_PREF value of the paths 252 received over the EBGP session being shut down, upon their 253 propagation over iBGP sessions. Optionally, also tag these paths 254 with an AS specific g-shut community. 256 3. Optionally shut down the session after a configured time. 258 4. Prevent the g-shut community from being inherited by a path that 259 would aggregate some paths tagged with the GSHUT community. This 260 behavior avoids the GSHUT procedure to be applied to the 261 aggregate upon the graceful shutdown of one of its covered 262 prefixes. 264 A BGP implementation supporting a g-shut feature SHOULD also 265 automatically install the BGP policies that are supposed to be 266 configured, as described in Section 4.2.1.1 for sessions over which 267 g-shut is to be supported. 269 4.2.2. iBGP g-shut 271 For the shutdown of an iBGP session, provided the iBGP topology is 272 viable after the maintenance of the session, i.e, if all BGP speakers 273 of the AS have an iBGP signaling path for all prefixes advertised on 274 this g-shut iBGP session, then the shutdown of an iBGP session does 275 not lead to transient unreachability. As a consequence, no specific 276 g-shut action is required. 278 4.2.3. Router g-shut 280 In the case of a shutdown of the whole router, in addition to the 281 g-shut of all EBGP sessions, there is a need to g-shut the routes 282 originated by this router (e.g, BGP aggregates redistributed from 283 other protocols, including static routes). This can be performed by 284 tagging such routes with the g-shut community. 286 5. Forwarding modes and transient forwarding loops during convergence 288 The g-shut procedure or the solutions improving the availability of 289 alternate paths, do not change the fact that BGP convergence and the 290 subsequent FIB updates are run independently on each router of the 291 ASes. If the AS applying the solution does not rely on encapsulation 292 to forward packets from the Ingress Border Router to the Egress 293 Border Router, then transient forwarding loops and consequent packet 294 losses can occur during the convergence process. If zero LoC is 295 required, encapsulation is required between ASBRs of the AS. 297 6. Link Up cases 299 We identify two potential causes for transient packet losses upon an 300 EBGP link up event. The first one is local to the g-no-shut 301 initiator, the second one is due to the BGP convergence following the 302 injection of new best paths within the iBGP topology. 304 6.1. Unreachability local to the ASBR 306 An ASBR that selects as best a path received over a newly brought up 307 EBGP session may transiently drop traffic. This can typically happen 308 when the nexthop attribute differs from the IP address of the EBGP 309 peer, and the receiving ASBR has not yet resolved the MAC address 310 associated with the IP address of that "third party" nexthop. 312 A BGP speaker implementation could avoid such losses by ensuring that 313 "third party" nexthops are resolved before installing paths using 314 these in the RIB. 316 If the link up event corresponds to an EBGP session that is being 317 manually brought up, over an already up multi-access link, then the 318 operator can ping third party nexthops that are expected to be used 319 before actually bringing the session up, or ping directed broadcast 320 the subnet IP address of the link. By proceeding like this, the MAC 321 addresses associated with these third party nexthops will be resolved 322 by the g-no-shut initiator. 324 6.2. iBGP convergence 326 Corner cases leading to LoC can occur during an EBGP link up event. 328 A typical example for such transient unreachability for a given 329 prefix is the following: 331 Let's consider 3 route reflectors RR1, RR2, RR3. There is a full 332 mesh of iBGP session between them. 334 1. RR1 is initially advertising the current best path to the 335 members of its iBGP RR full-mesh. It propagated that path within 336 its RR full-mesh. RR2 knows only that path toward the prefix. 338 2. RR3 receives a new best path originated by the "g-no-shut" 339 initiator, being one of its RR clients. RR3 selects it as best, 340 and propagates an UPDATE within its RR full-mesh, i.e., to RR1 and 341 RR2. 343 3. RR1 receives that path, reruns its decision process, and picks 344 this new path as best. As a result, RR1 withdraws its previously 345 announced best-path on the iBGP sessions of its RR full-mesh. 347 4. If, for any reason, RR3 processes the withdraw generated in 348 step 3, before processing the update generated in step 2, RR3 349 transiently suffers from unreachability for the affected prefix. 351 The use of [I-D.ietf-idr-best-external] among the RR of the iBGP 352 full-mesh can solve these corner cases by ensuring that within an AS, 353 the advertisement of a new route is not translated into the withdraw 354 of a former route. 356 Indeed, "best-external" ensures that an ASBR does not withdraw a 357 previously advertised (EBGP) path when it receives an additional, 358 preferred path over an iBGP session. Also, "best-intra-cluster" 359 ensures that a RR does not withdraw a previously advertised (iBGP) 360 path to its non clients (e.g. other RRs in a mesh of RR) when it 361 receives a new, preferred path over an iBGP session. 363 7. IANA Considerations 365 The IANA has assigned the community value 0xFFFF0000 to the planned- 366 shut community in the "BGP Well-known Communities" registry. IANA is 367 requested to change the name planned-shut to g-shut and set this 368 document as the reference. 370 8. Security Considerations 372 By providing the g-shut service to a neighboring AS, an ISP provides 373 means to this neighbor and possibly its downstream ASes to lower the 374 LOCAL_PREF value assigned to the paths received from this neighbor. 376 The neighbor could abuse the technique and do inbound traffic 377 engineering by declaring some prefixes as undergoing a maintenance so 378 as to switch traffic to another peering link. 380 If this behavior is not tolerated by the ISP, it SHOULD monitor the 381 use of the g-shut community by this neighbor. 383 9. Acknowledgments 385 The authors wish to thank Olivier Bonaventure, Pradosh Mohapatra and 386 Job Snijders for their useful comments on this work. 388 10. References 390 10.1. Normative References 392 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 393 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 394 . 396 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 397 Requirement Levels", BCP 14, RFC 2119, 398 DOI 10.17487/RFC2119, March 1997, 399 . 401 [RFC6198] Decraene, B., Francois, P., Pelsser, C., Ahmad, Z., 402 Elizondo Armengol, A., and T. Takeda, "Requirements for 403 the Graceful Shutdown of BGP Sessions", RFC 6198, 404 DOI 10.17487/RFC6198, April 2011, 405 . 407 10.2. Informative References 409 [I-D.ietf-idr-best-external] 410 Marques, P., Fernando, R., Chen, E., Mohapatra, P., and H. 411 Gredler, "Advertisement of the best external route in 412 BGP", draft-ietf-idr-best-external-05 (work in progress), 413 January 2012. 415 [I-D.ietf-idr-shutdown] 416 Snijders, J., Heitz, J., and J. Scudder, "BGP 417 Administrative Shutdown Communication", draft-ietf-idr- 418 shutdown-10 (work in progress), June 2017. 420 [RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder, 421 "Advertisement of Multiple Paths in BGP", RFC 7911, 422 DOI 10.17487/RFC7911, July 2016, 423 . 425 Appendix A. Alternative techniques with limited applicability 427 A few alternative techniques have been considered to provide g-shut 428 capabilities but have been rejected due to their limited 429 applicability. This section describe them for possible reference. 431 A.1. Multi Exit Discriminator tweaking 433 The MED attribute of the paths to be avoided can be increased so as 434 to force the routers in the neighboring AS to select other paths. 436 The solution only works if the alternate paths are as good as the 437 initial ones with respect to the Local-Pref value and the AS Path 438 Length value. In the other cases, increasing the MED value will not 439 have an impact on the decision process of the routers in the 440 neighboring AS. 442 A.2. IGP distance Poisoning 444 The distance to the BGP nexthop corresponding to the maintained 445 session can be increased in the IGP so that the old paths will be 446 less preferred during the application of the IGP distance tie-break 447 rule. However, this solution only works for the paths whose 448 alternates are as good as the old paths with respect to their Local- 449 Pref value, their AS Path length, and their MED value. 451 Also, this poisoning cannot be applied when nexthop self is used as 452 there is no nexthop specific to the maintained session to poison in 453 the IGP. 455 Authors' Addresses 457 Pierre Francois 458 Individual Contributor 460 Email: pfrpfr@gmail.com 462 Bruno Decraene 463 Orange 465 Email: bruno.decraene@orange.com 467 Cristel Pelsser 468 Strasbourg University 470 Email: pelsser@unistra.fr 472 Keyur Patel 473 Arrcus, Inc. 475 Email: keyur@arrcus.com 476 Clarence Filsfils 477 Cisco Systems 479 Email: cfilsfil@cisco.com