The Babel Routing Protocol
obsoletes
Extracted elements (32)
Babel uses an EIGRP-derived feasibility condition (FD = minimum metric ever advertised) rather than the simpler DSDV condition (FD = current metric). The EIGRP variant is strictly less restrictive: it allows alternate routes with metrics larger than the currently selected route to remain feasible, increasing the availability of loop-free fallback paths.
Sequence numbers are excluded from route selection to prevent route oscillation: while a new seqno propagates across the network, nodes would otherwise oscillate between routes with different seqnos but similar metrics, and non-left-distributive metrics could cause persistent black-holes. Seqnos are used only to determine feasibility, not route preference.
Update TLVs use a stateful parser to achieve compression: a Router-Id TLV can be shared among multiple subsequent Update TLVs, a Next Hop TLV establishes an implicit next hop per address family, and each Update TLV can omit a common subnet prefix shared with the previous Update in the same address family. This significantly reduces the bandwidth consumed by routing traffic in large networks.
When a prefix is originated by multiple routers, Babel maintains per-source (router-id, prefix) feasibility distances rather than per-prefix distances, because synchronising sequence numbers across distinct routers is impractical. This guarantees loop-freedom per source; loops involving routes from different originating routers are transient and bounded by the loop's diameter.
Babel nodes configured with different protocol parameters (Hello intervals, Update intervals, metric strategies) will successfully interoperate and will not create routing loops, as long as each node satisfies the mandatory properties of route selection (never select retracted or unfeasible routes) and metric computation (strictly monotonic). This heterogeneity is intentional to support mixed wired/wireless and battery/mains-powered deployments.
A Babel packet MUST be sent as the body of a UDP datagram with the network-layer hop count set to 1. Both source and destination UDP port are set to the well-known Babel port (6696). A Babel packet MUST be silently ignored unless its source address is a link-local IPv6 address or an IPv4 address on the local network, and its source port is the well-known Babel port.
A node SHOULD NOT increment its sequence number spontaneously, since increasing seqnos makes it less likely that other nodes will have feasible alternate routes when their selected routes fail. The seqno is only incremented in response to an explicit seqno request.
A node that has lost all feasible routes to a destination but still has unexpired unfeasible routes MUST send a seqno request with the router-id of the lost route and the source-table seqno plus 1. It MUST send the request to at least one next-hop neighbour advertising such a route.
A router-id MUST NOT consist of either all binary zeroes or all binary ones (0x0000000000000000 or 0xFFFFFFFFFFFFFFFF). These values are reserved and a Router-Id TLV carrying them is invalid.
A seqno request MUST NOT be forwarded to a multicast address and MUST NOT be forwarded to multiple neighbours simultaneously. A node MUST NOT increase its sequence number by more than 1 in reaction to a single seqno request.
An Acknowledgment TLV MUST be sent to a unicast destination because Opaque values are not globally unique. Sending all packets with Acknowledgment Requests is NOT RECOMMENDED, as the acknowledgments cause additional traffic and may force extra ARP or Neighbour Discovery exchanges.
Every Babel speaker MUST advertise each of its selected routes on every interface at least once every Update interval, providing the periodic full-dump that ensures eventual propagation of all reachable routes throughout the routing domain.
Packets with a first octet different from the magic value 42 (decimal) MUST be silently ignored. Packets with a second octet (Version) different from 2 MUST be silently ignored. This provides basic version and protocol filtering without sending any error response.
Parsing a TLV MUST update the parser state (router-id, next-hop, default prefix) even if the TLV is otherwise ignored due to an unknown mandatory sub-TLV or any other reason, ensuring that parser state remains identical across all implementations.
Route selection MUST NOT take sequence numbers into account; a route MUST NOT be preferred solely because it carries a higher (more recent) seqno. Doing otherwise would cause route oscillation while a new seqno propagates and might create persistent black-holes with non-left-distributive metrics.
Route selection SHOULD include hysteresis: the strategy should only switch from the currently selected route to a different route if the latter has been consistently better for some period of time, limiting oscillation when two parallel routes fluctuate around a common metric value.
The exclusive use of IPv6 for all Babel control traffic is RECOMMENDED, since running both IPv4 and IPv6 control instances simultaneously doubles the traffic devoted to neighbour discovery and link quality estimation.
The metric computation function M(c, m) MUST satisfy: M is infinite if the link cost c is infinite, and M is strictly monotonic (M(c, m) > m). The additive metric M(c, m) = c + m is the RECOMMENDED default, as it satisfies both required conditions and the desirable left-distributivity property.
When a prefix P is retracted and a shorter covering prefix P' is reachable, packets destined to addresses within P MUST NOT be forwarded via P'. To prevent this, an infinite-metric route table entry is maintained; the RECOMMENDED approach is to send a retraction with an acknowledgment request to each neighbour and await all ACKs, rather than waiting for the full expiry timer.
Whenever a node changes the selected router-id for a given destination, it MUST send a triggered update as an urgent TLV. The number of repeated copies MUST NOT exceed 5; the node SHOULD make a reasonable attempt to ensure all reachable neighbours receive this update (via acknowledgment requests or repetition).
The feasibility condition: a received update carrying distance (seqno', metric') is feasible if no source table entry exists for (prefix, plen, router-id), or if seqno' > seqno (stored), or if seqno' = seqno and metric' < metric (stored). Retractions (metric = 0xFFFF) are always feasible. This prevents routing loops by ensuring the forwarding graph remains acyclic.
The neighbour table is indexed by (interface, address) pairs and stores Hello reception histories for both Multicast and Unicast Hellos, the txcost from the most recent IHU, expected incoming seqnos, and associated timers. Neighbourship is a relationship between interfaces, not between nodes, so two multi-interface nodes may have multiple independent neighbourship relationships.
The source table records feasibility distances, indexed by triples (prefix, plen, router-id). Each entry stores the minimum (seqno, metric) distance ever advertised by the local node for that source. It is shared across all route table entries with the same source and is garbage-collected after a timer on the order of minutes.
RFC 8966 defines IANA registries for Babel: TLV Types (values 0–255, with 0=Pad1, 1=PadN, 2=AckRequest, 3=Ack, 4=Hello, 5=IHU, 6=Router-Id, 7=Next Hop, 8=Update, 9=Route Request, 10=Seqno Request, 11=TS/PC), Sub-TLV Types per enclosing TLV kind, and Address Encodings (AE 0–3). The well-known Babel UDP port is 6696.
Babel does not include built-in authentication or integrity protection. An on-link attacker can announce false routes, manipulate metrics, or trigger seqno changes. Security is provided by separate protocol extensions such as MAC-based authentication (RFC 8967). Babel's robustness against packet loss does not protect against active manipulation by a malicious on-link node.
When a route's expiry timer fires and the metric is finite, the metric is set to infinity and the timer is reset (first expiry). When the timer fires again with an already-infinite metric, the route is flushed from the route table entirely (second expiry). This two-stage expiry ensures neighbours receive at least one retraction.
A Babel packet begins with a 4-octet header: Magic (1 octet, value 42), Version (1 octet, value 2), and Body length (2 octets, big-endian), followed by the packet body (a sequence of TLVs) and an optional packet trailer. The trailer may only contain TLVs explicitly permitted there; among base TLVs only Pad1 and PadN are allowed.
Address Encoding (AE) values: AE 0 is the wildcard (0 octets); AE 1 is an IPv4 address (up to 4 octets, compression allowed); AE 2 is an IPv6 address (up to 16 octets, compression allowed); AE 3 is a link-local IPv6 address (8 octets, fe80::/64 implied, no compression). Prefixes are stored in the minimum number of octets needed to hold the significant bits.
All TLVs (except Pad1) use a Type (1 octet) / Length (1 octet, body length excluding Type and Length) / Payload structure. TLVs with unknown type values MUST be silently ignored. Sub-TLVs use an identical encoding; if the mandatory bit (0x80) of a sub-TLV type is set and the sub-TLV is unknown, the entire enclosing TLV MUST be silently ignored.
Relative times are encoded as 16-bit unsigned values in centiseconds (hundredths of a second), allowing times up to approximately 11 minutes with 10 ms granularity. This encoding is used in Hello Interval, IHU Interval, and AckRequest Interval fields.
The Hello TLV (Type=4) carries Flags (16-bit, U bit at 0x8000 distinguishes Unicast from Multicast Hello), Seqno (16-bit, the per-interface or per-neighbour counter), and Interval (16-bit centiseconds; 0 means unscheduled). The seqno counter MUST be incremented with every Hello sent.
The IHU TLV (Type=5) carries AE (1 octet), Reserved (1 octet), Rxcost (16-bit; 0xFFFF means unreachable), Interval (16-bit centiseconds, MUST NOT be 0), and Address (variable, no compression). The receiving node uses the Rxcost as its txcost and sets the IHU hold timer to a multiple of the Interval.