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
14       redistribution 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
28              default 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       -u     Do not flush unfeasible (useless) routes.   This  is  useful  in
84              order to announce more information to a front-end (see -g).
85
86       -d level
87              Debug  level.   A  value  of  1 requests a routing table dump at
88              every iteration through the daemon's main loop.  A  value  of  2
89              additionally requests tracing every message sent or received.  A
90              value of 3 additionally dumps all interactions with the OS  ker‐
91              nel.  The default is 0.
92
93       -g port, -g path
94              Set  up  a local configuration server on port port or at path in
95              read-only mode.  The protocol is described in the section  Local
96              Configuration Protocol below.
97
98       -G port, -G path
99              Set  up  a local configuration server on port port or at path in
100              read-write mode.  This allows any local user to change  babeld's
101              configuration, and may therefore be a security issue.
102
103       -t table
104              Use  the  given  kernel  routing  table  for  routes inserted by
105              babeld.
106
107       -T table
108              Export routes from the given kernel routing table. This  can  be
109              specified  multiple  times  in  order to export routes from more
110              than one table.
111
112       -c filename
113              Specify the name of the configuration file.  This  flag  can  be
114              repeated multiple times.  The default is /etc/babeld.conf.
115
116       -C statement
117              Specify a configuration statement directly on the command line.
118
119       -D     Daemonise at startup.
120
121       -L logfile
122              Specify  a  file  to  log random ``how do you do?'' messages to.
123              This defaults to standard  error  if  not  daemonising,  and  to
124              /var/log/babeld.log otherwise.
125
126       -I pidfile
127              Specify a file to write our process id to, use no pidfile if set
128              to the empty string.  The default is /var/run/babeld.pid.
129
130       interface...
131              The list of interfaces on which the protocol should operate.
132

CONFIGURATION FILE FORMAT

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

LOCAL CONFIGURATION INTERFACE

467       If babeld is invoked with the flag -g, it accepts TCP connections  from
468       local  clients  on  the  given port and address ::1 (the IPv6 localhost
469       address), or on the given  UNIX-domain  socket  path  if  the  argument
470       starts  with  ‘/’.   When  a client connects, babeld replies with BABEL
471       followed with the supported version of the local configuration protocol
472       (currently 1.0).  This is followed with a number of informational lines
473       (version etc.), terminated by ok.  The client can then  send  requests,
474       one  per  line.  To each request, babeld replies with one or more lines
475       of data terminated by one of ok, no, or bad.
476
477       The following requests are currently defined:
478
479       · any configuration file directive, including interface;
480
481       · flush interface;
482
483       · dump;
484
485       · monitor and unmonitor;
486
487       · quit.
488

EXAMPLES

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

FILES

531       /etc/babeld.conf
532              The default location of the configuration file.
533
534       /var/lib/babel-state
535              The default location of the file storing long-term state.
536
537       /var/run/babeld.pid
538              The default location of the pid file.
539
540       /var/log/babeld.log
541              The default location of the log file.
542

SIGNALS

544       SIGUSR1
545              Dump Babel's routing tables to standard output  or  to  the  log
546              file.
547
548       SIGUSR2
549              Check  interfaces  and  kernel routes right now, then reopen the
550              log file.
551

SECURITY

553       Babel is a completely insecure protocol: any attacker able to inject IP
554       packets  with  a  link-local  source address can disrupt the protocol's
555       operation.  This is no different from unsecured neighbour discovery  or
556       ARP.
557
558       Usage of the -G flag allows any user logged on the local host to change
559       babeld's configuration.
560
561       Since Babel uses link-local IPv6 packets only,  there  is  no  need  to
562       update  firewalls  to  allow  forwarding of Babel protocol packets.  If
563       local filtering is being done, UDP datagrams to the port  used  by  the
564       protocol  should  be  allowed.   As  Babel uses unicast packets in some
565       cases, it is not enough to just allow packets destined to Babel's  mul‐
566       ticast address.
567

SEE ALSO

569       routed(8), route6d(8), zebra(8), ahcpd(8).
570

AUTHOR

572       Juliusz Chroboczek.
573
574
575
576                                                                     BABELD(8)
Impressum