LinuxCommandLibrary

babeld

Run the Babel routing protocol

TLDR

Start the daemon with one or more [c]onfiguration files (read in order)

$ babeld -c [path/to/ports.conf] -c [path/to/filters.conf] -c [path/to/interfaces.conf]
copy

[D]eamonize after startup
$ babeld -D
copy

Specify a [C]onfiguration command
$ babeld -C '[redistribute metric 256]'
copy

Specify on which interfaces to operate
$ babeld [eth0] [eth1] [wlan0]
copy

SYNOPSIS

babeld [options] [interface ...]

PARAMETERS

-d, --debug=level
    Set debug verbosity level (0-42, default 0).

-D, --no-default-routes
    Don't install default routes automatically.

-C, --config=file
    Read configuration from file.

-f, --foreground
    Run in foreground (don't daemonise).

-F, --file=file
    Write PID to file.

-g, --group=group
    Set group ownership after startup.

-S, --script=script
    Run script on interface status changes.

-E, --export-filter=command
    Filter exported routes with external command.

-I, --insecure
    Skip interface security checks.

-s, --syslog
    Log to syslog instead of stderr.

-v, --version
    Print version and exit.

-h, --help
    Show usage summary.

-4, --ipv4
    Enable IPv4 routing.

-6, --ipv6
    Enable IPv6 routing (default).

-L, --label=net/prefix
    Add route label for filtering.

-P, --priority=value
    Set protocol priority (default 128).

-X, --exclude=iface
    Exclude iface from routing.

DESCRIPTION

Babel (babeld) is the reference implementation of the Babel routing protocol, a loop-free distance-vector protocol designed for mesh networks, particularly IPv6 networks with unstable links. It automatically discovers neighbors, computes routes based on estimated costs (accounting for packet loss and link quality), and supports self-healing topologies.

Key features include:
Feasibility distance to prevent loops without sequence numbers.
Link quality estimation using Hello and IHU (IHU=Hello Update) packets.
• Support for both IPv4 and IPv6 (native IPv6 preferred).
• Redistribution of static routes and from other protocols.
• Split-horizon, triggered updates for fast convergence.

Babel is lightweight, suitable for wireless mesh like WiFi ad-hoc, LoRa, or amateur radio networks. It handles partitions and merges gracefully, making it ideal for unstable environments where OSPF or BGP struggle. Install via package managers (e.g., apt install babeld) and run as a daemon, binding to specified interfaces. Routes are installed via kernel routing table or userspace forwarding.

CAVEATS

Requires CAP_NET_ADMIN for kernel route installation if not root. IPv6 preferred; IPv4 is secondary. No built-in authentication—use interface controls. High debug levels (-d >10) can impact performance.

CONFIGURATION

Uses /etc/babeld.conf or -C; syntax like 'redistribute local', 'protocol windows static metric 256'.

SIGNALS

SIGHUP: reload config; SIGUSR1: dump routes; SIGINT/TERM: shutdown gracefully.

HISTORY

Developed by Juliusz Chroboczek starting 2006; protocol paper published 2010 (SIGCOMM). First stable babeld release ~2011. Actively maintained, version 2.0+ added IPv4 support and improvements (2020s). Used in Freifunk, disaster response networks.

SEE ALSO

bird(8), frr(8), olsrd(8), bmx7(8)

Copied to clipboard