1BABELD(8)                   System Manager's Manual                  BABELD(8)
2
3
4

NAME

6       babeld - ad-hoc network routing daemon
7

SYNOPSIS

9       babeld option...  [ -- ] interface...
10

DESCRIPTION

12       Babel is a loop-avoiding distance-vector routing protocol roughly based
13       on DSDV and AODV, but with provisions for link cost estimation and  re‐
14       distribution of routes from other routing protocols.
15
16       While  it is optimised for wireless mesh networks, Babel will also work
17       efficiently on wired networks.
18

OPTIONS

20       -V     Display babeld's version and quit.
21
22       -m multicast-address
23              Specify the link-local multicast address to be used by the  pro‐
24              tocol.  The default is ff02:0:0:0:0:0:1:6.
25
26       -p port
27              Specify the UDP port number to be used by the protocol.  The de‐
28              fault is 6696.
29
30       -S state-file
31              Set the name of the file used for preserving long-term  informa‐
32              tion  between invocations of the babeld daemon.  If this file is
33              deleted, the daemon will run in passive mode for 3 minutes  when
34              it  is  next started, and other hosts might initially ignore it.
35              The default is /var/lib/babel-state.
36
37       -h hello-interval
38              Specify the interval in seconds at which scheduled hello packets
39              are sent on wireless interfaces.  The default is 4 seconds.
40
41       -H wired-hello-interval
42              Specify the interval in seconds at which scheduled hello packets
43              are sent on wired interfaces.  The default is 4 seconds.
44
45       -z kind [,factor]
46              Enable diversity-sensitive routing.  The value kind defines  the
47              diversity  algorithm used, and can be one of 0 (no diversity), 1
48              (per-interface diversity with no memory), 2 (per-channel  diver‐
49              sity  with no memory), or 3 (per-channel diversity with memory).
50              The value factor specifies by how much the cost of non-interfer‐
51              ing  routes is multiplied, in units of 1/256; the default is 128
52              (i.e. division by 2).
53
54       -M half-time
55              Specify the half-time in seconds of the exponential  decay  used
56              for  smoothing metrics for performing route selection; the value
57              0 disables smoothing.  The default is 4s.
58
59       -k priority
60              Specify the priority value used when installing routes into  the
61              kernel.  The default is 0.
62
63       -A priority
64              Allow  duplicating external routes when their kernel priority is
65              at least priority.  Do not use this option unless you know  what
66              you are doing, as it can cause persistent route flapping.
67
68       -l     Use  IFF_RUNNING  (carrier  sense)  when  determining  interface
69              availability.
70
71       -w     Don't optimise wired links, assume all interfaces  are  wireless
72              unless explicitly overridden in the configuration file.
73
74       -s     Do  not  perform  split-horizon  processing on wired interfaces.
75              Split-horizon is not performed on wireless interfaces.
76
77       -r     Use a random  router-id.   The  default  is  to  use  persistent
78              router-ids  derived from the MAC address of the first interface,
79              which is easier to debug  and  more  reliably  prevents  routing
80              loops  but  may sometimes cause a node to be unreachable for 120
81              seconds just after boot.
82
83       -d level
84              Debug level.  A value of 1 requests a routing table dump at  ev‐
85              ery  iteration through the daemon's main loop.  A value of 2 ad‐
86              ditionally requests tracing every message sent or  received.   A
87              value  of 3 additionally dumps all interactions with the OS ker‐
88              nel.  The default is 0.
89
90       -g port, -g path
91              Set up a local configuration server on port port or at  path  in
92              read-only  mode.  The protocol is described in the section Local
93              Configuration Protocol below.
94
95       -G port, -G path
96              Set up a local configuration server on port port or at  path  in
97              read-write  mode.  This allows any local user to change babeld's
98              configuration, and may therefore be a security issue.
99
100       -t table
101              Use the given kernel routing table for routes  inserted  by  ba‐
102              beld.
103
104       -T table
105              Export  routes  from the given kernel routing table. This can be
106              specified multiple times in order to  export  routes  from  more
107              than one table.
108
109       -c filename
110              Specify  the  name  of the configuration file.  This flag can be
111              repeated multiple times.  The default is /etc/babeld.conf.
112
113       -C statement
114              Specify a configuration statement directly on the command line.
115
116       -D     Daemonise at startup.
117
118       -L logfile
119              Specify a file to log random ``how do  you  do?''  messages  to.
120              This  defaults  to  standard  error  if  not daemonising, and to
121              /var/log/babeld.log otherwise.
122
123       -I pidfile
124              Specify a file to write our process id to, use no pidfile if set
125              to the empty string.  The default is /var/run/babeld.pid.
126
127       interface...
128              The list of interfaces on which the protocol should operate.
129

