idnits 2.17.1 draft-ietf-idr-ext-opt-param-07.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 (July 31, 2019) is 1723 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 1, 2020 July 31, 2019 8 Extended Optional Parameters Length for BGP OPEN Message 9 draft-ietf-idr-ext-opt-param-07 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 the BGP OPEN length 20 field in a backward-compatible manner. The Parameter Length field of 21 individual Optional Parameters is also extended. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at https://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on February 1, 2020. 40 Copyright Notice 42 Copyright (c) 2019 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (https://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 1. Introduction 57 The Optional Parameters Length field in the BGP OPEN message is 58 defined in the base BGP specification [RFC4271] as one octet, thus 59 limiting the Optional Parameters field in the OPEN message to 255 60 octets. Since BGP Capabilities [RFC5492] are carried in the Optional 61 Parameters field, and new BGP capabilities continue to be introduced, 62 the limitation is a concern for BGP development. 64 In this document we update [RFC4271] by extending the BGP OPEN length 65 field in a backward-compatible manner. The Parameter Length field of 66 individual Optional Parameters is also extended. This is done by 67 using Optional Parameter Type 255 as a distinguished value, that 68 indicates an extended Optional Parameters Length field follows. In 69 this case the Parameter Length field of the Optional Parameters in 70 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. In any event the value 0 MUST NOT be used in 182 this field since the presence of that value could have the effect of 183 causing a message parser to never inspect the following octet. 185 3. Errors 187 If a BGP speaker supporting this specification (a "new speaker") is 188 peering with one which does not (an "old speaker") no 189 interoperability issues arise unless the new speaker needs to encode 190 Optional Parameters whose length exceeds 255. In that case, it will 191 transmit an OPEN message which the old speaker will interpret as 192 containing an Optional Parameter with type code 255. Since by 193 definition the old speaker will not recognize that type code, the old 194 speaker may be expected to close the connection with a NOTIFICATION 195 with an Error Code of OPEN Message Error and an Error Subcode of 196 Unsupported Optional Parameters, according to Section 6.2 of 197 [RFC4271]. 199 Although the above is the most likely error to be sent, it is not 200 impossible that the old speaker might detect some other error first, 201 such as a length error, depending on the details of the 202 implementation. In no case would the peering be expected to 203 establish successfully; the only question is which NOTIFICATION would 204 be generated. 206 We note that in any case, such a peering could not succeed, since by 207 definition the extended length encoding would not be used by the new 208 speaker unless the basic encoding was insufficient. 210 Although the Optional Parameter Type code 255 is used in this 211 specification as the indication that the extended encoding is in use, 212 it is not a bonafide Optional Parameter Type in the usual sense, and 213 MUST NOT be used other than as described above. If encountered as an 214 actual Optional Parameter Type code, it MUST be treated as an 215 unrecognized Optional Parameter and handled according to [RFC4271] 216 Section 6.2. 218 It is not considered an error to receive an OPEN message whose 219 Extended Optional Parameters Length value is less than or equal to 220 255, any value SHOULD be silently accepted. It is not considered a 221 fatal error to receive an OPEN message whose (non-extended) Optional 222 Parameters Length value is not 255, and whose first Optional 223 Parameter type code is 255 -- in this case the encoding of this 224 specification MUST be used for decoding the message. A warning MAY 225 be logged. 227 4. IANA Considerations 229 IANA is requested to designate type code 255 in the BGP OPEN Optional 230 Parameter Types registry as the Extended Length type code. 232 5. Security Considerations 234 This extension to BGP does not change the underlying security issues 235 inherent in the existing BGP [RFC4272]. 237 6. Acknowledgements 239 The authors would like to thank Yakov Rekhter and Srihari Sangli for 240 discussing various options to enlarge the Optional Parameters field. 241 We would also like to thank Matthew Bocci, Bruno Decraene, John 242 Heasley, Jakob Heitz, Pradosh Mohapatra, Keyur Patel and Hannes 243 Gredler for their valuable comments. 245 7. References 247 7.1. Normative References 249 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 250 Requirement Levels", BCP 14, RFC 2119, 251 DOI 10.17487/RFC2119, March 1997, 252 . 254 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 255 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 256 DOI 10.17487/RFC4271, January 2006, 257 . 259 7.2. Informative References 261 [RFC4272] Murphy, S., "BGP Security Vulnerabilities Analysis", 262 RFC 4272, DOI 10.17487/RFC4272, January 2006, 263 . 265 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 266 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 267 2009, . 269 Authors' Addresses 271 Enke Chen 272 Cisco Systems 274 Email: enkechen@cisco.com 276 John Scudder 277 Juniper Networks 279 Email: jgs@juniper.net