[Babel-users] Implementing Babel on Bird

Baptiste Jonglez baptiste.jonglez at ens-lyon.fr
Mon Nov 18 03:07:17 UTC 2013


Hi all,

Out of curiosity, I've investigated Bird [0] to see if Babel could easily
be implemented on top of it.  It turns out it doesn't, the reason is
detailed below.

Bird provides nice features for routing protocol programmers [1], such as
a neighbour cache [2] or an events architecture [3].  Besides, the
interface with the core is very well documented and looks quite clean.

It turns out that implementing Babel would be quite difficult, because of
a very questionable design choice: in Bird, IPv4 and IPv6 are *completely*
separated.

That is, you choose *at compile time* whether you want to use IPv4 or
IPv6.  It affects any structure, even the ip_addr structure.  This means
that you can't manipulate IPv4 addresses and IPv6 addresses at the same
time — which Babel does: it uses link-local IPv6 for communicating with
neighbours, while routes and next-hops can be IPv4 or IPv6 data.

It's fine when the protocol is single-stack (old BGP, OSPFv2/v3 or
RIP/RIPng), but not otherwise.  For instance, dual-stack BGP is impossible
with Bird, you need to run two distinct instances [4] — which is
cumbersome.

In the case of Babel, running two single-stack instances is not only
cumbersome, but also difficult to implement, since we need IPv6 link-local
even when working with IPv4 routes.


I see multiple solutions for implementing Babel on Bird:

1/ Only implement IPv6 Babel.

2/ Since Babel can use IPv4 to communicate between neighbours (see Section
   4. of RFC 6126), the IPv4 implementation could use that.  However, it
   wouldn't be interoperable with all known Babel implementations (babeld
   and Quagga).

3/ Redefine all needed structures and use link-local IPv6 anyway, even
   when compiled for IPv4.  This would be tedious, would require to bypass
   most Bird abstractions, and the resulting code would probably never
   make it upstream.


If somebody wants to implement Babel on Bird, the most reasonable option
seems to be 1/.  It would certainly earn Babel the title of "post-modern
routing protocol", but I'm sure some people will complain.

Baptiste


[0] http://bird.network.cz/
[1] http://bird.network.cz/?get_doc&f=prog.html
[2] http://bird.network.cz/?get_doc&f=prog-2.html#ss2.7
[3] http://bird.network.cz/?get_doc&f=prog-8.html#ss8.6
[4] https://gitlab.labs.nic.cz/labs/bird/wikis/FAQ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/babel-users/attachments/20131118/80d7dff9/attachment.sig>


More information about the Babel-users mailing list