CONFIGURATION FILE FORMAT

131       The configuration file is a sequence of lines each of which specifies a
132       global option, an interface specification or a  filtering  rule.   Com‐
133       ments  are introduced by an octothorp ``#'' and terminate at the end of
134       the line.
135
136   Global options
137       protocol-group group
138              This specifies the link-local multicast address to  be  used  by
139              the protocol, and is equivalent to the command-line option -m.
140
141       protocol-port port
142              This  specifies  the UDP port number to be used by the protocol,
143              and is equivalent to the command-line option -p.
144
145       kernel-priority priority
146              This specifies the priority value used  when  installing  routes
147              into  the  kernel,  and is equivalent to the command-line option
148              -k.
149
150       reflect-kernel-metric {true|false}
151              Reflect route metrics as kernel priorities.  The priority effec‐
152              tively used is kernel-priority + metric.
153
154       allow-duplicates priority
155              This allows duplicating external routes when their kernel prior‐
156              ity is at least priority.  Do not use  this  option  unless  you
157              know  what you are doing, as it can cause persistent route flap‐
158              ping.
159
160       random-id {true|false}
161              This specifies whether to use a random router-id, and is equiva‐
162              lent to the command-line option -r.
163
164       ipv6-subtrees {true|false}
165              This  specifies  whether to use native source-specific IPv6 for‐
166              warding rather than multiple routing  tables.   The  default  is
167              chosen automatically depending on the kernel version.
168
169       debug level
170              This  specifies  the  debugging  level, and is equivalent to the
171              command-line option -d.
172
173       local-port port
174              This specifies the TCP port on which babeld will listen for con‐
175              nections  from  a configuration client in read-only mode, and is
176              equivalent to the command-line option -g.
177
178       local-port-readwrite port
179              This specifies the TCP port on which babeld will listen for con‐
180              nections  from a configuration client in read-write mode, and is
181              equivalent to the command-line option -G.  This allows any local
182              user  to  change  babeld's configuration, and may therefore be a
183              security issue.
184
185       local-path path
186              This specifies the filesystem path to a socket on  which  babeld
187              will listen for connections from a configuration client in read-
188              only mode, and is equivalent to the command-line option -g.
189
190       local-path-readwrite path
191              This specifies the filesystem path to a socket on  which  babeld
192              will listen for connections from a configuration client in read-
193              write mode, and is equivalent to  the  command-line  option  -G.
194              Any user with write access to that socket will be able to change
195              babeld's configuration.
196
197       export-table table
198              This specifies the kernel routing table to use  for  routes  in‐
199              serted  by  babeld, and is equivalent to the command-line option
200              -t.
201
202       import-table table
203              This specifies a kernel routing table from which routes are  re‐
204              distributed  by babeld, and can be specified multiple times with
205              a cumulative effect.  This is equivalent to the command-line op‐
206              tion -T.
207
208       link-detect {true|false}
209              This  specifies whether to use carrier sense for determining in‐
210              terface availability, and is equivalent to the command-line  op‐
211              tion -l.
212
213       diversity {true|false|kind}
214              This  specifies  the diversity algorithm to use; true is equiva‐
215              lent to kind 3.  The default is false (do not use any  diversity
216              algorithm).
217
218       diversity-factor factor
219              This  specifies  by  how much the cost of non-interfering routes
220              should be multiplied, in units of 1/256.   The  default  is  128
221              (division by 2).
222
223       smoothing-half-life seconds
224              This specifies the half-life in seconds of the exponential decay
225              used for smoothing metrics for performing route  selection,  and
226              is equivalent to the command-line option -M.
227
228       daemonise {true|false}
229              This  specifies  whether to daemonize at startup, and is equiva‐
230              lent to the command-line option -D.
231
232       skip-kernel-setup {true|false}
233              If this flag is set, no kernel (sysctl) setup  is  performed  on
234              startup,  and  it is assumed that enabling forwarding, disabling
235              redirects and disabling the reverse-path filter is performed  by
236              other  means.   This  can be useful when running in environments
237              where system permissions prevent setting kernel parameters,  for
238              instance without root permissions or inside a Linux container.
239
240       router-id id
241              Specify  the  router-id  explicitly,  as  a modified EUI-64 or a
242              MAC-48 address.  If two  nodes  have  the  same  router-id,  bad
243              things  will happen.  Don't use this option unless you know what
244              you are doing.
245
246       state-file filename
247              This specifies the name of the file used  for  preserving  long-
248              term  information  between invocations of the babeld daemon, and
249              is equivalent to the command-line option -S.
250
251       log-file filename
252              This specifies the name of the file used to log random  messages
253              to, and is equivalent to the command-line option -L.
254
255       pid-file filename
256              This  specifies  the name of the file to which babeld writes out
257              its process id, and is equivalent to the command-line option -I.
258
259       first-rule-priority priority
260              This  specifies  smallest  (highest)  rule  priority  used  with
261              source-specific routes.  The default is 100.
262
263       key id id type {hmac-sha256|blake2s128} value value
264              Configure a key for use with the key interface option.  The type
265              is one of hmac-sha256 or blake2s128.  The value is a hexadecimal
266              string  (up  to  64  bytes  for  hmac-sha256, up to 32 bytes for
267              blake2s128).
268
269   Interface configuration
270       An interface is configured by a line with the following format:
271
272              interface name [parameter...]
273
274       where name is the name of the interface (something like eth0).  The de‐
275       fault  value  of  an  interface parameter can be specified changed by a
276       line of the form
277
278              default [parameter...]
279
280       Each parameter can be one of:
281
282       type {auto|wired|wireless|tunnel}
283
284              The default is auto unless the -w command-line flag  was  speci‐
285              fied.
286
287       link-quality {true|false|auto}
288              This  specifies  whether  link quality estimation should be per‐
289              formed on this interface.  The default is to perform link  qual‐
290              ity estimation on wireless interfaces only.
291
292       split-horizon {true|false|auto}
293              This  specifies  whether  to perform split-horizon processing on
294              this interface.  The default is to  perform  split-horizon  pro‐
295              cessing on on wired interfaces, unless the -s flag was set.
296
297       rxcost cost
298              This defines the cost of receiving frames on the given interface
299              under ideal conditions (no packet loss); how this relates to the
300              actual  cost  used for computing metrics of routes going through
301              this interface depends on whether link quality estimation is be‐
302              ing  done.  The default is 256 if the interface is wireless, and
303              96 otherwise.
304
305       channel channel
306              Sets the channel for this interface.  The value channel  can  be
307              either  an  integer, or one of the strings interfering or nonin‐
308              terfering.  The default is to autodetect the channel number  for
309              wireless interfaces, and noninterfering for other interfaces.
310
311       faraway {true|false}
312              This  specifies  whether the network is "far away", in the sense
313              that networks behind it don't interfere with networks  in  front
314              of it.  By default, networks are not far away.
315
316       hello-interval interval
317              This defines the interval between hello packets sent on this in‐
318              terface.  The default is specified with the -h and  -H  command-
319              line flags.
320
321       update-interval interval
322              This  defines the interval between full routing table dumps sent
323              on this  interface;  since  Babel  uses  triggered  updates  and
324              doesn't  count  to  infinity,  this can be set to a fairly large
325              value, unless significant packet loss is expected.  The  default
326              is four times the hello interval.
327
328       enable-timestamps {true|false}
329              Enable sending timestamps with each Hello and IHU message in or‐
330              der to compute RTT values.  The default is true for  tunnel  in‐
331              terfaces, and false otherwise.
332
333       unicast {true|false}
334              Send multiple copies of TLVs other than Hellos to all neighbours
335              rather than sending a single multicast packet.  The  default  is
336              false.
337
338       rfc6126-compatible {true|false}
339              Disable  some  features that are incompatible with RFC 6126 (the
340              older version of the Babel protocol),  such  as  source-specific
341              routing and RTT estimation over unicast.  The default is false.
342
343       rtt-decay decay
344              This specifies the decay factor for the exponential moving aver‐
345              age of RTT samples, in units of 1/256.  Must be  between  1  and
346              256,  inclusive.  Higher values discard old samples faster.  The
347              default is 42.
348
349       rtt-min rtt
350              This specifies the minimum RTT, in milliseconds,  starting  from
351              which  we  increase the cost to a neighbour. The additional cost
352              is linear in (rtt - rtt-min).  The default is 10 ms.
353
354       rtt-max rtt
355              This specifies the maximum RTT, in milliseconds, above which  we
356              don't increase the cost to a neighbour. The default is 120 ms.
357
358       max-rtt-penalty cost
359              This  specifies the maximum cost added to a neighbour because of
360              RTT, i.e. when the RTT is higher or equal than rtt-max.  The de‐
361              fault is 96 if the interface is of type tunnel, and 0 otherwise.
362
363       Whether  to announce IPv4 routes through this interface even when there
364       is
365              no IPv4 address.  The default depends on the kernel version.
366
367       key id Enable HMAC security on this interface, and use the key id.
368
369       accept-bad-signatures {true|false}
370              Accept packets with no  signature  or  an  incorrect  signature.
371              This only has an effect if a key was configured on an interface.
372              The default is false.
373
374
375          Filtering rules
376              A filtering rule is defined by a single line with the  following
377              format:
378
379              filter selector...  action
380
381       Filter  specifies the filter to which this entry will be added, and can
382       be one of in (applied to routes learned  from  Babel  neighbours),  out
383       (applied  to  routes  announced to Babel neighbours), redistribute (ap‐
384       plied to routes redistributed from the kernel), or install (applied  to
385       routes installed into the kernel).
386
387       Each  selector specifies the conditions under which the given statement
388       matches.  It can be one of
389
390       ip prefix
391              This entry only applies to routes in the given prefix.
392
393       eq plen
394              This entry only applies to routes with a prefix length equal  to
395              plen.
396
397       le plen
398              This  entry  only applies to routes with a prefix length less or
399              equal to plen.
400
401       ge plen
402              This entry only applies to routes with a prefix  length  greater
403              or equal to plen.
404
405       src-ip prefix
406              This  entry  only  applies to routes with a source prefix in the
407              given prefix.
408
409       src-eq plen
410              This entry only applies to routes with a  source  prefix  length
411              equal to plen.
412
413       src-le plen
414              This  entry  only  applies to routes with a source prefix length
415              less or equal to plen.
416
417       src-ge plen
418              This entry only applies to routes with a  source  prefix  length
419              greater or equal to plen.
420
421       neigh address
422              This  entry only applies to routes learned from a neighbour with
423              link-local address address.
424
425       id id  This entry only applies to routes originated by  a  router  with
426              router-id id.
427
428       proto p
429              This  entry  only  applies to kernel routes with kernel protocol
430              number p.  If neither proto nor local is specified,  this  entry
431              applies to all non-local kernel routes with a protocol different
432              from "boot".
433
434       local  This entry only applies to local addresses.
435
436       if interface
437              For an input filter, this specifies the interface over which the
438              route  is learned.  For an output filter, this specifies the in‐
439              terface over which this route is advertised.  For a redistribute
440              statement,  this  specifies  the  interface over which the route
441              forwards packets.
442
443       Action specifies the action to be taken when this  entry  matches.   It
444       can have one of the following values:
445
446       allow  Allow  this  route,  without changing its metric (or setting its
447              metric to 0 in case of a redistribute filter).
448
449       deny   Ignore this route.
450
451       metric value
452              For an input or output filter, allow this route after increasing
453              its  metric  by  value.  For a redistribute filter, redistribute
454              this route with metric value.
455
456       src-prefix prefix
457              For a redistribute filter, set the source prefix of  this  route
458              to prefix.
459
460       table table
461              In  an  install filter, specify the kernel routing table to use.
462              For source-specific routes, this only works reliably  for  IPv6,
463              and only when ipv6-subtrees is true.
464
465       pref-src ip
466              Specify  the  preferred  source  address to use with this route.
467              Only useful in an install filter.
468
469       If action is not specified, it defaults to allow.
470
471       By default, babeld redistributes all  local  addresses,  and  no  other
472       routes.  In order to make sure that only the routes you specify are re‐
473       distributed, you should include the line
474
475              redistribute local deny
476
477       as the last line in your configuration file.
478

