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 (see -P below), and other hosts might ini‐
35              tially ignore it.  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       rtt-decay decay
333              This specifies the decay factor for the exponential moving aver‐
334              age  of  RTT  samples, in units of 1/256.  Must be between 1 and
335              256, inclusive.  Higher values discard old samples faster.   The
336              default is 42.
337
338       rtt-min rtt
339              This  specifies  the minimum RTT, in milliseconds, starting from
340              which we increase the cost to a neighbour. The  additional  cost
341              is linear in (rtt - rtt-min).  The default is 10 ms.
342
343       rtt-max rtt
344              This  specifies the maximum RTT, in milliseconds, above which we
345              don't increase the cost to a neighbour. The default is 120 ms.
346
347       max-rtt-penalty cost
348              This specifies the maximum cost added to a neighbour because  of
349              RTT,  i.e.  when  the  RTT is higher or equal than rtt-max.  The
350              default is 96 if the interface is of type tunnel, and  0  other‐
351              wise.
352
353   Filtering rules
354       A filtering rule is defined by a single line with the following format:
355
356              filter selector...  action
357
358       Filter  specifies the filter to which this entry will be added, and can
359       be one of in (applied to routes learned  from  Babel  neighbours),  out
360       (applied   to  routes  announced  to  Babel  neighbours),  redistribute
361       (applied to routes redistributed from the kernel), or install  (applied
362       to routes installed into the kernel).
363
364       Each  selector specifies the conditions under which the given statement
365       matches.  It can be one of
366
367       ip prefix
368              This entry only applies to routes in the given prefix.
369
370       eq plen
371              This entry only applies to routes with a prefix length equal  to
372              plen.
373
374       le plen
375              This  entry  only applies to routes with a prefix length less or
376              equal to plen.
377
378       ge plen
379              This entry only applies to routes with a prefix  length  greater
380              or equal to plen.
381
382       src-ip prefix
383              This  entry  only  applies to routes with a source prefix in the
384              given prefix.
385
386       src-eq plen
387              This entry only applies to routes with a  source  prefix  length
388              equal to plen.
389
390       src-le plen
391              This  entry  only  applies to routes with a source prefix length
392              less or equal to plen.
393
394       src-ge plen
395              This entry only applies to routes with a  source  prefix  length
396              greater or equal to plen.
397
398       neigh address
399              This  entry only applies to routes learned from a neighbour with
400              link-local address address.
401
402       id id  This entry only applies to routes originated by  a  router  with
403              router-id id.
404
405       proto p
406              This  entry  only  applies to kernel routes with kernel protocol
407              number p.  If neither proto nor local is specified,  this  entry
408              applies to all non-local kernel routes with a protocol different
409              from "boot".
410
411       local  This entry only applies to local addresses.
412
413       if interface
414              For an input filter, this specifies the interface over which the
415              route  is  learned.   For  an  output filter, this specifies the
416              interface over which this route is  advertised.   For  a  redis‐
417              tribute  statement,  this specifies the interface over which the
418              route forwards packets.
419
420       Action specifies the action to be taken when this  entry  matches.   It
421       can have one of the following values:
422
423       allow  Allow  this  route,  without changing its metric (or setting its
424              metric to 0 in case of a redistribute filter).
425
426       deny   Ignore this route.
427
428       metric value
429              For an input or output filter, allow this route after increasing
430              its  metric  by  value.  For a redistribute filter, redistribute
431              this route with metric value.
432
433       src-prefix prefix
434              For a redistribute filter, set the source prefix of  this  route
435              to prefix.
436
437       table table
438              In  an  install filter, specify the kernel routing table to use.
439              For source-specific routes, this only works reliably  for  IPv6,
440              and only when ipv6-subtrees is true.
441
442       If action is not specified, it defaults to allow.
443
444       By  default,  babeld  redistributes  all  local addresses, and no other
445       routes.  In order to make sure that only the  routes  you  specify  are
446       redistributed, you should include the line
447
448              redistribute local deny
449
450       as the last line in your configuration file.
451

LOCAL CONFIGURATION INTERFACE

453       If  babeld is invoked with the flag -g, it accepts TCP connections from
454       local clients on the given port and address  ::1  (the  IPv6  localhost
455       address),  or  on  the  given  UNIX-domain  socket path if the argument
456       starts with ‘/’.  When a client connects,  babeld  replies  with  BABEL
457       followed with the supported version of the local configuration protocol
458       (currently 1.0).  This is followed with a number of informational lines
459       (version  etc.),  terminated by ok.  The client can then send requests,
460       one per line.  To each request, babeld replies with one or  more  lines
461       of data terminated by one of ok, no, or bad.
462
463       The following requests are currently defined:
464
465       · any configuration file directive, including interface;
466
467       · flush interface;
468
469       · dump;
470
471       · monitor and unmonitor;
472
473       · quit.
474

EXAMPLES

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

FILES

517       /etc/babeld.conf
518              The default location of the configuration file.
519
520       /var/lib/babel-state
521              The default location of the file storing long-term state.
522
523       /var/run/babeld.pid
524              The default location of the pid file.
525
526       /var/log/babeld.log
527              The default location of the log file.
528

SIGNALS

530       SIGUSR1
531              Dump  Babel's  routing  tables  to standard output or to the log
532              file.
533
534       SIGUSR2
535              Check interfaces and kernel routes right now,  then  reopen  the
536              log file.
537

SECURITY

539       Babel is a completely insecure protocol: any attacker able to inject IP
540       packets with a link-local source address  can  disrupt  the  protocol's
541       operation.   This is no different from unsecured neighbour discovery or
542       ARP.
543
544       Usage of the -G flag allows any user logged on the local host to change
545       babeld's configuration.
546
547       Since  Babel  uses  link-local  IPv6  packets only, there is no need to
548       update firewalls to allow forwarding of  Babel  protocol  packets.   If
549       local  filtering  is  being done, UDP datagrams to the port used by the
550       protocol should be allowed.  As Babel  uses  unicast  packets  in  some
551       cases,  it is not enough to just allow packets destined to Babel's mul‐
552       ticast address.
553

SEE ALSO

555       routed(8), route6d(8), zebra(8), ahcpd(8).
556

AUTHOR

558       Juliusz Chroboczek.
559
560
561
562                                                                     BABELD(8)
Impressum