rfc-7684

OSPFv2 Prefix/Link Attribute Advertisement

P. Psenak, H. Gredler, R. Shakir, W. Henderickx, J. Tantsura, A. Lindem
date2015-11 streamIETF areartg wgospf statusPROPOSED STANDARD pages15 canonicalhttps://www.rfc-editor.org/rfc/rfc7684 doi10.17487/RFC7684 errataview
OSPFv2 requires functional extension beyond what can readily be done with the fixed-format Link State Advertisements (LSAs) as described in RFC 2328. This document defines OSPFv2 Opaque LSAs based on Type-Length-Value (TLV) tuples that can be used to associate additional attributes with prefixes or links. Depending on the application, these prefixes and links may or may not be advertised in the fixed-format LSAs. The OSPFv2 Opaque LSAs are optional and fully backward compatible.

Extracted elements (30)

design-rationale §3.1

Only one Extended Link TLV is permitted per Extended Link Opaque LSA to allow fine-grained topology change advertisements — a single link attribute change triggers re-origination of only the LSA for that link, avoiding unnecessary churn for unrelated links.

routing

design-rationale §1

OSPFv2 extends via optional, backward-compatible Opaque LSAs carrying TLV tuples rather than replacing fixed-format LSAs as OSPFv3 does (OSPFv3-EXTEND). This preserves full interoperability with routers that do not support the extensions.

routing

design-rationale §2

The flooding scope of an Extended Prefix Opaque LSA may intentionally exceed the scope of the prefixes it carries (e.g., a mapping server in a segment routing deployment advertising prefixes from a larger scope). Route Type 0 (Unspecified) accommodates the case where the advertising entity does not know the prefix's route type.

routing

design-rationale §2

The Opaque ID field in both Extended Prefix and Extended Link LSAs has no semantic significance beyond differentiating multiple LSAs from the same router; lowest Opaque ID wins when duplicates exist, providing a deterministic tie-breaking rule without requiring semantic encoding.

routing

design-rationale §2

The TLV format reuses the same encoding as the Traffic Engineering Extensions to OSPFv2 (RFC 3630), including 4-octet alignment with zero padding not counted in the Length field, for consistency across OSPFv2 TLV-based extensions.

routing

interoperability-note §4

The OSPFv2 Extended Prefix and Extended Link Opaque LSAs are fully backward compatible because Opaque LSAs themselves are optional (RFC 5250). Routers that do not support these extensions will simply ignore the Opaque LSAs, requiring no protocol changes to existing deployments.

routing

normative-requirement §2.1 SHOULD

An ABR generating an Extended Prefix TLV for an inter-area prefix that is locally connected or attached in another area SHOULD set the A-Flag (0x80).

routing

normative-requirement §2.1 MUST

Because the Opaque LSA type defines the flooding scope, the LSA flooding scope MUST satisfy the application-specific requirements for all prefixes included in a single OSPFv2 Extended Prefix Opaque LSA.

routing

normative-requirement §4 MUST

Future OSPFv2 applications utilizing these Opaque LSA extensions MUST address backward compatibility of the corresponding functionality in their own specifications.

routing

normative-requirement §2.1 SHOULD

If the Extended Prefix TLV or Extended Link TLV is advertised multiple times within the same Opaque LSA, only the first instance is used by receiving routers; this situation SHOULD be logged as an error.

routing

normative-requirement §2.1 MUST

If the N-Flag (Node Flag) is set in the Extended Prefix TLV but the prefix length is not a host prefix (/32), the N-Flag MUST be ignored by receivers.

routing

normative-requirement §5 MUST NOT

Malformed LSAs MUST NOT be stored in the Link State Database (LSDB), acknowledged, or reflooded. A malformed LSA is one where a TLV or sub-TLV overruns the enclosing LSA/TLV boundary, or where remaining unparsed data is smaller than a TLV header.

routing, security

normative-requirement §3.1 MUST NOT

Only one OSPFv2 Extended Link TLV SHALL be advertised in each OSPFv2 Extended Link Opaque LSA, allowing for fine granularity changes in the topology.

routing

normative-requirement §5 SHOULD

Reception of malformed LSAs SHOULD be counted and/or logged for further analysis.

routing, security

normative-requirement §6.1 MUST NOT

TLV type values in the Experimental Use range 32768-33023 MUST NOT be mentioned by RFCs and will not be registered with IANA.

routing, registry

normative-requirement §2.1 RECOMMENDED

