BABELD(8)
β¨ BABELD β¨
okay bestie, welcome to the babeld manual page, section 8, straight out of the System Manager's Manual π this is the whole thing, no skips, no shortcuts, we're reading it together like the main characters we are π
π NAME π
babeld β ad-hoc network routing daemon π¦
π SYNOPSIS π
babeld option... [ -- ] interface...
π DESCRIPTION π
so Babel is a loop-avoiding distance-vector routing protocol, roughly based on DSDV and AODV, but with some extra provisions for estimating link cost and for redistributing routes from other routing protocols β¨
and listen, even though it's optimised for wireless mesh networks, Babel will also work efficiently on wired networks. versatile queen π
π OPTIONS π
-Vβ shows youbabeld's version and then dips. bye! π-mmulticast-address β sets the link-local multicast address the protocol uses. the default isff02:0:0:0:0:0:1:6β¨-pport β sets the UDP port number the protocol uses. the default is6696.-Sstate-file β names the file used for preserving long-term info between invocations of thebabelddaemon. > heads up bestie: if you delete this file, the daemon will run in passive mode for 3 minutes the next time it's started, and other hosts might initially ignore it π The default is/var/lib/babel-state.-hhello-interval β sets the interval in seconds at which scheduled hello packets are sent on wireless interfaces. the default is 4 seconds.-Hwired-hello-interval β sets the interval in seconds at which scheduled hello packets are sent on wired interfaces. the default is 4 seconds.-Mhalf-time β sets the half-time in seconds of the exponential decay used for smoothing metrics when doing route selection; a value of0disables smoothing entirely. the default is4s.-kpriority β sets the priority value used when installing routes into the kernel. the default is0.-Apriority β allows duplicating external routes when their kernel priority is at least priority. > π¨ do not use this option unless you genuinely know what you're doing, because it can cause persistent route flapping. like, persistent persistent. π-lβ usesIFF_RUNNING(carrier sense) when figuring out interface availability.-wβ don't optimise wired links; assumes all interfaces are wireless unless they're explicitly overridden in the configuration file.-sβ skips split-horizon processing on wired interfaces. (and just so you know, split-horizon isn't performed on wireless interfaces anyway π«Ά)-rβ uses a random router-id. the default is to use persistent router-ids derived from the MAC address of the first interface, which is easier to debug and more reliably prevents routing loops, but may sometimes cause a node to be unreachable for 120 seconds just after boot π tradeoffs, babe.-dlevel β debug level.1asks for a routing table dump at every iteration through the daemon's main loop.2additionally asks for tracing every message sent or received.3additionally dumps all interactions with the OS kernel. the default is0.-gport,-gpath β sets up a local configuration server on port, or at path, in read-only mode. the protocol is described in the section Local Configuration Protocol below π-Gport,-Gpath β sets up a local configuration server on port, or at path, in read-write mode. > β οΈ this lets any local user changebabeld's configuration, so it may therefore be a security issue. not the vibe, fr fr.-ttable β uses the given kernel routing table for routes inserted bybabeld.-Ttable β exports routes from the given kernel routing table. you can specify this multiple times to export routes from more than one table π₯-cfilename β names the configuration file. this flag can be repeated multiple times. the default is/etc/babeld.conf.-Cstatement β specifies a configuration statement directly on the command line. inline, iconic β¨-Dβ daemonises at startup.-Llogfile β names a file to log random ``how do you do?'' messages to. this defaults to standard error if not daemonising, and to/var/log/babeld.logotherwise.-Ipidfile β names a file to write our process id to; use no pidfile if it's set to the empty string. the default is/var/run/babeld.pid.- interface... β the list of interfaces on which the protocol should operate π
π CONFIGURATION FILE FORMAT π
the configuration file is a sequence of lines, and each line specifies either a global option, an interface specification, or a filtering rule. comments are introduced by an octothorp ``#'' and run until the end of the line π¦
Global options
protocol-groupgroup β specifies the link-local multicast address used by the protocol. equivalent to the command-line option-m.protocol-portport β specifies the UDP port number used by the protocol. equivalent to the command-line option-p.kernel-prioritypriority β specifies the priority value used when installing routes into the kernel. equivalent to the command-line option-k.reflect-kernel-metric{true|false}β reflect route metrics as kernel priorities. the priority effectively used iskernel-priority+ metric β¨allow-duplicatespriority β allows duplicating external routes when their kernel priority is at least priority. > π¨ don't use this option unless you know what you're doing, it can cause persistent route flapping.random-id{true|false}β specifies whether to use a random router-id. equivalent to the command-line option-r.ipv6-subtrees{true|false}β specifies whether to use native source-specific IPv6 forwarding instead of multiple routing tables. the default is chosen automatically depending on the kernel version.debuglevel β specifies the debugging level. equivalent to the command-line option-d.local-portport β specifies the TCP port on whichbabeldwill listen for connections from a configuration client in read-only mode. equivalent to the command-line option-g.local-port-readwriteport β specifies the TCP port on whichbabeldwill listen for connections from a configuration client in read-write mode. equivalent to the command-line option-G. > β οΈ this lets any local user changebabeld's configuration, and may therefore be a security issue.local-pathpath β specifies the filesystem path to a socket on whichbabeldwill listen for connections from a configuration client in read-only mode. equivalent to the command-line option-g.local-path-readwritepath β specifies the filesystem path to a socket on whichbabeldwill listen for connections from a configuration client in read-write mode. equivalent to the command-line option-G. > β οΈ any user with write access to that socket will be able to changebabeld's configuration. be so serious.export-tabletable β specifies the kernel routing table to use for routes inserted bybabeld. equivalent to the command-line option-t.import-tabletable β specifies a kernel routing table from which routes are redistributed bybabeld. can be specified multiple times with a cumulative effect. equivalent to the command-line option-T.kernel-check-intervalseconds β specifies the interval between two kernel routing table dumps. the default is300s(5 minutes). this may be set to0in order to never perform periodic kernel dumps πshutdown-delay-msmilliseconds β during shutdown we first notify neighbours of our imminent shutdown by sending route retractions, then wait for the specified number of milliseconds, and then flush kernel routes. this ensures any inflight traffic is still properly forwarded. you may want to make sure the delay is appropriate for the maximum delay path in your network. setting this to zero is permissible β¨link-detect{true|false}β specifies whether to use carrier sense for determining interface availability. equivalent to the command-line option-l.smoothing-half-lifeseconds β specifies the half-life in seconds of the exponential decay used for smoothing metrics when performing route selection. equivalent to the command-line option-M.daemonise{true|false}β specifies whether to daemonize at startup. equivalent to the command-line option-D.skip-kernel-setup{true|false}β if this flag is set, no kernel (sysctl) setup is performed on startup, and it's assumed that enabling forwarding, disabling redirects and disabling the reverse-path filter is done by other means. this can be useful when running in environments where system permissions prevent setting kernel parameters β for instance without root permissions, or inside a Linux container π«Άrouter-idid β specify the router-id explicitly, as a modified EUI-64 or a MAC-48 address. > π¨ if two nodes have the same router-id, bad things will happen. don't use this option unless you know what you are doing.state-filefilename β specifies the name of the file used for preserving long-term information between invocations of thebabelddaemon. equivalent to the command-line option-S.log-filefilename β specifies the name of the file used to log random messages to. equivalent to the command-line option-L.pid-filefilename β specifies the name of the file to whichbabeldwrites out its process id. equivalent to the command-line option-I.first-rule-prioritypriority β specifies the smallest (highest) rule priority used with source-specific routes. the default is100.keyid id type{hmac-sha256|blake2s128}value value β configure a key for use with thekeyinterface option. the type is one ofhmac-sha256orblake2s128. the value is a hexadecimal string (up to 64 bytes forhmac-sha256, up to 32 bytes forblake2s128) π
Interface configuration
an interface is configured by a line with the following format:
interface name [parameter...]
where name is the name of the interface (something like eth0). and the default value of an interface parameter can be specified changed by a line of the form
default [parameter...]
Each parameter can be one of:
type {auto|wired|wireless|tunnel}β sets what kind of interface this is. Defaults toautounless you passed the-wcommand-line flag. π¦link-quality {true|false|auto}β do we bother estimating link quality on this interface? Default is to do it on wireless interfaces only, no cap.split-horizon {true|false|auto}β should we do split-horizon processing here? Default is to do it on wired interfaces, unless the-sflag was set.rxcost costβ the cost of receiving frames on this interface under ideal conditions (like, zero packet loss π). How that maps to the actual cost used for computing route metrics depends on whether link quality estimation is happening. Default is256if the interface is wireless,96otherwise.hello-interval intervalβ the gap between hello packets on this interface. Default comes from the-hand-Hcommand-line flags.update-interval intervalβ the gap between full routing table dumps on this interface. Babel uses triggered updates and doesn't count to infinity, so you can set this pretty large β unless you're expecting significant packet loss. Default is four times the hello interval.enable-timestamps {true|false}β send timestamps with every Hello and IHU message so RTT values can be computed. Default istruefor tunnel interfaces,falseotherwise.unicast {true|false}β send multiple copies of TLVs other than Hellos to all neighbours instead of one multicast packet. Defaultfalse.rfc6126-compatible {true|false}β turn off features that aren't compatible with RFC 6126 (the older Babel protocol), like source-specific routing and RTT estimation over unicast. Defaultfalse.rtt-decay decayβ the decay factor for the exponential moving average of RTT samples, in units of1/256. Has to be between1and256, inclusive. Higher values throw out old samples faster. Default is42. β¨rtt-min rttβ the minimum RTT, in milliseconds, from which we start increasing the cost to a neighbour. The extra cost is linear in(rtt - rtt-min). Default is10 ms.rtt-max rttβ the maximum RTT, in milliseconds, above which we stop increasing the cost to a neighbour. Default is120 ms.max-rtt-penalty costβ the maximum cost added to a neighbour because of RTT, i.e. when the RTT is higher than or equal tortt-max. Default is96if the interface is of typetunnel, and0otherwise.v4-via-v6 {true|false}β whether to announce IPv4 routes through this interface even when there's no IPv4 address. Default depends on the kernel version. πprobe-mtu {true|false}β pad all packets containing a Hello TLV to the MTU and disable fragmentation. This avoids establishing adjacencies across links with a mis-configured MTU, at the cost of slightly higher network usage.key idβ enable HMAC security on this interface, and use the keyid. π₯accept-bad-signatures {true|false}β accept packets with no signature or a wrong one. Only does anything if a key was configured on an interface. Defaultfalse.
πΈ Filtering rules πΈ
A filtering rule is one single line, formatted like this:
filter selector... action
filter says which filter this entry gets added to, and it can be one of:
inβ applied to routes learned from Babel neighboursoutβ applied to routes announced to Babel neighboursredistributeβ applied to routes redistributed from the kernelinstallβ applied to routes installed into the kernel
Each selector says the conditions under which the statement matches. It can be one of:
ip prefixβ only applies to routes in the given prefix.eq plenβ only applies to routes with a prefix length equal toplen.le plenβ only applies to routes with a prefix length less or equal toplen.ge plenβ only applies to routes with a prefix length greater or equal toplen.src-ip prefixβ only applies to routes with a source prefix in the given prefix.src-eq plenβ only applies to routes with a source prefix length equal toplen.src-le plenβ only applies to routes with a source prefix length less or equal toplen.src-ge plenβ only applies to routes with a source prefix length greater or equal toplen.neigh addressβ only applies to routes learned from a neighbour with link-local addressaddress.id idβ only applies to routes originated by a router with router-idid.proto pβ only applies to kernel routes with kernel protocol numberp. If neitherprotonorlocalis specified, this entry applies to all non-local kernel routes with a protocol different from"boot". πlocalβ only applies to local addresses.if interfaceβ for an input filter, this is the interface over which the route is learned. For an output filter, it's the interface over which the route is advertised. For aredistributestatement, it's the interface over which the route forwards packets.
Action says what happens when the entry matches. It can be one of:
allowβ allow this route without changing its metric (or set its metric to0in the case of aredistributefilter).denyβ ignore this route. bye πmetric valueβ for an input or output filter, allow this route after increasing its metric byvalue. For aredistributefilter, redistribute this route with metricvalue.src-prefix prefixβ for aredistributefilter, set the source prefix of this route toprefix.table tableβ in aninstallfilter, specify the kernel routing table to use. For source-specific routes this only works reliably for IPv6, and only whenipv6-subtreesistrue. β οΈpref-src ipβ specify the preferred source address to use with this route. Only useful in aninstallfilter.
If action isn't specified, it defaults to allow.
By default, babeld redistributes all local addresses, and no other routes. So if you want to be sure only the routes you specify get redistributed, you should include the line
redistribute local deny
as the last line in your configuration file.
π LOCAL CONFIGURATION INTERFACE π
If babeld is invoked with the flag -g, it accepts TCP connections from local clients on the given port and address ::1 (the IPv6 localhost address), or on the given UNIX-domain socket path if the argument starts with β/β.
When a client connects, babeld replies with BABEL followed by the supported version of the local configuration protocol (currently 1.0). Then comes a number of informational lines (version etc.), terminated by ok. After that the client can send requests, one per line. To each request, babeld replies with one or more lines of data terminated by one of ok, no, or bad.
The following requests are currently defined:
- any configuration file directive, including
interface; flush interface;dump;monitorandunmonitor;quit.
π EXAMPLES π
You can participate in a Babel network by simply running
# babeld wlan0
where wlan0 is the name of your wireless interface. π
In order to gateway between multiple interfaces, just list them all on the command line:
# babeld wlan0 eth0 sit1
On an access point, you'll probably want to redistribute some external routes into Babel:
# babeld \
-C 'redistribute metric 256' \
wlan0
or, if you want to constrain the routes that you redistribute,
# babeld \
-C 'redistribute proto 11 ip ::/0 le 64 metric 256' \
-C 'redistribute proto 11 ip 0.0.0.0/0 le 24 metric 256' \
wlan0
π¦ Source-specific routing π¦
If your want to redistribute kernel routes as source-specific to the network, with the 2001:DB8:0:1::/64 prefix:
redistribute src-prefix 2001:DB8:0:1::/64
For more information about source-specific routing, please see
Matthieu Boutier and Juliusz Chroboczek. Source-sensitive
routing. In Proc. IFIP Networking 2015. 2015.
available online at
http://arxiv.org/pdf/1403.0445v4.pdf
π FILES π
/etc/babeld.confβ the default location of the configuration file./var/lib/babel-stateβ the default location of the file storing long-term state./var/run/babeld.pidβ the default location of the pid file./var/log/babeld.logβ the default location of the log file.
β SIGNALS β
SIGUSR1β dump Babel's routing tables to standard output or to the log file.SIGUSR2β check interfaces and kernel routes right now, then reopen the log file.
π¨ SECURITY π¨
Babel is a completely insecure protocol: any attacker able to inject IP packets with a link-local source address can disrupt the protocol's operation. This is no different from unsecured neighbour discovery or ARP. not great, not gonna lie π
Usage of the -G flag allows any user logged on the local host to change babeld's configuration. β οΈ
Since Babel uses link-local IPv6 packets only, there's no need to update firewalls to allow forwarding of Babel protocol packets. If local filtering is being done, UDP datagrams to the port used by the protocol should be allowed. And because Babel uses unicast packets in some cases, it's not enough to just allow packets destined to Babel's multicast address.
π«Ά SEE ALSO π«Ά
routed(8), route6d(8), zebra(8), ahcpd(8).
πΈ AUTHOR πΈ
Juliusz Chroboczek.
and that's a wrap bestie π
this whole page is from the BABELD(8) manual, and the footer is the source/version line plus the date β go check the original for the exact stamp, ily, bye πβ¨
π¦ where this page comes from
- alpine 3.24: babeld-doc 1.13.1-r0 Β· MIT
- arch rolling: babeld 1.14-1 Β· MIT
- debian trixie: babeld 1.13.1+ds-1 Β· MIT
- fedora 43: babeld 1.13.1-6.fc43 Β· MIT
- fedora 44: babeld 1.13.1-8.fc44 Β· MIT
- fedora 44: babeld 1.14-1.fc44 Β· MIT
- nixpkgs unstable: babeld 1.14
- ubuntu questing: babeld 1.13.1+ds-1
- ubuntu resolute: babeld 1.13.1+ds-1build1 Β· MIT
- ubuntu stonking: babeld 1.13.1+ds-1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms