RFC 9792 | Prefix Flag Extension for OSPF | May 2025 |
Chen, et al. | Standards Track | [Page] |
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 Attribute Flags sub-TLV for OSPF. This sub-TLV is applicable to OSPFv2 and OSPFv3.¶
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9792.¶
Copyright (c) 2025 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Each OSPF prefix can be advertised with an 8-bit field to indicate specific properties of that prefix. This is done using the OSPFv3 Prefix Options (Appendix A.4.1.1 of [RFC5340]) and the Flags field in the OSPFv2 Extended Prefix TLV (Section 2.1 of [RFC7684]). The rest of this document refers to these 8-bit fields in both OSPFv2 and OSPFv3 as the "existing fixed-size prefix attribute flags".¶
However, all the OSPFv3 Prefix Options bits have already been assigned (see the "OSPFv3 Prefix Options (8 bits)" IANA registry [IANA-OSPFv3-PO]). Also, at the time of publication of this document, only 5 bits remain unassigned in the Flags field of the OSPFv2 Extended Prefix TLV (see the "OSPFv2 Extended Prefix TLV Flags" IANA registry [IANA-OSPFv2-EPF]).¶
This document solves the problem of insufficient flag bits for the signaling of prefix properties in OSPF by defining a variable-length Prefix Attribute Flags sub-TLV for OSPFv2 and OSPFv3.¶
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 defines a variable-length Prefix Attribute Flags sub-TLV for OSPFv2 and OSPFv3. The sub-TLV specifies the variable-length Prefix Attribute Flags field to advertise additional attributes associated with OSPF prefixes. The advertisement and processing of the existing fixed-size prefix attribute flags remain unchanged.¶
The format of the OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLV is shown in Figure 1.¶
0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // Prefix Attribute Flags (Variable) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
where:¶
Unassigned bits MUST be set to zero on transmission and MUST be ignored on receipt.¶
An implementation MUST limit the length of the sub-TLV so as to signal the bits that are set to 1. Defined prefix flags that are not transmitted due to being beyond the transmitted length MUST be treated as being set to 0.¶
The OSPFv2 Prefix Attribute Flags sub-TLV is advertised as a sub-TLV of the OSPFv2 Extended Prefix TLV defined in [RFC7684]. 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 OSPFv2 Prefix Attribute Flags sub-TLV.¶
The OSPFv3 Prefix Attribute Flags sub-TLV is advertised as a sub-TLV of the following OSPFv3 TLVs:¶
When multiple instances of the OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLVs are received within the same TLV, an implementation MUST use only the first occurrence of the sub-TLV and MUST ignore all subsequent instances of the sub-TLV. Errors SHOULD be logged subject to rate limiting.¶
The OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLV does not introduce any backward compatibility issues. An implementation that does not recognize the OSPFv2/OSPFv3 Prefix Attribute Flags sub-TLV would ignore the sub-TLV as per normal TLV processing operations (refer to Section 2.3.2 of [RFC3630] and Section 6.3 of [RFC8362]).¶
IANA has allocated the following codepoint in the "OSPFv2 Extended Prefix TLV Sub-TLVs" registry:¶
Value | Description | Reference |
---|---|---|
11 | OSPFv2 Prefix Attribute Flags | RFC 9792 |
IANA has created the "OSPFv2 Prefix Attribute Flags" registry within the "Open Shortest Path First v2 (OSPFv2) Parameters" registry group. The registry defines the bits in the Prefix Attribute Flags field in the OSPFv2 Prefix Attribute Flags sub-TLV as specified in Section 2. The bits are to be allocated via IETF Review [RFC8126]. Each bit definition will include:¶
No bits are currently defined. Bits 0-31 are to be initially marked as "Unassigned". The flags defined in this document may use either a single bit or multiple bits to represent a state, as determined by the specific requirements of the document defining them. IANA will add subsequent blocks of 32 bits upon exhaustion of the preceding 32-bit block.¶
IANA has allocated the following codepoint in the "OSPFv3 Extended-LSA Sub-TLVs" registry:¶
Value | Description | Reference |
---|---|---|
37 | OSPFv3 Prefix Attribute Flags | RFC 9792 |
The entry in the "L2BM" field is "X".¶
IANA has created the "OSPFv3 Prefix Attribute Flags" registry within the "Open Shortest Path First v3 (OSPFv3) Parameters" registry group. The registry defines the bits in the Prefix Attribute Flags field in the OSPFv2 Prefix Attribute Flags sub-TLV as specified in Section 2. The bits are to be allocated via IETF Review [RFC8126]. Each bit definition will include:¶
No bits are currently defined. Bits 0-31 are to be initially marked as "Unassigned". The flags defined in this document may use either a single bit or multiple bits to represent a state, as determined by the specific requirements of the document defining them. IANA will add subsequent blocks of 32 bits upon exhaustion of the preceding 32-bit block.¶
Procedures and protocol extensions defined in this document do not affect the OSPFv2 or OSPFv3 security models. See Section 5 of [RFC7684] for a discussion of OSPFv2 TLV-encoding considerations and Section 7 of [RFC8362] for a discussion of OSPFv3 security.¶
The authors would like to thank Shraddha Hegde, Changwang Lin, Tom Petch, and many others for their suggestions and comments.¶
The authors would also like to thank Acee Lindem for aligning the terminology with existing OSPF documents and for editorial improvements.¶