Network Working Group H. Chen Internet-Draft China Telecom Intended status: Best Current Practice Y. Gu Expires: September 13, 2019 S. Zhuang H. Wang Huawei March 12, 2019 Enhanced AS-Loop Detection for BGP draft-chen-grow-enhanced-as-loop-detection-00 Abstract This document proposes to enhance AS-Loop Detection for BGP Inbound/ Outbound Route Processing. Requirements Language 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]. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. 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 September 13, 2019. Copyright Notice Copyright (c) 2019 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 Chen, et al. Expires September 13, 2019 [Page 1] Internet-Draft Enhanced AS-Loop Detection March 2019 publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Enhanced AS-Loop Detection for BGP Inbound Route Processing . 5 4. Enhanced AS-Loop Detection for BGP Outbound Route Processing 7 5. Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 9. Normative References . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 1. Introduction The Border Gateway Protocol (BGP) [RFC4271], as an inter-Autonomous (AS) routing protocol, is used to exchange network reachability information between BGP systems. BGP is widely used by Internet Service Providers (ISPs) and large organizations. BGP is used to exchange reachable inter-AS routes, establish inter-AS paths, avoid routing loops, and apply routing policies between ASs. BGP loop detection mechanism is defined in section 9.1.2. of RFC4271: ... If the AS_PATH attribute of a BGP route contains an AS loop, the BGP route should be excluded from the Phase 2 decision function. AS loop detection is done by scanning the full AS path (as specified in the AS_PATH attribute), and checking that the autonomous system number of the local system does not appear in the AS path. Operations of a BGP speaker that is configured to accept routes with its own autonomous system number in the AS path are outside the scope of this document. ... In ordinary BGP, every AS announces its route information with different prefixes. However, its neighboring ASes cannot validate this route information, but rather directly propagate it across the Internet or simply discard AS-Loop routes directly. Obviously, this Chen, et al. Expires September 13, 2019 [Page 2] Internet-Draft Enhanced AS-Loop Detection March 2019 weak trust model allows forged route announcement propagations and rarely been found, which is a fundamental security weakness of BGP. Forged routes, which can be generated by configuration errors or malicious attacks, can cause large-scale network connectivity problems. Some cases can be worse, hackers exploit this property of BGP to achieve their ulterior motives. They can add some providers' AS number into the forged AS-Path and attempt to make it look like the route had passed through these ASNs, or perhaps they are there to prevent those providers from carrying the route. For example, the cases shown in Figure 1. o Forged Case 1: One upstream ISP of AS200 forged a route with the ASN 200 as the origin ASN. o Forged Case 2: One upstream ISP of AS200 forged a route with the ASN 200 as the transit ASN. After receiving the above routes, AS200 treats them as normal loop routes during the loop detecting phase and discards them directly. If the AS200 is slightly enhanced, it can find that someone has faked himself, which may cause unnecessary trouble for himself. AS-Loop-Detecting at this point Discard AS-Loop Routes directly that contains AS200 | | v x.y.z.0/24 Origin AS 600 AS100---AS200---AS300-----AS400-----AS500------AS600 Normal Case: <-- x.y.z.0/24, AS-Path: 300 400 500 600 Forged Case 1: <-- x.y.z.0/24, AS-Path: 300 200 (Or: 300 400 200 etc.) Forged Case 2: <-- x.y.z.0/24, AS-Path: 300 200 600 (Or: 300 200 500 600 etc.) Figure 1: BGP Inbound Route Processing Split-Horizon for EBGP is an optional function that a BGP sender will not advertise any routes that were previously received from that same AS. In some current implementation, the BGP outbound route Chen, et al. Expires September 13, 2019 [Page 3] Internet-Draft Enhanced AS-Loop Detection March 2019 processing step will simply discard the route if AS-Loop being detected. For example, the cases shown in Figure 1. o Forged Case 1: One upstream ISP of AS300 forged a route with the ASN 200 as the origin ASN. o Forged Case 2: One upstream ISP of AS300 forged a route with the ASN 200 as the transit ASN. When sending the above routes, AS300 treats them as normal loop routes and discards them directly. If AS300 is slightly enhanced, it can find that someone has faked AS200, which may cause large-scale network connectivity problems. Split-Horizon Enable & AS-Loop-Detecting at this point Discard AS-Loop Routes directly if sending AS-Path contains AS200 | | v x.y.z.0/24?Origin AS 600 AS100---AS200---AS300-----AS400-----AS500------AS600 Normal Case: <-- x.y.z.0/24, AS-Path: 300 400 500 600 Forged Case 1: <-- x.y.z.0/24, AS-Path: 300 200 (Or: 300 400 200 etc.) Forged Case 2: <-- x.y.z.0/24, AS-Path: 300 200 600 (Or: 300 200 500 600 etc.) Figure 2: BGP Outbound Route Processing 2. Terminology The following terminology is used in this document. AS: Autonomous System BGP: Border Gateway Protocol BGP hijacking : is the illegitimate takeover of groups of IP addresses by corrupting Internet routing tables maintained using the Border Gateway Protocol (BGP). (Sometimes referred to as prefix hijacking, route hijacking or IP hijacking) Chen, et al. Expires September 13, 2019 [Page 4] Internet-Draft Enhanced AS-Loop Detection March 2019 EBGP: External BGP ISP: Internet Service Provider 3. Enhanced AS-Loop Detection for BGP Inbound Route Processing This section proposes to enhance AS Loop Detection for BGP Inbound Route Processing. As shown in Figure 3, when receiving the routes from AS300, AS200 should check whether its AS number is already in the AS-Path, If yes, it further analyzes the location of the AS200 in the received AS_Path: Case 1: AS 200 is listed as Origin AS Lookup the local resource database (Such as ROA Cache) and determine whether the route is originated from the AS 200. o Result 1: AS 200 has no corresponding prefix; it is identified as a purely forged AS_Path prefix hijacking event, which is recorded as incident type 1. o Result 2: The corresponding prefix is a sub-prefix of a certain prefix of the AS 200 and the AS 200 has not advertise it. For example, the prefix being hold by the AS 200 is 10.10.128.0/17, and the receiving route prefix is 10.10.192.0/24, the latter is a sub-prefix of the former, which indicates that this is a forged AS_Path sub-prefix hijacking event, which is recorded as incident type 2. o Result 3: The corresponding prefix is a sub-prefix of a certain prefix of the AS 200 and the AS 200 has only advertised to some special ASNs, and only wants it to be used internally by those ASNs. The AS 200 recognizes that At least one special AS violates the route policy. Which is recorded as incident type 3. o Result 4: The corresponding prefix is originated by the AS 200, this is the normal case. Case 2: AS 200 is listed as transit AS For example, AS-Path looks like the following form: (possible other AS), left AS, local AS(200), right AS, (possible other AS) Chen, et al. Expires September 13, 2019 [Page 5] Internet-Draft Enhanced AS-Loop Detection March 2019 At this point, AS 200 can lookup the local resource database and check whether there is a real AS relationship between the local AS and the left AS and the right AS o Result 1: At least one of the AS ( the left AS or the right AS) has no actual AS relationship with the local AS. It is a purely forged AS_Path prefix hijacking event. Which is recorded as incident type 4. o Result 2: The AS relationships between the local AS and the left AS and the right AS is correct, but the local AS has not previously process this prefix , so it can be recognized that this is a forged route. We classify this incident type as type 5. o Detection result 3: The AS relationship between the AS and the left AS and the right AS is correct, and the local AS 200 has previously processed the prefix, this is the normal case. Enhanced AS-Loop-Detecting at this point To identify the attack/forged information | | v x.y.z.0/24 Origin AS 600 AS100---AS200---AS300-----AS400-----AS500------AS600 Normal Case: <-- x.y.z.0/24, AS-Path: 300 400 500 600 Forged Case 1: <-- x.y.z.0/24, AS-Path: 300 200 (Or: 300 400 200 etc.) Forged Case 2: <-- x.y.z.0/24, AS-Path: 300 200 600 (Or: 300 200 500 600 etc.) Figure 3: Enhance for BGP Inbound Route Processing The local AS 200 inputs the detected result to the route hijacking management module, or/and records the log or/and the alarm information, and the maintenance team of the local AS 200 can notify the maintenance team of the relevant AS to correct the error in their networks . After the above steps are added, the stability and security of the network can be improved. Chen, et al. Expires September 13, 2019 [Page 6] Internet-Draft Enhanced AS-Loop Detection March 2019 4. Enhanced AS-Loop Detection for BGP Outbound Route Processing This section proposes to enhance AS Loop Detection for BGP Outbound Route Processing. If Split-Horizon Enable, Enhanced AS-Loop-Detecting at this point To identify the attack/forged information | | v x.y.z.0/24 Origin AS 600 AS100---AS200---AS300-----AS400-----AS500------AS600 Normal Case: <-- x.y.z.0/24, AS-Path: 300 400 500 600 Forged Case 1: <-- x.y.z.0/24, AS-Path: 300 200 (Or: 300 400 200 etc.) Forged Case 2: <-- x.y.z.0/24, AS-Path: 300 200 600 (Or: 300 200 500 600 etc.) Figure 4: Enhance for BGP Outbound Route Processing As shown in Figure 4, when sending the routes from AS300 to AS200, AS300 will check whether the AS number 200 is already in the AS-Path, If yes, it can further analyzes the location of the AS200 in the received AS_Path: The remaining processing steps are the same as the previous section. 5. Benefits After the enhancements of the AS Loop Detection for BGP Inbound/ Outbound Route Processing are added, the stability and security of the network can be improved. 6. Acknowledgements The authors would like to acknowledge the review and inputs from Gang Yan and Zhenbin Li. . Chen, et al. Expires September 13, 2019 [Page 7] Internet-Draft Enhanced AS-Loop Detection March 2019 7. IANA Considerations TBD. 8. Security Considerations TBD. 9. 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, . [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006, . [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, "Multiprotocol Extensions for BGP-4", RFC 4760, DOI 10.17487/RFC4760, January 2007, . [RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP Monitoring Protocol (BMP)", RFC 7854, DOI 10.17487/RFC7854, June 2016, . Authors' Addresses Huanan Chen China Telecom 109, West Zhongshan Road, Tianhe District Guangzhou 510000 China Email: chenhn8.gd@chinatelecom.cn Yunan Gu Huawei Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: guyunan@huawei.com Chen, et al. Expires September 13, 2019 [Page 8] Internet-Draft Enhanced AS-Loop Detection March 2019 Shunwan Zhuang Huawei Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: zhuangshunwan@huawei.com Haibo Wang Huawei Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: rainsword.wang@huawei.com Chen, et al. Expires September 13, 2019 [Page 9]