idnits 2.17.1 draft-chen-grow-enhanced-as-loop-detection-00.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 : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (March 12, 2019) is 1871 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC4760' is defined on line 347, but no explicit reference was found in the text == Unused Reference: 'RFC7854' is defined on line 352, but no explicit reference was found in the text Summary: 0 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group H. Chen 3 Internet-Draft China Telecom 4 Intended status: Best Current Practice Y. Gu 5 Expires: September 13, 2019 S. Zhuang 6 H. Wang 7 Huawei 8 March 12, 2019 10 Enhanced AS-Loop Detection for BGP 11 draft-chen-grow-enhanced-as-loop-detection-00 13 Abstract 15 This document proposes to enhance AS-Loop Detection for BGP Inbound/ 16 Outbound Route Processing. 18 Requirements Language 20 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 21 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 22 document are to be interpreted as described in RFC 2119 [RFC2119]. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at https://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on September 13, 2019. 41 Copyright Notice 43 Copyright (c) 2019 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (https://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3. Enhanced AS-Loop Detection for BGP Inbound Route Processing . 5 61 4. Enhanced AS-Loop Detection for BGP Outbound Route Processing 7 62 5. Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . 7 63 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7 64 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 65 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 66 9. Normative References . . . . . . . . . . . . . . . . . . . . 8 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 69 1. Introduction 71 The Border Gateway Protocol (BGP) [RFC4271], as an inter-Autonomous 72 (AS) routing protocol, is used to exchange network reachability 73 information between BGP systems. BGP is widely used by Internet 74 Service Providers (ISPs) and large organizations. 76 BGP is used to exchange reachable inter-AS routes, establish inter-AS 77 paths, avoid routing loops, and apply routing policies between ASs. 78 BGP loop detection mechanism is defined in section 9.1.2. of RFC4271: 80 ... 82 If the AS_PATH attribute of a BGP route contains an AS loop, the 83 BGP route should be excluded from the Phase 2 decision function. 84 AS loop detection is done by scanning the full AS path (as 85 specified in the AS_PATH attribute), and checking that the 86 autonomous system number of the local system does not appear in 87 the AS path. Operations of a BGP speaker that is configured to 88 accept routes with its own autonomous system number in the AS path 89 are outside the scope of this document. 91 ... 93 In ordinary BGP, every AS announces its route information with 94 different prefixes. However, its neighboring ASes cannot validate 95 this route information, but rather directly propagate it across the 96 Internet or simply discard AS-Loop routes directly. Obviously, this 97 weak trust model allows forged route announcement propagations and 98 rarely been found, which is a fundamental security weakness of BGP. 99 Forged routes, which can be generated by configuration errors or 100 malicious attacks, can cause large-scale network connectivity 101 problems. 103 Some cases can be worse, hackers exploit this property of BGP to 104 achieve their ulterior motives. They can add some providers' AS 105 number into the forged AS-Path and attempt to make it look like the 106 route had passed through these ASNs, or perhaps they are there to 107 prevent those providers from carrying the route. 109 For example, the cases shown in Figure 1. 111 o Forged Case 1: One upstream ISP of AS200 forged a route with the 112 ASN 200 as the origin ASN. 114 o Forged Case 2: One upstream ISP of AS200 forged a route with the 115 ASN 200 as the transit ASN. 117 After receiving the above routes, AS200 treats them as normal loop 118 routes during the loop detecting phase and discards them directly. 119 If the AS200 is slightly enhanced, it can find that someone has faked 120 himself, which may cause unnecessary trouble for himself. 122 AS-Loop-Detecting at this point 123 Discard AS-Loop Routes directly that contains AS200 124 | 125 | 126 v x.y.z.0/24 Origin AS 600 127 AS100---AS200---AS300-----AS400-----AS500------AS600 128 Normal Case: 129 <-- x.y.z.0/24, AS-Path: 300 400 500 600 131 Forged Case 1: 132 <-- x.y.z.0/24, AS-Path: 300 200 133 (Or: 300 400 200 etc.) 135 Forged Case 2: 136 <-- x.y.z.0/24, AS-Path: 300 200 600 137 (Or: 300 200 500 600 etc.) 139 Figure 1: BGP Inbound Route Processing 141 Split-Horizon for EBGP is an optional function that a BGP sender will 142 not advertise any routes that were previously received from that same 143 AS. In some current implementation, the BGP outbound route 144 processing step will simply discard the route if AS-Loop being 145 detected. 147 For example, the cases shown in Figure 1. 149 o Forged Case 1: One upstream ISP of AS300 forged a route with the 150 ASN 200 as the origin ASN. 152 o Forged Case 2: One upstream ISP of AS300 forged a route with the 153 ASN 200 as the transit ASN. 155 When sending the above routes, AS300 treats them as normal loop 156 routes and discards them directly. If AS300 is slightly enhanced, it 157 can find that someone has faked AS200, which may cause large-scale 158 network connectivity problems. 160 Split-Horizon Enable & AS-Loop-Detecting at this point 161 Discard AS-Loop Routes directly if sending AS-Path contains AS200 162 | 163 | 164 v x.y.z.0/24?Origin AS 600 165 AS100---AS200---AS300-----AS400-----AS500------AS600 166 Normal Case: 167 <-- x.y.z.0/24, AS-Path: 300 400 500 600 169 Forged Case 1: 170 <-- x.y.z.0/24, AS-Path: 300 200 171 (Or: 300 400 200 etc.) 173 Forged Case 2: 174 <-- x.y.z.0/24, AS-Path: 300 200 600 175 (Or: 300 200 500 600 etc.) 177 Figure 2: BGP Outbound Route Processing 179 2. Terminology 181 The following terminology is used in this document. 183 AS: Autonomous System 185 BGP: Border Gateway Protocol 187 BGP hijacking : is the illegitimate takeover of groups of IP 188 addresses by corrupting Internet routing tables maintained using the 189 Border Gateway Protocol (BGP). (Sometimes referred to as prefix 190 hijacking, route hijacking or IP hijacking) 191 EBGP: External BGP 193 ISP: Internet Service Provider 195 3. Enhanced AS-Loop Detection for BGP Inbound Route Processing 197 This section proposes to enhance AS Loop Detection for BGP Inbound 198 Route Processing. 200 As shown in Figure 3, when receiving the routes from AS300, AS200 201 should check whether its AS number is already in the AS-Path, If yes, 202 it further analyzes the location of the AS200 in the received 203 AS_Path: 205 Case 1: AS 200 is listed as Origin AS 207 Lookup the local resource database (Such as ROA Cache) and determine 208 whether the route is originated from the AS 200. 210 o Result 1: AS 200 has no corresponding prefix; it is identified as 211 a purely forged AS_Path prefix hijacking event, which is recorded 212 as incident type 1. 214 o Result 2: The corresponding prefix is a sub-prefix of a certain 215 prefix of the AS 200 and the AS 200 has not advertise it. For 216 example, the prefix being hold by the AS 200 is 10.10.128.0/17, 217 and the receiving route prefix is 10.10.192.0/24, the latter is a 218 sub-prefix of the former, which indicates that this is a forged 219 AS_Path sub-prefix hijacking event, which is recorded as incident 220 type 2. 222 o Result 3: The corresponding prefix is a sub-prefix of a certain 223 prefix of the AS 200 and the AS 200 has only advertised to some 224 special ASNs, and only wants it to be used internally by those 225 ASNs. The AS 200 recognizes that At least one special AS violates 226 the route policy. Which is recorded as incident type 3. 228 o Result 4: The corresponding prefix is originated by the AS 200, 229 this is the normal case. 231 Case 2: AS 200 is listed as transit AS 233 For example, AS-Path looks like the following form: 235 (possible other AS), left AS, local AS(200), right AS, (possible 236 other AS) 237 At this point, AS 200 can lookup the local resource database and 238 check whether there is a real AS relationship between the local AS 239 and the left AS and the right AS 241 o Result 1: At least one of the AS ( the left AS or the right AS) 242 has no actual AS relationship with the local AS. It is a purely 243 forged AS_Path prefix hijacking event. Which is recorded as 244 incident type 4. 246 o Result 2: The AS relationships between the local AS and the left 247 AS and the right AS is correct, but the local AS has not 248 previously process this prefix , so it can be recognized that this 249 is a forged route. We classify this incident type as type 5. 251 o Detection result 3: The AS relationship between the AS and the 252 left AS and the right AS is correct, and the local AS 200 has 253 previously processed the prefix, this is the normal case. 255 Enhanced AS-Loop-Detecting at this point 256 To identify the attack/forged information 257 | 258 | 259 v x.y.z.0/24 Origin AS 600 260 AS100---AS200---AS300-----AS400-----AS500------AS600 261 Normal Case: 262 <-- x.y.z.0/24, AS-Path: 300 400 500 600 264 Forged Case 1: 265 <-- x.y.z.0/24, AS-Path: 300 200 266 (Or: 300 400 200 etc.) 268 Forged Case 2: 269 <-- x.y.z.0/24, AS-Path: 300 200 600 270 (Or: 300 200 500 600 etc.) 272 Figure 3: Enhance for BGP Inbound Route Processing 274 The local AS 200 inputs the detected result to the route hijacking 275 management module, or/and records the log or/and the alarm 276 information, and the maintenance team of the local AS 200 can notify 277 the maintenance team of the relevant AS to correct the error in their 278 networks . 280 After the above steps are added, the stability and security of the 281 network can be improved. 283 4. Enhanced AS-Loop Detection for BGP Outbound Route Processing 285 This section proposes to enhance AS Loop Detection for BGP Outbound 286 Route Processing. 288 If Split-Horizon Enable, Enhanced AS-Loop-Detecting at this point 289 To identify the attack/forged information 290 | 291 | 292 v x.y.z.0/24 Origin AS 600 293 AS100---AS200---AS300-----AS400-----AS500------AS600 294 Normal Case: 295 <-- x.y.z.0/24, AS-Path: 300 400 500 600 297 Forged Case 1: 298 <-- x.y.z.0/24, AS-Path: 300 200 299 (Or: 300 400 200 etc.) 301 Forged Case 2: 302 <-- x.y.z.0/24, AS-Path: 300 200 600 303 (Or: 300 200 500 600 etc.) 305 Figure 4: Enhance for BGP Outbound Route Processing 307 As shown in Figure 4, when sending the routes from AS300 to AS200, 308 AS300 will check whether the AS number 200 is already in the AS-Path, 309 If yes, it can further analyzes the location of the AS200 in the 310 received AS_Path: 312 The remaining processing steps are the same as the previous section. 314 5. Benefits 316 After the enhancements of the AS Loop Detection for BGP Inbound/ 317 Outbound Route Processing are added, the stability and security of 318 the network can be improved. 320 6. Acknowledgements 322 The authors would like to acknowledge the review and inputs from Gang 323 Yan and Zhenbin Li. 325 . 327 7. IANA Considerations 329 TBD. 331 8. Security Considerations 333 TBD. 335 9. Normative References 337 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 338 Requirement Levels", BCP 14, RFC 2119, 339 DOI 10.17487/RFC2119, March 1997, 340 . 342 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 343 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 344 DOI 10.17487/RFC4271, January 2006, 345 . 347 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 348 "Multiprotocol Extensions for BGP-4", RFC 4760, 349 DOI 10.17487/RFC4760, January 2007, 350 . 352 [RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP 353 Monitoring Protocol (BMP)", RFC 7854, 354 DOI 10.17487/RFC7854, June 2016, 355 . 357 Authors' Addresses 359 Huanan Chen 360 China Telecom 361 109, West Zhongshan Road, Tianhe District 362 Guangzhou 510000 363 China 365 Email: chenhn8.gd@chinatelecom.cn 367 Yunan Gu 368 Huawei 369 Huawei Bld., No.156 Beiqing Rd. 370 Beijing 100095 371 China 373 Email: guyunan@huawei.com 374 Shunwan Zhuang 375 Huawei 376 Huawei Bld., No.156 Beiqing Rd. 377 Beijing 100095 378 China 380 Email: zhuangshunwan@huawei.com 382 Haibo Wang 383 Huawei 384 Huawei Bld., No.156 Beiqing Rd. 385 Beijing 100095 386 China 388 Email: rainsword.wang@huawei.com