Internet-Draft | Extended Optional Parameters Length | April 2021 |
Chen & Scudder | Expires 23 October 2021 | [Page] |
The Optional Parameters in the BGP OPEN message as defined in the base BGP specification are limited to 255 octets due to a one-octet length field. BGP Capabilities are carried in this field and may foreseeably exceed 255 octets in the future, leading to concern about this limitation.¶
This document updates RFC 4271 by extending, in a backward-compatible manner, the length of the Optional Parameters in the BGP OPEN. The Parameter Length field of individual Optional Parameters is also extended.¶
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 23 October 2021.¶
Copyright (c) 2021 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 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.¶
The Optional Parameters Length field in the BGP OPEN message is defined in the base BGP specification [RFC4271] as one octet, thus limiting the Optional Parameters field in the OPEN message to 255 octets. Since BGP Capabilities [RFC5492] are carried in the Optional Parameters field, and new BGP capabilities continue to be introduced, the limitation is a concern for BGP development.¶
This document updates [RFC4271] by extending, in a backward-compatible manner, the length of the Optional Parameters in BGP OPEN. This is done by using Optional Parameter Type 255 as a distinguished value, that indicates an extended Optional Parameters Length field follows. In this case the Parameter Length field of the individual Optional Parameters in the BGP OPEN message is also extended.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document reserves Optional Parameter Type code 255 as the "Extended Length" type code.¶
In the event that the length of Optional Parameters in the BGP OPEN message does not exceed 255, the encodings of the base BGP specification [RFC4271] MUST be used without alteration. (However, an implementation MUST accept an OPEN message that uses the encoding of this specification even if the length of Optional Parameters is 255 or less.)¶
However, if the length of Optional Parameters in the BGP OPEN message does exceed 255, the OPEN message MUST be encoded according to the procedure below.¶
The Non-Extended Optional Parameters Length field (Non-Ext OP Len) SHOULD be set to 255 on transmission and in any event MUST NOT be set to 0, and MUST be ignored on receipt once the use of the extended format is determined positively by inspection of the Non-Extended Optional Parameters Type (Non-Ext OP Type) field.¶
The subsequent one-octet field (that would be the first Optional Parameter Type field in the non-extended format, and is called "Non-Ext OP Type" in the figure above) MUST be set to 255 on transmission. On receipt, a value of 255 for this field is the indication that the extended format is in use.¶
In this extended encoding, the subsequent two-octet field, termed the Extended Optional Parameters Length field, is an unsigned integer indicating the total length of the Optional Parameters field in octets. If the value of this field is zero, no Optional Parameters are present.¶
Likewise, in that situation the Optional Parameters encoding is modified to be the following:¶
The rules for encoding Optional Parameters are unchanged with respect to those given in [RFC4271] other than the extension of the Parameter Length field to be a two-octet unsigned integer.¶
In parsing an OPEN message, if the one-octet "Optional Parameters Length" field (labeled "Non-Ext OP Len." in Figure 1) is non-zero, a BGP speaker MUST use the value of the octet following the one-octet "Optional Parameters Length" field (labeled "Non-Ext OP Type" in Figure 1) to determine both the encoding of the Optional Parameters length and the size of the "Parameter Length" field of individual Optional Parameters. If the value of the "Non-Ext OP Type" field is 255, then the encoding described above is used for the Optional Parameters length. Otherwise the encoding defined in [RFC4271] is used.¶
If a BGP speaker supporting this specification (a "new speaker") is peering with one which does not (an "old speaker") no interoperability issues arise unless the new speaker needs to encode Optional Parameters whose length exceeds 255. In that case, it will transmit an OPEN message which the old speaker will interpret as containing an Optional Parameter with type code 255. Since by definition the old speaker will not recognize that type code, the old speaker is expected to close the connection with a NOTIFICATION with an Error Code of OPEN Message Error and an Error Subcode of Unsupported Optional Parameters, according to Section 6.2 of [RFC4271].¶
Although the Optional Parameter Type code 255 is used in this specification as the indication that the extended encoding is in use, it is not a bona fide Optional Parameter Type in the usual sense, and MUST NOT be used other than as described above. If encountered in any position other than the first Optional Parameter Type, it MUST be treated as an unrecognized Optional Parameter and handled according to [RFC4271] Section 6.2.¶
It is not considered an error to receive an OPEN message whose Extended Optional Parameters Length value is less than or equal to 255. It is not considered a fatal error to receive an OPEN message whose (non-extended) Optional Parameters Length value is not 255, and whose first Optional Parameter type code is 255 -- in this case the encoding of this specification MUST be used for decoding the message.¶
IANA is requested to designate type code 255 in the BGP OPEN Optional Parameter Types registry as the Extended Length type code.¶
This extension to BGP does not change the underlying security or confidentiality issues inherent in the existing BGP [RFC4272].¶
The authors would like to thank Yakov Rekhter and Srihari Sangli for discussing various options to enlarge the Optional Parameters field. We would also like to thank Matthew Bocci, Bruno Decraene, John Heasley, Jakob Heitz, Christer Holmberg, Pradosh Mohapatra, Keyur Patel and Hannes Gredler for their valuable comments.¶