Source-Specific Routing in the Babel Routing Protocol
Extracted elements (28)
Destination-first ordering is mandated (rather than source-first) because with source-first ordering, a packet destined for an internal prefix D with source in S would be routed toward the Internet rather than toward D, making delivery impossible. All routers must use the same ordering to prevent persistent routing loops.
Source prefix compression is not applied in Update TLVs, even though destination prefix compression is permitted for source-specific updates. This simplifies the encoding while relying on the existing destination compression scheme from RFC 8966 Section 4.5.
The source prefix is encoded as a mandatory sub-TLV so that unextended (RFC 8966) implementations silently ignore the entire enclosing TLV, preserving interoperability. A zero-length source prefix is represented by the absence of the sub-TLV rather than an explicit zero-length value.
Wildcard operations (wildcard retractions and wildcard route requests) are explicitly extended to apply to all routes regardless of source prefix, because wildcards are intended to apply to all routes including those decorated with data from future extensions.
The extension is interoperable with RFC 8966 base protocol routers: loop-avoidance properties are preserved when non-source-specific and source-specific routers are mixed. However, it is incompatible with RFC 6126 (the older Babel) because that version does not support mandatory sub-TLVs.
When non-source-specific routers and source-specific routers are mixed, route starvation may occur: non-source-specific routers discard source-specific routes, starving themselves of routes to destinations only announced by source-specific routers. A connected source-specific backbone with a non-source-specific default route can avoid this.
A node MUST NOT send a TLV with a zero-length source prefix; instead, it sends a TLV with no Source Prefix sub-TLV. Conversely, an extended implementation MUST interpret an unextended TLV as carrying a source prefix of zero length.
A node MUST NOT send a wildcard request that carries a source prefix, and a node receiving a wildcard request with a source prefix MUST ignore the request.
A node MUST NOT send a wildcard retraction with an attached source prefix, and a node that receives a wildcard retraction with a source prefix MUST ignore the retraction.
A node MUST NOT send more than one Source Prefix sub-TLV in a TLV, and a node receiving more than one Source Prefix sub-TLV in a single TLV MUST ignore the TLV. It MAY ignore the whole packet.
A node receiving a wildcard route request (AE=0) SHOULD send a full routing table dump, including routes with a non-zero length source prefix.
A node receiving an update with AE=0 and Metric=infinity (wildcard retraction) MUST apply the route acquisition procedure to all routes learned from the sending node, regardless of source prefix value.
A wildcard retraction (Update TLV with AE equal to 0) MUST NOT carry a Source Prefix sub-TLV.
An implementation MUST choose routing table entries by using destination-first ordering, where R1 is preferred to R2 when R1's destination prefix is more specific than R2's, or the destination prefixes are equal and R1's source prefix is more specific than R2's.
If a TLV with AE equal to 0 contains a Source Prefix sub-TLV, then the whole enclosing TLV MUST be ignored. If a TLV contains multiple Source Prefix sub-TLVs, then the whole TLV MUST be ignored.
If the Length field of a Source Prefix sub-TLV indicates a length smaller than 1+(Source Plen)/8 rounded up, the sub-TLV is corrupt and the whole enclosing TLV must be ignored; extra octets beyond the expected length MUST be silently ignored.
If the lower layers can hold source-specific routes but not with destination-first semantics, the Babel implementation MUST either silently ignore source-specific routes or disambiguate the routing table using a suitable disambiguation algorithm.
If the lower layers cannot hold source-specific routes, a Babel implementation MUST silently ignore any source-specific routes.
The Source Plen field in the Source Prefix sub-TLV MUST NOT be 0, since a zero-length source prefix must be represented by the absence of the sub-TLV entirely.
This extension MUST NOT be used in a routing domain where some routers implement RFC 6126 (the older Babel protocol), because RFC 6126 does not support mandatory sub-TLVs and persistent routing loops may occur.
Data from the original non-source-specific protocol is stored with a zero-length source prefix, ensuring backward-compatible representation in all extended data structures.
The route table is extended so each entry's source includes a source prefix; the table is now indexed by 5-tuples (prefix, plen, sprefix, splen, neighbour).
The Source Prefix sub-TLV (type 128) extends Update, Route Request, and Seqno Request TLVs to carry a source prefix alongside the destination prefix, enabling source-specific routing entries. It is a mandatory sub-TLV per RFC 8966 Section 4.4.
The source table is extended with a source prefix field (sprefix, splen) and is now indexed by 5-tuples of the form (prefix, plen, sprefix, splen, router-id) instead of the original 3-tuple.
The table of pending seqno requests is extended with a source prefix field (sprefix, splen) and is now indexed by 5-tuples of the form (prefix, plen, sprefix, splen, router-id).
IANA has allocated sub-TLV number 128 for the Source Prefix sub-TLV in the 'Babel Sub-TLV Types' registry.
Source-specific routing may invalidate route filtering used as a security mechanism: unless filters account for source-specific routes, a source-specific route could bypass filters and allow traffic to reach ostensibly protected network segments. Additionally, a host route is no longer guaranteed to be the most specific route, so using host routes to direct traffic through security devices (e.g., firewalls) may be bypassed.
The Source Prefix sub-TLV (Type=128) has a 1-octet Type field, 1-octet Length field, 1-octet Source Plen, and a variable-length Source Prefix field of ceil(Source Plen/8) octets. The body length is normally 1+ceil(Source Plen/8) octets.