idnits 2.17.1 draft-ietf-idr-ext-opt-param-09.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC4271, but the abstract doesn't seem to directly say this. It does mention RFC4271 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4271, updated by this document, for RFC5378 checks: 2006-01-13) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 21, 2020) is 1336 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force E. Chen 3 Internet-Draft Cisco Systems 4 Updates: 4271 (if approved) J. Scudder 5 Intended status: Standards Track Juniper Networks 6 Expires: February 22, 2021 August 21, 2020 8 Extended Optional Parameters Length for BGP OPEN Message 9 draft-ietf-idr-ext-opt-param-09 11 Abstract 13 The Optional Parameters in the BGP OPEN message as defined in the 14 base BGP specification are limited to 255 octets due to a one-octet 15 length field. BGP Capabilities are carried in this field and may 16 foreseeably exceed 255 octets in the future, leading to concern about 17 this limitation. 19 In this document we update RFC 4271 by extending, in a backward- 20 compatible manner, the length of the Optional Parameters in the BGP 21 OPEN. The Parameter Length field of individual Optional Parameters 22 is also extended. 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 February 22, 2021. 41 Copyright Notice 43 Copyright (c) 2020 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 1. Introduction 58 The Optional Parameters Length field in the BGP OPEN message is 59 defined in the base BGP specification [RFC4271] as one octet, thus 60 limiting the Optional Parameters field in the OPEN message to 255 61 octets. Since BGP Capabilities [RFC5492] are carried in the Optional 62 Parameters field, and new BGP capabilities continue to be introduced, 63 the limitation is a concern for BGP development. 65 In this document we update [RFC4271] by extending, in a backward- 66 compatible manner, the length of the Optional Parameters in BGP OPEN. 67 This is done by using Optional Parameter Type 255 as a distinguished 68 value, that indicates an extended Optional Parameters Length field 69 follows. In this case the Parameter Length field of the individual 70 Optional Parameters in the BGP OPEN message is also extended. 72 1.1. Requirements Language 74 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 75 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 76 document are to be interpreted as described in RFC 2119 [RFC2119]. 78 2. Protocol Extensions 80 This document reserves Optional Parameter Type code 255 as the 81 "Extended Length" type code. 83 In the event that the length of Optional Parameters in the BGP OPEN 84 message does not exceed 255, the encodings of the base BGP 85 specification [RFC4271] MUST be used without alteration. However, an 86 implementation MUST be prepared to accept an OPEN message that uses 87 the encoding of this specification for Optional Parameters of any 88 length. 90 If the length of Optional Parameters is greater than 255, the 91 extended encoding defined here MUST be used. The (non-extended) 92 length field MUST be set to 255. The subsequent octet (which would 93 be the first Optional Parameter Type in the non-extended format) MUST 94 be set to 255 as well. The subsequent two octets carry the actual 95 length. In addition, the "Parameter Length" field of each Optional 96 Parameter is enlarged to two octets. Other than the larger sizes of 97 the given fields, there is no change to the BGP OPEN message defined 98 in [RFC4271]. 100 When receiving an OPEN, a BGP speaker determines the extended 101 encoding is in use if the first Optional Parameter Type field is 255. 102 In this case, the BGP speaker MUST use the Extended Optional 103 Parameters Length field in lieu of the [RFC4271] encoding to 104 determine the length of Optional Parameters contained in the message. 106 Accordingly, when the length of Optional Parameters in the BGP OPEN 107 message is greater than 255, the OPEN message format is modified as 108 follows, using the first Optional Parameter Type field to indicate 109 the use of the extended format: 111 0 1 2 3 112 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 113 +-+-+-+-+-+-+-+-+ 114 | Version | 115 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 116 | My Autonomous System | 117 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 118 | Hold Time | 119 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 120 | BGP Identifier | 121 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 122 |Non-Ext OP Len.|Non-Ext OP Type| Extended Opt. Parm. Length | 123 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 124 | | 125 | Optional Parameters (variable) | 126 | | 127 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 129 The non-extended Optional Parameters Length field MUST be set to 255 130 on transmission, and MUST be ignored on receipt once the use of the 131 extended format is determined positively by inspection of the (non- 132 extended) Optional Parameters Type field. 134 The subsequent one-octet field, that in the non-extended format would 135 be the first Optional Parameter Type field, MUST be set to 255 on 136 transmission. On receipt, a value of 255 for this field is the 137 indication that the extended format is in use. 139 In this extended encoding, the subsequent two-octet field, termed the 140 Extended Optional Parameters Length field, is an unsigned integer 141 indicating the total length of the Optional Parameters field in 142 octets. If the value of this field is zero, no Optional Parameters 143 are present. 145 Likewise, in that situation the Optional Parameters encoding is 146 modified to be the following: 148 0 1 2 149 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 150 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 151 | Parm. Type | Parameter Length | 152 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 153 ~ Parameter Value (variable) ~ 154 | | 155 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 157 The rules for encoding Optional Parameters are unchanged with respect 158 to those given in [RFC4271] other than the extension of the Parameter 159 Length field to be a two-octet unsigned integer. 161 In parsing an OPEN message, if the one-octet "Optional Parameters 162 Length" field is non-zero, a BGP speaker MUST use the value of the 163 octet following the one-octet "Optional Parameters Length" field to 164 determine both the encoding of the Optional Parameters length and the 165 size of the "Parameter Length" field of individual Optional 166 Parameters. If the value of this field is 255, then the encoding 167 described above is used for the Optional Parameters length. 168 Otherwise the encoding defined in [RFC4271] is used. 170 This encoding is chosen for backward compatibility reasons -- a BGP 171 speaker which has not been upgraded to support this specification may 172 legitimately send Optional Parameters whose length equals exactly 173 255, thus the Optional Parameters Length field alone is insufficient 174 as an indicator. However, such a speaker would never legitimately 175 send an Optional Parameter whose type code is 255, since that value 176 has been reserved by this specification. 178 The choice to mandate that when the extended encoding is in use, the 179 (non-extended) Optional Parameters Length field must be 255 was made 180 for backward compatibility with implementations of earlier versions 181 of this specification. When the extended encoding is in use, the 182 value 0 MUST NOT be used in that field since the presence of that 183 value could have the effect of causing a message parser to never 184 inspect the following octet. 186 3. Errors 188 If a BGP speaker supporting this specification (a "new speaker") is 189 peering with one which does not (an "old speaker") no 190 interoperability issues arise unless the new speaker needs to encode 191 Optional Parameters whose length exceeds 255. In that case, it will 192 transmit an OPEN message which the old speaker will interpret as 193 containing an Optional Parameter with type code 255. Since by 194 definition the old speaker will not recognize that type code, the old 195 speaker may be expected to close the connection with a NOTIFICATION 196 with an Error Code of OPEN Message Error and an Error Subcode of 197 Unsupported Optional Parameters, according to Section 6.2 of 198 [RFC4271]. 200 Although the above is the most likely error to be sent, it is not 201 impossible that the old speaker might detect some other error first, 202 such as a length error, depending on the details of the 203 implementation. In no case would the peering be expected to 204 establish successfully; the only question is which NOTIFICATION would 205 be generated. 207 We note that in any case, such a peering could not succeed, since by 208 definition the extended length encoding would not be used by the new 209 speaker unless the basic encoding was insufficient. 211 Although the Optional Parameter Type code 255 is used in this 212 specification as the indication that the extended encoding is in use, 213 it is not a bonafide Optional Parameter Type in the usual sense, and 214 MUST NOT be used other than as described above. If encountered as an 215 actual Optional Parameter Type code, it MUST be treated as an 216 unrecognized Optional Parameter and handled according to [RFC4271] 217 Section 6.2. 219 It is not considered an error to receive an OPEN message whose 220 Extended Optional Parameters Length value is less than or equal to 221 255, any value SHOULD be silently accepted. It is not considered a 222 fatal error to receive an OPEN message whose (non-extended) Optional 223 Parameters Length value is not 255, and whose first Optional 224 Parameter type code is 255 -- in this case the encoding of this 225 specification MUST be used for decoding the message. A warning MAY 226 be logged. 228 4. IANA Considerations 230 IANA is requested to designate type code 255 in the BGP OPEN Optional 231 Parameter Types registry as the Extended Length type code. 233 5. Security Considerations 235 This extension to BGP does not change the underlying security issues 236 inherent in the existing BGP [RFC4272]. 238 6. Acknowledgements 240 The authors would like to thank Yakov Rekhter and Srihari Sangli for 241 discussing various options to enlarge the Optional Parameters field. 242 We would also like to thank Matthew Bocci, Bruno Decraene, John 243 Heasley, Jakob Heitz, Pradosh Mohapatra, Keyur Patel and Hannes 244 Gredler for their valuable comments. 246 7. References 248 7.1. Normative References 250 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 251 Requirement Levels", BCP 14, RFC 2119, 252 DOI 10.17487/RFC2119, March 1997, 253 . 255 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 256 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 257 DOI 10.17487/RFC4271, January 2006, 258 . 260 7.2. Informative References 262 [RFC4272] Murphy, S., "BGP Security Vulnerabilities Analysis", 263 RFC 4272, DOI 10.17487/RFC4272, January 2006, 264 . 266 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 267 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 268 2009, . 270 Authors' Addresses 272 Enke Chen 273 Cisco Systems 275 Email: enkechen@cisco.com 277 John Scudder 278 Juniper Networks 280 Email: jgs@juniper.net