OSPF Advertisement of Tunnel Encapsulations
Extracted elements (22)
Tunnel types in the Tunnel Sub-TLV are shared with the BGP Tunnel Encapsulation Attribute registry (RFC 9012) to maintain a single consistent namespace for tunnel type identifiers across both OSPF and BGP advertisement mechanisms.
The Tunnel Encapsulations TLV is applicable to both OSPFv2 (RFC 2328) and OSPFv3 (RFC 5340), and tunnel type values are shared with the BGP Tunnel Encapsulation Attribute (RFC 9012) registry to ensure cross-protocol consistency.
A tunnel MUST NOT be used if there is no route toward the IP address specified in the Tunnel Egress Endpoint Sub-TLV, or if the route is not advertised in the same OSPF domain.
Any unknown Tunnel Parameter sub-type MUST be ignored and skipped upon receipt. A reserved value in an LSA MUST be treated as an invalid Tunnel Parameter Sub-TLV. If a Tunnel Parameter Sub-TLV is invalid, its parent Tunnel Sub-TLV MUST be ignored, but other Tunnel Sub-TLVs MUST still be considered.
If a Tunnel Sub-TLV is invalid, it MUST be ignored and skipped. However, other Tunnel Sub-TLVs MUST be considered.
If the Address Family subfield is IPv4, the Address subfield MUST contain an IPv4 /32 address and the Length field MUST be 6. If IPv6, the Address subfield MUST contain an IPv6 /128 address and the Length MUST be 18.
If the Tunnel Encapsulations TLV appears more than once in an OSPF Router Information LSA, the set of all Tunnel Sub-TLVs from all Tunnel Encapsulations TLVs SHOULD be considered. The scope of the advertisement SHOULD be domain wide.
The Tunnel Egress Endpoint Sub-TLV (sub-type 3) MUST be present once and only once in a given Tunnel Sub-TLV.
The Color Sub-TLV (sub-type 4) carries a 4-octet opaque unsigned integer that is user-defined and locally configured. It may appear zero or more times in a Tunnel Sub-TLV and is used to control tunnel selection policy, correlating with the BGP Color Extended Community from RFC 9012.
The DS Field Sub-TLV (sub-type 6) and UDP Destination Port Sub-TLV (sub-type 7) reuse definitions from RFC 9012 Sections 3.3.1 and 3.3.2 respectively.
The Encapsulation Sub-TLV (sub-type 1) reuses the syntax, semantics, and usage defined in Section 3.2 of RFC 9012 for encapsulation sub-TLVs for particular tunnel types.
The Load-Balancing Block Sub-TLV (sub-type 5) reuses the syntax, semantics, and usage defined in RFC 5640 for load-balancing across mesh softwires.
The Protocol Type Sub-TLV (sub-type 2) reuses the syntax, semantics, and usage defined in Section 3.4.1 of RFC 9012.
The Tunnel Encapsulations TLV (type code 13) is a new TLV of the OSPF Router Information Opaque LSA that advertises the tunnel encapsulation types supported by a decapsulator router. It contains one or more Tunnel Sub-TLVs and is applicable to both OSPFv2 and OSPFv3.
IANA allocated code point 13 in the 'OSPF Router Information (RI) TLVs' registry for the Tunnel Encapsulations TLV defined by RFC 9013.
IANA created a new 'OSPF Tunnel Parameter Sub-TLVs' registry under the OSPF Parameters registry. Values 1-34999 use Standards Action; 35000-65499 use First Come First Served. Initial assignments: 0 (Reserved), 1 (Encapsulation), 2 (Protocol Type), 3 (Endpoint), 4 (Color), 5 (Load-Balancing Block), 6 (DS Field), 7 (UDP Destination Port), 65500-65534 (Experimental), 65535 (Reserved).
If a third party can modify encapsulation header information, tunnel type selection, or per-payload tunnel selection, user data packets may be misrouted, misdelivered, or dropped. However, since an OSPF routing domain is typically a well-controlled single-administrative-domain network, this risk is considered low.
The prohibition in Section 6 against using a tunnel toward a destination not reachable via a route in the same OSPF domain prevents a compromised OSPF router from redirecting traffic to arbitrary external destinations (e.g., for inspection or interception).
A Tunnel Parameter Sub-TLV consists of a 2-octet Sub-Type field, a 2-octet Length field (unsigned 16-bit integer for the Tunnel Parameter Value length), and a variable-length Tunnel Parameter Value field whose encoding depends on sub-type.
The Tunnel Egress Endpoint Sub-TLV (sub-type 3) contains a 2-octet Address Family subfield and a variable-length Address subfield. For IPv4, the Address MUST be a /32 prefix and Length MUST be 6; for IPv6, the Address MUST be a /128 prefix and Length MUST be 18 (0x12). IPv6 link-local addresses are not valid.
The Tunnel Encapsulations TLV has type code 13, a variable-length Length field, and a Value field containing one or more Tunnel Sub-TLVs. Each Tunnel Sub-TLV indicates a particular encapsulation format supported by the advertising router.
The Tunnel Sub-TLV contains a 2-octet Tunnel Type field, a 2-octet Length field (unsigned 16-bit integer indicating the total octets of Tunnel Parameter Sub-TLVs), and a variable-length Tunnel Parameter Sub-TLVs field. Tunnel types are shared with the BGP Tunnel Encapsulation Attribute registry.