--- 1/draft-ietf-grow-as-path-prepending-01.txt 2020-11-01 22:13:10.100809211 -0800 +++ 2/draft-ietf-grow-as-path-prepending-02.txt 2020-11-01 22:13:10.124809818 -0800 @@ -1,25 +1,27 @@ Network Working Group M. McBride Internet-Draft Futurewei Intended status: Best Current Practice D. Madory -Expires: May 3, 2021 Oracle +Expires: May 5, 2021 Oracle J. Tantsura Apstra R. Raszuk Bloomberg LP H. Li HPE - October 30, 2020 + J. Heitz + Cisco + November 1, 2020 AS Path Prepending - draft-ietf-grow-as-path-prepending-01 + draft-ietf-grow-as-path-prepending-02 Abstract AS Path Prepending provides a tool to manipulate the BGP AS_Path attribute through prepending multiple entries of an AS. AS Path Prepending is used to deprioritize a route or alternate path. By prepending the local ASN multiple times, ASs can make advertised AS paths appear artificially longer. Excessive AS Path Prepending has caused routing issues in the internet. This document provides guidance,to the internet community, with how best to utilize AS Path @@ -33,21 +35,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. 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." - This Internet-Draft will expire on May 3, 2021. + This Internet-Draft will expire on May 5, 2021. Copyright Notice Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -58,32 +60,32 @@ described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Excessive Prepending . . . . . . . . . . . . . . . . . . 4 3.2. Prepending during a routing leak . . . . . . . . . . . . 5 - 3.3. Prepending to All . . . . . . . . . . . . . . . . . . . . 6 + 3.3. Prepending to All . . . . . . . . . . . . . . . . . . . . 5 3.4. Memory . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 3.5. Errant announcement . . . . . . . . . . . . . . . . . . . 7 + 3.5. Errant announcement . . . . . . . . . . . . . . . . . . . 6 4. Alternatives to AS Path Prepend . . . . . . . . . . . . . . . 7 5. Best Practices . . . . . . . . . . . . . . . . . . . . . . . 7 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 - 7. Security Considerations . . . . . . . . . . . . . . . . . . . 9 + 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 8. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 9 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 9.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 1. Introduction The Border Gateway Protocol (BGP) [RFC4271] specifies the AS_PATH attribute which enumerates ASs a route update has traversed. If the UPDATE message is propagated over an external link, then the local AS number is prepended to the AS_PATH attribute, and the NEXT_HOP attribute is updated with an IP address of the router that should be used as a next hop to the network. If the UPDATE message is propagated over an internal link, then the AS_PATH attribute and the @@ -144,34 +146,20 @@ two instances of its own AS number when advertising its routes to C, then B will now see a different situation, where the AS Path via D represents the shorter path. Through the use of selective prepending E is able to alter the routing decision of B, even though B is not an adjacent neighbour of E. The result is that traffic from A and B will be passed via D and F to reach E, rather than via C. In this way prepending implements action at a distance where the routing decisions made by non-adjacent ASs can be influenced by selective AS Path prepending. - To illustrate, in August 2020 a large ISP had a network outage that - affected their customers and other ISPs. One major problem was that - the ISP wasn't withdrawing BGP routes, the stale routes were - continuing to be announced as legitimate by the down ISP. This - caused blackholing of traffic even when customers had backup ISPs. - What could customers do in this situation? They could change local - preference to help send traffic to the backup ISP. They could send - more specifics to the backup ISP. They could also pre-provision the - use of AS Path Prepend to prepend the same AS amount to both primary - and backup ISPs before failure. Customers could then, during a - failure, remove one prepend to the backup ISP to make it more - preferred over the down ISP. This is one, of several, scenarios - where using AS Path Prepend can be beneficial. - 3. Problems Since it is so commonly used, what is the problem with the excessive use of AS Path Prepending? Here are a few examples: 3.1. Excessive Prepending The risk of excessive use of AS Path Prepending can be illustrated with real-world examples that have been anonymized using documention prefixes [RFC5737] and ASs [RFC5398] . Consider the prefix @@ -259,37 +247,29 @@ errors in BGP routing. Consider the prepended AS path below: 64496 64501 64501 64510 64510 64501 64510 64501 64501 64510 64510 64501 64501 64510 The prepending here involves a mix of two distinct ASNs (64501 and 64510) with the last two digits transposed. 3.4. Memory - BGP attribute sets are shared among stored routes, ie, if two stored - routes have the same attribute sets, the attribute set is stored only - once. AS Paths are shared among attribute sets so that if two stored - attribute sets have the same AS Path, then the AS Path is stored only - once. Storing them in the control plane is not a big problem. + Long AS Paths cause an increase in memory usage by BGP speakers. The + memory usage is not so much a concern in the control plane BGP + implementations, but more so when AS Paths are included in Netflow + messages. Netflow is processed in the forwarding plane, where memory + is more expensive than in the control plane. - However, AS Paths can be sent in Netflow which is generated in the - forwarding plane. AS Paths are not stored in expensive fast memory - on the forwarding plane, but still, using memory on the forwarding - plane has greater impact than on the control plane. An AS Path - consists of AS_SEQUENCE (and other elements). An AS_SEQUENCE can - contain a maximum of 255 ASNs. If the AS Path is longer, then - multiple AS_SEQUENCE's are required. The code to parse them and - create them is not often exercised and is a potential for bugs in - fresh code. The older implementations have these bugs well and truly - shaken out of them. Some BGP implementations have had memory - corruption/fragmentation problems with long AS Paths. + A concern about an AS Path longer than 255 is the extra complexity + required to process it, because it needs to be encoded in more than + one AS_SEQUENCE in the AS_PATH BGP path attribute. 3.5. Errant announcement There was an Internet-wide outage caused by a single errant routing announcement. In this incident, AS64496 announced its one prefix with an extremely long AS path. Someone entered their ASN instead of the prepend count 64496 modulo 256 = 252 prepends and when a path lengths exceeded 255, routers crashed 4. Alternatives to AS Path Prepend @@ -364,22 +345,22 @@ 7. Security Considerations Long prepending may make a network more vulernable to route hijacking which will exist whenever there is a well connected peer that is willing to forge their AS_PATH or allows announcements with a fabricated AS path. 8. Acknowledgement The authors would like to thank Greg Skinner, Randy Bush, Dave - Farmer, Nick Hilliard, Martijn Schmidt, Jakob Heitz, Michael Still, - Geoff Huston and Jeffrey Haas for contributing to this document. + Farmer, Nick Hilliard, Martijn Schmidt, Michael Still, Geoff Huston + and Jeffrey Haas for contributing to this document. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . @@ -430,10 +410,18 @@ Robert Raszuk Bloomberg LP Email: robert@raszuk.net Hongwei Li HPE Email: flycoolman@gmail.com + + Jakob Heitz + Cisco + 170 West Tasman Drive + San Jose, CA 95134 + USA + + Email: jheitz@cisco.com