LOCAL CONFIGURATION INTERFACE

480       If babeld is invoked with the flag -g, it accepts TCP connections  from
481       local clients on the given port and address ::1 (the IPv6 localhost ad‐
482       dress), or on the given UNIX-domain socket path if the argument  starts
483       with  ‘/’.   When a client connects, babeld replies with BABEL followed
484       with the supported version of the local  configuration  protocol  (cur‐
485       rently  1.0).   This  is  followed with a number of informational lines
486       (version etc.), terminated by ok.  The client can then  send  requests,
487       one  per  line.  To each request, babeld replies with one or more lines
488       of data terminated by one of ok, no, or bad.
489
490       The following requests are currently defined:
491
492       • any configuration file directive, including interface;
493
494flush interface;
495
496dump;
497
498monitor and unmonitor;
499
500quit.
501

EXAMPLES

503       You can participate in a Babel network by simply running
504
505              # babeld wlan0
506
507       where wlan0 is the name of your wireless interface.
508
509       In order to gateway between multiple interfaces, just list them all  on
510       the command line:
511
512              # babeld wlan0 eth0 sit1
513
514       On  an access point, you'll probably want to redistribute some external
515       routes into Babel:
516
517              # babeld \
518                  -C 'redistribute metric 256' \
519                  wlan0
520
521       or, if you want to constrain the routes that you redistribute,
522
523              # babeld \
524                  -C 'redistribute proto 11 ip ::/0 le 64 metric 256' \
525                  -C 'redistribute proto 11 ip 0.0.0.0/0 le 24 metric 256' \
526                  wlan0
527
528   Source-specific routing
529       If your want to redistribute kernel routes as  source-specific  to  the
530       network, with the 2001:DB8:0:1::/64 prefix:
531
532              redistribute src-prefix 2001:DB8:0:1::/64
533
534       For more information about source-specific routing, please see
535
536              Matthieu Boutier and Juliusz Chroboczek.  Source-sensitive rout‐
537              ing.  In Proc. IFIP Networking 2015.  2015.
538
539       available online at
540
541              http://arxiv.org/pdf/1403.0445v4.pdf
542

