rfc-9072

Extended Optional Parameters Length for BGP OPEN Message

E. Chen, J. Scudder
date2021-07 streamIETF areartg wgidr statusPROPOSED STANDARD pages6 canonicalhttps://www.rfc-editor.org/rfc/rfc9072 doi10.17487/RFC9072
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 concerns about this limitation. This document updates RFC 4271 by extending, in a backward-compatible manner, the length of the Optional Parameters in a BGP OPEN message. The Parameter Length field of individual Optional Parameters is also extended.

updates

Extracted elements (17)

design-rationale §1

Optional Parameter type code 255 is reserved as the 'Extended Length' signal. When the Non-Ext OP Type octet equals 255, the receiver switches to extended parsing. This re-uses an existing field position to signal the format change without altering the base message framing.

bgp, routing

design-rationale §3

The backward-compatible design avoids new version negotiation by re-purposing the existing first-octet field position: setting Non-Ext OP Len. to 255 and Non-Ext OP Type to 255 is detectable by old speakers as an unrecognized parameter, causing a clean NOTIFICATION rather than silent misparse.

bgp, routing

interoperability-note §3 MUST

It is not a fatal error to receive an OPEN whose Non-Ext OP Len. is not 255 but whose first Optional Parameter type code is 255; in this case the extended encoding MUST still be used for decoding.

bgp, routing

interoperability-note §3

Receiving an OPEN message whose Extended Optional Parameters Length value is less than or equal to 255 is not considered an error.

bgp, routing

interoperability-note §3

When a new speaker (supporting this spec) needs to send Optional Parameters exceeding 255 octets to an old speaker, the old speaker will see type code 255 as an unrecognized Optional Parameter and is expected to close the connection with a NOTIFICATION (OPEN Message Error / Unsupported Optional Parameters).

bgp, routing

normative-requirement §2 MUST

An implementation MUST accept a BGP OPEN message that uses the extended encoding of this specification even if the length of the Optional Parameters is 255 octets or less.

bgp, routing

normative-requirement §2 MAY

Configuration MAY override the above to force the extended format to be used in all cases, for example to test that a peer supports this specification.

bgp, routing

normative-requirement §2 MUST

If the length of the Optional Parameters in the BGP OPEN message does exceed 255 octets, the OPEN message MUST be encoded according to the extended format procedure.

bgp, routing

normative-requirement §2 MUST

The Non-Ext OP Type field MUST be set to 255 on transmission when using the extended format. On receipt, a value of 255 for this field is the indication that the extended format is in use.

bgp, routing

normative-requirement §2 MUST NOT

The Non-Extended Optional Parameters Length field (Non-Ext OP Len.) SHOULD be set to 255 on transmission and MUST NOT be set to 0; it MUST be ignored on receipt once the extended format is confirmed.

bgp, routing

normative-requirement §3 MUST NOT

Type code 255 is not a bona fide Optional Parameter type code and MUST NOT be used other than as the Non-Ext OP Type signal. If encountered in any other position, it MUST be treated as an unrecognized Optional Parameter and handled per RFC 4271 Section 6.2.

bgp, routing

normative-requirement §2 MUST

When parsing an OPEN, if Non-Ext OP Len. is non-zero, the BGP speaker MUST inspect the Non-Ext OP Type octet to determine which encoding is in use. If that value is 255, the extended format is used; otherwise RFC 4271 encoding applies.

bgp, routing

protocol-element §2

The Extended Optional Parameters Length field is a two-octet unsigned integer indicating the total length of the Optional Parameters field in octets. A value of zero means no Optional Parameters are present.

bgp, routing

registry §4

IANA assigned value 255 to the new 'Extended Length' type code in the 'BGP OPEN Optional Parameter Types' registry.

bgp, routing, registry

security-consideration §5

This extension to BGP does not change the underlying security or confidentiality issues inherent in the existing BGP protocol as analyzed in RFC 4272.

bgp, routing, security

wire-format §2

Extended OPEN format replaces the one-octet Optional Parameters Length with three fields: Non-Ext OP Len. (1 octet), Non-Ext OP Type (1 octet, set to 255), and Extended Opt. Parm. Length (2 octets, unsigned integer indicating total Optional Parameters length).

bgp, routing

wire-format §2

In the extended encoding, each individual Optional Parameter uses a 2-octet unsigned integer Parameter Length field (instead of the 1-octet field in RFC 4271), preceded by the 1-octet Parameter Type field.

bgp, routing