When multiple Extended Prefix Opaque LSAs or Extended Link Opaque LSAs from the same router include the same prefix or link, receivers use the TLV from the LSA with the smallest Opaque ID. Re-origination in ascending Opaque ID order is RECOMMENDED to minimize disruption.

routing

protocol-element §2.1

The Extended Prefix TLV Flags field (1 octet) defines two flags: A-Flag (0x80, Attach Flag) set by ABRs for inter-area prefixes locally connected or attached in another area, and N-Flag (0x40, Node Flag) indicating the prefix identifies the advertising router (typically a loopback host prefix).

routing

protocol-element §2.1

The Route Type field in the Extended Prefix TLV takes values: 0 (Unspecified — applies regardless of route type), 1 (Intra-Area), 3 (Inter-Area), 5 (AS External), 7 (NSSA External). These correspond to OSPFv2 LSA types in the IANA OSPFv2 LS Type registry.

routing

registry §6.4

The 'OSPFv2 Extended Link Opaque LSA TLVs' registry defines top-level TLVs for Extended Link Opaque LSAs. Initial allocations: 0=Reserved, 1=OSPFv2 Extended Link TLV. Range 32768-33023 for Experimental Use; 33024-65535 requires an IETF specification.

routing, registry

registry §6.5

The 'OSPFv2 Extended Link TLV Sub-TLVs' registry defines sub-TLVs at any nesting level for Extended Link TLVs. Initial allocation: 0=Reserved. Allocation policy: IETF Review or IESG Approval.

routing, registry

registry §6.1

The 'OSPFv2 Extended Prefix Opaque LSA TLVs' registry (added to OSPFv2 Parameters) defines top-level TLVs for Extended Prefix Opaque LSAs. Initial allocations: 0=Reserved, 1=OSPFv2 Extended Prefix TLV. Range 32768-33023 for Experimental Use; 33024-65535 requires an IETF specification before assignment.

routing, registry

registry §6.3

The 'OSPFv2 Extended Prefix TLV Flags' registry defines the 8-bit Flags field in the Extended Prefix TLV. Initial allocations: 0x80=A-Flag (Attach Flag), 0x40=N-Flag (Node Flag). Allocation policy: IETF Review or IESG Approval.

routing, registry

registry §6.2

The 'OSPFv2 Extended Prefix TLV Sub-TLVs' registry defines sub-TLVs at any nesting level for Extended Prefix TLVs. Initial allocation: 0=Reserved. Allocation policy: IETF Review or IESG Approval.

routing, registry

security-consideration §5

Implementations must detect malformed TLV and sub-TLV permutations and ensure they do not provide a vulnerability for attackers to crash the OSPFv2 router or routing process. Parsing must guard against TLVs overrunning their enclosing structures.

routing, security

security-consideration §5

OSPFv2 applications using these extensions must define their own security considerations in their respective specifications. The new LSAs are subject to the same general security concerns as OSPFv2 (RFC 2328) and Opaque LSAs (RFC 5250).

routing, security

wire-format §2

Each TLV within an Extended Prefix or Extended Link Opaque LSA has a 2-octet Type field, a 2-octet Length field (value portion only, excluding padding), and a variable-length Value field padded to 4-octet alignment with zeros. A TLV with no value has Length 0.

routing

wire-format §3

The OSPFv2 Extended Link Opaque LSA uses Opaque Type 8 and LS Type 10 (area-local only). Its TLV body is formatted identically to the Extended Prefix Opaque LSA.

routing

wire-format §3.1

The OSPFv2 Extended Link TLV (Type=1) encodes a 1-octet Link Type, 3 Reserved octets, a 4-octet Link ID, a 4-octet Link Data (all matching Router-LSA definitions from RFC 2328 Section A.4.2), and optional Sub-TLVs. Only one such TLV SHALL appear per Extended Link Opaque LSA.

routing

wire-format §2

The OSPFv2 Extended Prefix Opaque LSA uses Opaque Type 7 and LS Type 10 (area-local) or 11 (AS-wide). The LSA header fields include LS age, Options, LS Type, Opaque Type (1 octet), Opaque ID (3 octets), Advertising Router, LS sequence number, LS checksum, and Length, followed by a variable TLV section.

routing

wire-format §2.1

The OSPFv2 Extended Prefix TLV (Type=1) encodes a 1-octet Route Type, 1-octet Prefix Length, 1-octet AF (0=IPv4 unicast), 1-octet Flags, a variable-length Address Prefix encoded as a 32-bit value for IPv4, and optional Sub-TLVs.

routing