FILES

544       /etc/babeld.conf
545              The default location of the configuration file.
546
547       /var/lib/babel-state
548              The default location of the file storing long-term state.
549
550       /var/run/babeld.pid
551              The default location of the pid file.
552
553       /var/log/babeld.log
554              The default location of the log file.
555

SIGNALS

557       SIGUSR1
558              Dump Babel's routing tables to standard output  or  to  the  log
559              file.
560
561       SIGUSR2
562              Check  interfaces  and  kernel routes right now, then reopen the
563              log file.
564

SECURITY

566       Babel is a completely insecure protocol: any attacker able to inject IP
567       packets with a link-local source address can disrupt the protocol's op‐
568       eration.  This is no different from unsecured  neighbour  discovery  or
569       ARP.
570
571       Usage of the -G flag allows any user logged on the local host to change
572       babeld's configuration.
573
574       Since Babel uses link-local IPv6 packets only, there is no need to  up‐
575       date firewalls to allow forwarding of Babel protocol packets.  If local
576       filtering is being done, UDP datagrams to the port used by the protocol
577       should  be allowed.  As Babel uses unicast packets in some cases, it is
578       not enough to just allow packets destined to Babel's multicast address.
579

SEE ALSO

581       routed(8), route6d(8), zebra(8), ahcpd(8).
582

AUTHOR

584       Juliusz Chroboczek.
585
586
587
588                                                                     BABELD(8)
Impressum