Babel and AHCP FAQ

General questions

How do I get help?

Posting rate on babel-users

If this FAQ didn't solve your problem, please feel free to ask on the Babel-users mailing list.

You may browse the archives on Alioth, at Gmane using HTTP, at Gmane using NNTP, and at

How do I report a bug? How do I contribute?

eSend your bug reports to the Babel-users mailing list (no subscription required).

Send your improvements to the Babel-users mailing list. Both patches and git pull requests are welcome.

What is Babel? What is babeld?

Babel is a routing protocol that is designed to be efficient and robust on both normal wired networks (say, a bunch of Ethernets connected together) and on wireless networks. It is therefore particularly suitable for building hybrid networks — networks that are composed of both wired and wireless links.

The reference implementation of Babel is called babeld.

What is Babel-Z?

Babel-Z is an extension to the Babel protocol that is able to take radio interference into account when choosing routes. This is highly recommended if your mesh is running on multiple radio frequencies (e.g. with multiple radios in the 2.4 and 5 GHz bands).

The Babel-Z protocol extensions are described in Diversity Routing for the Babel Routing Protocol. You may also want to have a look at some information about Babel-Z.

The Babel-Z protocol is supported by the babeld binary — please see the diversity parameter in the manual page (or, equivalently, the -z flag).

What is Babel-RTT?

Babel-RTT is an extension to the Babel protocol that is able to automatically compute link latency and include it in its metric computation. This is particularly useful in overlay networks (networks built of tunnels), where a single hop can span much of the known universe.

The Babel-RTT protocol is supported by the babeld binary — please see the max-rtt-pentalty parameter in the manual page.

What is Babel-S?

Babel-S is an extension to the Babel protocol that enables source-specific routing. It is described in detail in source-specific Routing for the Babel Routing Protocol and the Source-Specific Routing paper.

Babel-S supported by the babeld binary. Please see the src-prefix filtering option in the manual page.

Do the variants of Babel interoperate?

All variants of Babel interoperate — you may run Babel-Z, Babel-RTT, Babel-S and plain Babel in the same network.

What is AHCP? What is ahcpd?

AHCP is a protocol that is able to distribute IP addresses in a mesh network, just like DHCP distributes IP addresses in a wired network. AHCP is routing-protocol agnostic: it can work with Babel, with OLSR, etc.

The sample implementation of AHCP is called ahcpd.

We are currently looking at replacing AHCP with a modified subset of HNCP.


Which implementation of Babel should I use?

For political reasons, the Quagga developers have removed Babel from the Quagga tree. We therefore recommend using the reference babeld implementation.

How do I perform redistribution?

Please see the babeld manual page and this posting giving a few examples of redistribution with babeld.

How do I configure a stub router?

A stub router is a router that has only one Babel interface, and that only installs default routes. For various reasons, OSPF and EIGRP have specific configuration options for stub routers, which Babel doesn't need.

The most efficient way is to configure the upstream router of your stub router to not announce any non-default routes. Suppose that A is your stub router, and that router B speaks to it over an interface eth1; then on B say something like:

out if eth1 ip ge 1 deny
out if eth1 ip ::/0 ge 1 deny

If you cannot reconfigure the upstream router B (for example because the link is shared with non-stub routers), you can discard the extraneous routes on A itself:

in ip ge 1 deny
in ip ::/0 ge 1 deny

If you are very short on space, sbabeld is a stub-only implementation of Babel.

How do I enable diversity routing?

diversity true

How do I enable RTT-based routing?

interface tun42 max-rtt-penalty 128

You need to do that on both sides of the tunnel.


What tools are there for debuginng Babel networks?

Network monitors  Tcpdump groks Babel starting with version 4.2.1. Wireshark has support since version 1.6.0.

Monitoring interface  You can ask babeld to dump its internal tables. With the standalone daemon, send a HUP1 signal to the daemon to get it to dump its tables to the log file. Alternatively, run babeld with the flag "-g 33123", and run telnet ::1 33123.

I am trying to simulate a wireless environment using firewall rules, and Babel doesn't find the right routes

The babeld daemon automatically detects wired interfaces, and makes a number of optimisations that are not correct for wireless interfaces. Your firewall rules probably broke the assumptions that make these optimisations correct on wired links.

You may disable these optimisations by running babeld with the -w flag, or by saying something like

interface eth0 wired false
in the /etc/babeld.conf file.

I'm trying to run Babel over a BATMAN interface, and Babel chooses the wrong routes

Please upgrade to 1.4.0 or later, which recognises BATMAN interfaces automatically.

I'm using tunnels and Babel chooses the wrong routes

Babeld version 1.5.0 and later has explicit support for tunnels, but it is not enabled by default. You will want to say something like:

interface tun-42 max-rtt-penalty 128

You need to do that on both sides of the tunnel.

Babel is still choosing the wrong routes

If everything else fails, you can manually tweak babeld's metrics by using filtering rules. For example, the following will cause babeld to deprecate the link towards the host with link-local address fe80::dead:beef:

in neigh fe80::dead:beef metric 512

If you want to forbid this link altogether, say:

in neigh fe80::dead:beef deny

In order to avoid all routes that go through a given interface, say:

in if wlan1 metric 512

Back to the Babel page.