rfc-9792

Prefix Flag Extension for OSPFv2 and OSPFv3

R. Chen, D. Zhao, P. Psenak, K. Talaulikar, L. Gong
date2025-06 streamIETF areartg wglsr statusPROPOSED STANDARD pages7 canonicalhttps://www.rfc-editor.org/rfc/rfc9792 doi10.17487/RFC9792
Each OSPF prefix can be advertised with an 8-bit field to indicate specific properties of that prefix. However, all the OSPFv3 Prefix Options bits have already been assigned, and only a few bits remain unassigned in the Flags field of the OSPFv2 Extended Prefix TLV. This document solves this problem by defining a variable-length Prefix Extended Flags sub-TLV for OSPF. This sub-TLV is applicable to OSPFv2 and OSPFv3.

Extracted elements (16)

design-rationale §1

All OSPFv3 Prefix Options bits (8-bit field) have already been assigned, and only 5 bits remained unassigned in the OSPFv2 Extended Prefix TLV Flags field at publication time. To solve the exhaustion of prefix flag space, this document defines a variable-length Prefix Extended Flags sub-TLV applicable to both OSPFv2 and OSPFv3.

routing

design-rationale §2

The Prefix Extended Flags field uses 4-octet blocks with a continuous bit-numbering scheme: bit 0 is the MSB of the first block, and if the field exceeds 4 octets, numbering picks up where the prior block ended (e.g., bit 32 is the MSB of the 5th octet). This design allows extensible growth without redefining the flag space.

routing

interoperability-note §3

The Prefix Extended Flags sub-TLV does not introduce backward compatibility issues. Implementations that do not recognize it will ignore the sub-TLV per normal TLV processing rules (RFC 3630 Section 2.3.2 for OSPFv2 and RFC 8362 Section 6.3 for OSPFv3).

routing

normative-requirement §2 SHOULD

Additional OSPFv2 prefix flags SHOULD be allocated from the unused bits in the Flags field of the OSPFv2 Extended Prefix TLV prior to allocating flags in the new OSPFv2 Prefix Extended Flags sub-TLV, to preserve the simpler fixed-size encoding where possible.

routing, registry

normative-requirement §2 MUST

An implementation MUST limit the length of the sub-TLV so as to signal only the bits that are set to 1. Defined prefix flags that are not transmitted because they fall beyond the transmitted length MUST be treated as being set to 0.

routing

normative-requirement §2 MUST

The Length field of the Prefix Extended Flags sub-TLV MUST be a multiple of 4 octets. If the length is not a multiple of 4 octets, the LSA is considered malformed and MUST be ignored.

routing

normative-requirement §2 MUST

Unassigned bits in the Prefix Extended Flags field MUST be set to zero on transmission and MUST be ignored on receipt.

routing

normative-requirement §2 MUST

When multiple instances of the OSPFv2/OSPFv3 Prefix Extended Flags sub-TLV are received within the same TLV, an implementation MUST use only the first occurrence and MUST ignore all subsequent instances. Errors SHOULD be logged subject to rate limiting.

routing

protocol-element §2

The OSPFv3 Prefix Extended Flags sub-TLV is advertised as a sub-TLV of the Inter-Area-Prefix TLV, External-Prefix TLV, Intra-Area-Prefix TLV (all from RFC 8362), and the SRv6 Locator TLV (RFC 9513).

routing

protocol-element §2

The Prefix Extended Flags sub-TLV is a variable-length sub-TLV used to advertise additional attributes associated with OSPF prefixes. For OSPFv2, Type=11; for OSPFv3, Type=37. The advertisement and processing of existing fixed-size prefix flags remain unchanged.

routing

registry §4.1.1

IANA allocated codepoint 11 in the 'OSPFv2 Extended Prefix TLV Sub-TLVs' registry for the OSPFv2 Prefix Extended Flags sub-TLV.

routing, registry

registry §4.2.1

IANA allocated codepoint 37 (with L2BM flag 'X') in the 'OSPFv3 Extended-LSA Sub-TLVs' registry for the OSPFv3 Prefix Extended Flags sub-TLV.

routing, registry

registry §4.1.2

IANA created the 'OSPFv2 Prefix Extended Flags' registry under 'OSPFv2 Parameters'. Bits are allocated via IETF Review (RFC 8126); bits 0-31 are initially Unassigned. IANA will add subsequent 32-bit blocks upon exhaustion of the preceding block.

routing, registry

registry §4.2.2

IANA created the 'OSPFv3 Prefix Extended Flags' registry under 'OSPFv3 Parameters'. Bits are allocated via IETF Review (RFC 8126); bits 0-31 are initially Unassigned. IANA will add subsequent 32-bit blocks upon exhaustion of the preceding block.

routing, registry

security-consideration §5

The procedures and protocol extensions defined in this document do not affect the OSPFv2 or OSPFv3 security models. Security considerations from RFC 7684 (OSPFv2 TLV-encoding) and RFC 8362 (OSPFv3) apply.

routing, security

wire-format §2

The sub-TLV format consists of a 2-octet Type field (11 for OSPFv2, 37 for OSPFv3), a 2-octet Length field (must be a multiple of 4 octets), and a variable-length Prefix Extended Flags field grouped in 4-octet blocks. Bits are numbered starting from bit 0 as the most significant bit of the first 32-bit block, with numbering continuing across additional 4-octet blocks.

routing