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       -d level
84              Debug level.  A value of 1 requests  a  routing  table  dump  at
85              every  iteration  through  the daemon's main loop.  A value of 2
86              additionally 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
102              babeld.
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
199              inserted 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
204              redistributed  by  babeld,  and  can be specified multiple times
205              with a cumulative effect.  This is equivalent  to  the  command-
206              line option -T.
207
208       link-detect {true|false}
209              This  specifies  whether  to  use  carrier sense for determining
210              interface availability, and is equivalent  to  the  command-line
211              option -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.  This  can be useful when running in environments where
235              system  permissions  prevent  setting  kernel  parameters,   for
236              instance inside a Linux container.
237
238       router-id id
239              Specify  the  router-id  explicitly,  as  a modified EUI-64 or a
240              MAC-48 address.  If two  nodes  have  the  same  router-id,  bad
241              things  will happen.  Don't use this option unless you know what
242              you are doing.
243
244       state-file filename
245              This specifies the name of the file used  for  preserving  long-
246              term  information  between invocations of the babeld daemon, and
247              is equivalent to the command-line option -S.
248
249       log-file filename
250              This specifies the name of the file used to log random  messages
251              to, and is equivalent to the command-line option -L.
252
253       pid-file filename
254              This  specifies  the name of the file to which babeld writes out
255              its process id, and is equivalent to the command-line option -I.
256
257       first-table-number table
258              This specifies the index of the first routing table to  use  for
259              source-specific routes.  The default is 10.
260
261       first-rule-priority priority
262              This  specifies  smallest  (highest)  rule  priority  used  with
263              source-specific routes.  The default is 100.
264
265   Interface configuration
266       An interface is configured by a line with the following format:
267
268              interface name [parameter...]
269
270       where name is the name of the interface  (something  like  eth0).   The
271       default  value  of an interface parameter can be specified changed by a
272       line of the form
273
274              default [parameter...]
275
276       Each parameter can be one of:
277
278       type {auto|wired|wireless|tunnel}
279
280              The default is auto unless the -w command-line flag  was  speci‐
281              fied.
282
283       link-quality {true|false|auto}
284              This  specifies  whether  link quality estimation should be per‐
285              formed on this interface.  The default is to perform link  qual‐
286              ity estimation on wireless interfaces only.
287
288       split-horizon {true|false|auto}
289              This  specifies  whether  to perform split-horizon processing on
290              this interface.  The default is to  perform  split-horizon  pro‐
291              cessing on on wired interfaces, unless the -s flag was set.
292
293       rxcost cost
294              This defines the cost of receiving frames on the given interface
295              under ideal conditions (no packet loss); how this relates to the
296              actual  cost  used for computing metrics of routes going through
297              this interface depends on whether  link  quality  estimation  is
298              being  done.   The  default is 256 if the interface is wireless,
299              and 96 otherwise.
300
301       channel channel
302              Sets the channel for this interface.  The value channel  can  be
303              either  an  integer, or one of the strings interfering or nonin‐
304              terfering.  The default is to autodetect the channel number  for
305              wireless interfaces, and noninterfering for other interfaces.
306
307       faraway {true|false}
308              This  specifies  whether the network is "far away", in the sense
309              that networks behind it don't interfere with networks  in  front
310              of it.  By default, networks are not far away.
311
312       hello-interval interval
313              This  defines  the  interval  between hello packets sent on this
314              interface.  The default is specified with the -h and -H command-
315              line flags.
316
317       update-interval interval
318              This  defines the interval between full routing table dumps sent
319              on this  interface;  since  Babel  uses  triggered  updates  and
320              doesn't  count  to  infinity,  this can be set to a fairly large
321              value, unless significant packet loss is expected.  The  default
322              is four times the hello interval.
323
324       enable-timestamps {true|false}
325              Enable  sending  timestamps  with  each Hello and IHU message in
326              order to compute RTT values.  The default  is  true  for  tunnel
327              interfaces, and false otherwise.
328
329       unicast {true|false}
330              Send multiple copies of TLVs other than Hellos to all neighbours
331              rather than sending a single multicast packet.  The  default  is
332              false.
333
334       rfc6126-compatible {true|false}
335              Disable  some  features that are incompatible with RFC 6126 (the
336              older version of the Babel protocol),  such  as  source-specific
337              routing and RTT estimation over unicast.  The default is false.
338
339       rtt-decay decay
340              This specifies the decay factor for the exponential moving aver‐
341              age of RTT samples, in units of 1/256.  Must be  between  1  and
342              256,  inclusive.  Higher values discard old samples faster.  The
343              default is 42.
344
345       rtt-min rtt
346              This specifies the minimum RTT, in milliseconds,  starting  from
347              which  we  increase the cost to a neighbour. The additional cost
348              is linear in (rtt - rtt-min).  The default is 10 ms.
349
350       rtt-max rtt
351              This specifies the maximum RTT, in milliseconds, above which  we
352              don't increase the cost to a neighbour. The default is 120 ms.
353
354       max-rtt-penalty cost
355              This  specifies the maximum cost added to a neighbour because of
356              RTT, i.e. when the RTT is higher or  equal  than  rtt-max.   The
357              default  is  96 if the interface is of type tunnel, and 0 other‐
358              wise.
359
360   Filtering rules
361       A filtering rule is defined by a single line with the following format:
362
363              filter selector...  action
364
365       Filter specifies the filter to which this entry will be added, and  can
366       be  one  of  in  (applied to routes learned from Babel neighbours), out
367       (applied  to  routes  announced  to  Babel  neighbours),   redistribute
368       (applied  to routes redistributed from the kernel), or install (applied
369       to routes installed into the kernel).
370
371       Each selector specifies the conditions under which the given  statement
372       matches.  It can be one of
373
374       ip prefix
375              This entry only applies to routes in the given prefix.
376
377       eq plen
378              This  entry only applies to routes with a prefix length equal to
379              plen.
380
381       le plen
382              This entry only applies to routes with a prefix length  less  or
383              equal to plen.
384
385       ge plen
386              This  entry  only applies to routes with a prefix length greater
387              or equal to plen.
388
389       src-ip prefix
390              This entry only applies to routes with a source  prefix  in  the
391              given prefix.
392
393       src-eq plen
394              This  entry  only  applies to routes with a source prefix length
395              equal to plen.
396
397       src-le plen
398              This entry only applies to routes with a  source  prefix  length
399              less or equal to plen.
400
401       src-ge plen
402              This  entry  only  applies to routes with a source prefix length
403              greater or equal to plen.
404
405       neigh address
406              This entry only applies to routes learned from a neighbour  with
407              link-local address address.
408
409       id id  This  entry  only  applies to routes originated by a router with
410              router-id id.
411
412       proto p
413              This entry only applies to kernel routes  with  kernel  protocol
414              number  p.   If neither proto nor local is specified, this entry
415              applies to all non-local kernel routes with a protocol different
416              from "boot".
417
418       local  This entry only applies to local addresses.
419
420       if interface
421              For an input filter, this specifies the interface over which the
422              route is learned.  For an  output  filter,  this  specifies  the
423              interface  over  which  this  route is advertised.  For a redis‐
424              tribute statement, this specifies the interface over  which  the
425              route forwards packets.
426
427       Action  specifies  the  action to be taken when this entry matches.  It
428       can have one of the following values:
429
430       allow  Allow this route, without changing its metric  (or  setting  its
431              metric to 0 in case of a redistribute filter).
432
433       deny   Ignore this route.
434
435       metric value
436              For an input or output filter, allow this route after increasing
437              its metric by value.  For a  redistribute  filter,  redistribute
438              this route with metric value.
439
440       src-prefix prefix
441              For  a  redistribute filter, set the source prefix of this route
442              to prefix.
443
444       table table
445              In an install filter, specify the kernel routing table  to  use.
446              For  source-specific  routes, this only works reliably for IPv6,
447              and only when ipv6-subtrees is true.
448
449       pref-src ip
450              Specify the preferred source address to  use  with  this  route.
451              Only useful in an install filter.
452
453       If action is not specified, it defaults to allow.
454
455       By  default,  babeld  redistributes  all  local addresses, and no other
456       routes.  In order to make sure that only the  routes  you  specify  are
457       redistributed, you should include the line
458
459              redistribute local deny
460
461       as the last line in your configuration file.
462

LOCAL CONFIGURATION INTERFACE

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

EXAMPLES

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

FILES

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

SIGNALS

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

SECURITY

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

SEE ALSO

566       routed(8), route6d(8), zebra(8), ahcpd(8).
567

AUTHOR

569       Juliusz Chroboczek.
570
571
572
573                                                                     BABELD(8)
Impressum