The Babel protocol fully supports dual-stack operation: all data that represent a neighbour address or a network prefix are tagged by an Address Encoding (AE), a small integer that identifies the address family (IPv4 or IPv6) of the address of prefix and describes how it is encoded. This extension defines a new AE, called "v4-via-v6", which has the same format as the existing AE for IPv4 addresses (AE 1). This new AE is only allowed in TLVs that carry network prefixes: TLVs that carry an IPv6 neighbour address use one of the normal encodings for IPv6 addresses.
A Babel node can use a v4-via-v6 announcement to announce an IPv4 route over an interface that has no assigned IPv4 address. In order to do so, it first establishes an IPv6 next-hop address in the usual manner (either by sending the Babel packet over IPv6, or by including a Next Hop TLV containing an IPv6 address and using AE 2 or 3); it then sends an Update, with AE equal to 4 (v4-via-v6) containing the IPv4 prefix being announced.
If the outgoing interface has been assigned an IPv4 address, then, in the interest of maximising compatibility with existing routers, the sender
SHOULD prefer an ordinary IPv4 announcement; even in that case, however, it
MAY send a v4-via-v6 announcement. A node
SHOULD NOT send both ordinary IPv4 and v4-via-v6 announcements for the same prefix over a single interface (if the update is sent to a multicast address) or to a single neighbour (if sent to a unicast address), since doing that provides no benefit while doubling the amount of routing traffic.
Updates with infinite metric are retractions: they indicate that a previously announced route is no longer available. Retractions do not require a next hop; therefore, there is no difference between v4-via-v6 retractions and ordinary retractions. A node
MAY send IPv4 retractions only, or it
MAY send v4-via-v6 retractions on interfaces that have not been assigned an IPv4 address.
Upon reception of an Update TLV with AE equal to 4 (v4-via-v6) and finite metric, a Babel node computes the IPv6 next hop, as described in
Section 4.6.9 of
RFC 8966. If no IPv6 next hop exists, then the Update
MUST be ignored. If an IPv6 next hop exists, then the node
MAY acquire the route being announced, as described in
Section 3.5.3 of
RFC 8966; the parameters of the route are as follows:
-
The prefix, plen, router-id, seqno, and metric MUST be computed as for an IPv4 route, as described in Section 4.6.9 of RFC 8966.
-
The next hop MUST be computed as for an IPv6 route, as described in Section 4.6.9 of RFC 8966. It is taken from the last preceding Next Hop TLV with an AE field equal to 2 or 3; if no such entry exists and if the Update TLV has been sent in a Babel packet carried over IPv6, then the next hop is the network-layer source address of the packet.
An Update TLV with a v4-via-v6 AE and metric equal to infinity is a retraction: it announces that a previously available route is being retracted. In that case, no next hop is necessary, and the retraction is treated as described in
Section 4.6.9 of
RFC 8966.
As usual, a node
MAY ignore the update, e.g., due to filtering (see
Appendix C of
RFC 8966). If a node cannot install v4-via-v6 routes, e.g., due to hardware or software limitations, then routes to an IPv4 prefix with an IPv6 next hop
MUST NOT be selected.
Route and seqno requests are used to request an update for a given prefix. Since they are not related to a specific next hop, there is no semantic difference between IPv4 and v4-via-v6 requests. Therefore, a node
SHOULD NOT send requests of either kind with the AE field being set to 4 (v4-via-v6); instead, it
SHOULD request IPv4 updates by sending requests with the AE field being set to 1 (IPv4).
When receiving requests, AEs 1 (IPv4) and 4 (v4-via-v6)
MUST be treated in the same manner: the receiver processes the request as described in
Section 3.8 of
RFC 8966. If an Update is sent, then it
MAY be an ordinary IPv4 announcement (AE = 1) or a v4-via-v6 announcement (AE = 4), as described in
Section 2.1, irrespective of which AE was used in the request.
When receiving a request with AE 0 (wildcard), the receiver
SHOULD send a full route dump, as described in
Section 3.8.1.1 of
RFC 8966. Any IPv4 routes contained in the route dump may use either AE 1 (IPv4) or AE 4 (v4-via-v6), as described
Section 2.1.
The only other TLVs defined by [
RFC 8966] that carry an AE field are Next Hop and IHU. Next Hop and IHU TLVs
MUST NOT carry the AE 4 (v4-via-v6).