Blame view

babeld.man 19.8 KB
Juliusz Chroboczek committed
1
.TH BABELD 8
Juliusz Chroboczek committed
2
.SH NAME
Juliusz Chroboczek committed
3
babeld \- ad-hoc network routing daemon
Juliusz Chroboczek committed
4
.SH SYNOPSIS
Juliusz Chroboczek committed
5
.B babeld
Juliusz Chroboczek committed
6
.IR option ...
Juliusz Chroboczek committed
7 8
[
.B \-\-
Juliusz Chroboczek committed
9
]
Juliusz Chroboczek committed
10 11
.IR interface ...
.SH DESCRIPTION
Juliusz Chroboczek committed
12
Babel is a loop-avoiding distance-vector routing protocol roughly
Juliusz Chroboczek committed
13
based on DSDV and AODV, but with provisions for link cost estimation
Juliusz Chroboczek committed
14
and redistribution of routes from other routing protocols.
Juliusz Chroboczek committed
15

Juliusz Chroboczek committed
16
While it is optimised for wireless mesh networks, Babel will also work
Juliusz Chroboczek committed
17
efficiently on wired networks.
Juliusz Chroboczek committed
18 19
.SH OPTIONS
.TP
Juliusz Chroboczek committed
20 21 22
.BI \-V
Display babeld's version and quit.
.TP
Juliusz Chroboczek committed
23 24
.BI \-m " multicast-address"
Specify the link-local multicast address to be used by the protocol.
Juliusz Chroboczek committed
25
The default is
Juliusz Chroboczek committed
26
.BR ff02:0:0:0:0:0:1:6 .
Juliusz Chroboczek committed
27 28
.TP
.BI \-p " port"
Gabriel Kerneis committed
29
Specify the UDP port number to be used by the protocol.  The default is
Juliusz Chroboczek committed
30
.BR 6696 .
Juliusz Chroboczek committed
31 32 33 34
.TP
.BI \-S " state-file"
Set the name of the file used for preserving long-term information
between invocations of the
Juliusz Chroboczek committed
35
.B babeld
Juliusz Chroboczek committed
36
daemon.  If this file is deleted, the daemon will run in passive mode
Juliusz Chroboczek committed
37
for 3 minutes when it is next started (see
Juliusz Chroboczek committed
38
.B -P
Juliusz Chroboczek committed
39
below), and other hosts might initially ignore it.  The default is
Juliusz Chroboczek committed
40
.BR /var/lib/babel-state .
Juliusz Chroboczek committed
41 42
.TP
.BI \-h " hello-interval"
Juliusz Chroboczek committed
43
Specify the interval in seconds at which scheduled hello packets are
Juliusz Chroboczek committed
44
sent on wireless interfaces.  The default is 4 seconds.
Juliusz Chroboczek committed
45 46
.TP
.BI \-H " wired-hello-interval"
Juliusz Chroboczek committed
47
Specify the interval in seconds at which scheduled hello packets are
Juliusz Chroboczek committed
48
sent on wired interfaces.  The default is 4 seconds.
Juliusz Chroboczek committed
49
.TP
Juliusz Chroboczek committed
50
.BI \-z " kind" " \fR[\fB," factor "\fR]"
Juliusz Chroboczek committed
51 52 53 54 55 56 57 58 59 60 61 62 63
Enable diversity-sensitive routing.  The value
.B kind
defines the diversity algorithm used, and can be one of
.B 0
(no diversity),
.B 1
(per-interface diversity with no memory),
.B 2
(per-channel diversity with no memory),
or
.B 3
(per-channel diversity with memory).
The value
Juliusz Chroboczek committed
64
.B factor
Juliusz Chroboczek committed
65 66
specifies by how much the cost of non-interfering routes is multiplied,
in units of 1/256; the default is 128 (i.e. division by 2).
Juliusz Chroboczek committed
67
.TP
Juliusz Chroboczek committed
68 69 70 71 72
.BI \-M " half-time"
Specify the half-time in seconds of the exponential decay used for
smoothing metrics for performing route selection; the value 0 disables
smoothing.  The default is 4s.
.TP
Juliusz Chroboczek committed
73 74 75
.BI \-k " priority"
Specify the priority value used when installing routes into the kernel.
The default is 0.
Juliusz Chroboczek committed
76
.TP
Juliusz Chroboczek committed
77 78 79 80 81 82
.BI \-A " priority"
Allow duplicating external routes when their kernel priority is at least
.IR priority .
Do not use this option unless you know what you are doing, as it can cause
persistent route flapping.
.TP
Juliusz Chroboczek committed
83 84 85
.B \-l
Use IFF_RUNNING (carrier sense) when determining interface availability.
.TP
Juliusz Chroboczek committed
86
.B \-w
Juliusz Chroboczek committed
87 88
Don't optimise wired links, assume all interfaces are wireless unless
explicitly overridden in the configuration file.
Juliusz Chroboczek committed
89
.TP
Juliusz Chroboczek committed
90 91
.B \-s
Do not perform split-horizon processing on wired interfaces.
Juliusz Chroboczek committed
92
Split-horizon is not performed on wireless interfaces.
Juliusz Chroboczek committed
93
.TP
Juliusz Chroboczek committed
94 95 96 97 98 99
.B \-r
Use a random router-id.  The default is to use persistent router-ids
derived from the MAC address of the first interface, which is easier
to debug and more reliably prevents routing loops but may sometimes
cause a node to be unreachable for 120 seconds just after boot.
.TP
Juliusz Chroboczek committed
100 101 102 103 104
.B \-u
Do not flush unfeasible (useless) routes.  This is useful in order to
announce more information to a front-end (see
.BR \-g ).
.TP
Juliusz Chroboczek committed
105 106 107
.BI \-d " level"
Debug level.  A value of 1 requests a routing table dump at every
iteration through the daemon's main loop.  A value of 2 additionally
Juliusz Chroboczek committed
108 109 110
requests tracing every message sent or received.  A value of
3 additionally dumps all interactions with the OS kernel.  The default
is 0.
Juliusz Chroboczek committed
111
.TP
Julien Cristau committed
112
.BI \-g " port\fR,\fP" " \-g" " path"
Juliusz Chroboczek committed
113 114
Set up a local configuration server on port
.I port
Julien Cristau committed
115 116
or at
.I path
Juliusz Chroboczek committed
117
in read-only mode.  The protocol is described in the section
Juliusz Chroboczek committed
118 119
.B Local Configuration Protocol
below.
Juliusz Chroboczek committed
120
.TP
Julien Cristau committed
121
.BI \-G " port\fR,\fP" " \-G" " path"
Juliusz Chroboczek committed
122 123
Set up a local configuration server on port
.I port
Julien Cristau committed
124 125
or at
.I path
Juliusz Chroboczek committed
126 127 128 129
in read-write mode.  This allows any local user to change
.BR babeld 's
configuration, and may therefore be a security issue.
.TP
Juliusz Chroboczek committed
130
.BI \-t " table"
Juliusz Chroboczek committed
131 132
Use the given kernel routing table for routes inserted by
.BR babeld .
Juliusz Chroboczek committed
133 134
.TP
.BI \-T " table"
135 136 137
Export routes from the given kernel routing table. This can be
specified multiple times in order to export routes from more than one
table.
Juliusz Chroboczek committed
138
.TP
Juliusz Chroboczek committed
139
.BI \-c " filename"
Juliusz Chroboczek committed
140 141
Specify the name of the configuration file.  This flag can be repeated
multiple times.  The default is
Juliusz Chroboczek committed
142
.BR /etc/babeld.conf .
Juliusz Chroboczek committed
143
.TP
Juliusz Chroboczek committed
144 145 146
.BI \-C " statement"
Specify a configuration statement directly on the command line.
.TP
Juliusz Chroboczek committed
147 148 149 150 151 152
.B \-D
Daemonise at startup.
.TP
.BI \-L " logfile"
Specify a file to log random ``how do you do?'' messages to.  This
defaults to standard error if not daemonising, and to
Juliusz Chroboczek committed
153
.B /var/log/babeld.log
Juliusz Chroboczek committed
154 155 156
otherwise.
.TP
.BI \-I " pidfile"
Juliusz Chroboczek committed
157 158
Specify a file to write our process id to, use no pidfile if set to the
empty string.  The default is
Juliusz Chroboczek committed
159
.BR /var/run/babeld.pid .
Juliusz Chroboczek committed
160
.TP
Juliusz Chroboczek committed
161 162
.IR interface ...
The list of interfaces on which the protocol should operate.
Juliusz Chroboczek committed
163
.SH CONFIGURATION FILE FORMAT
Juliusz Chroboczek committed
164
The configuration file is a sequence of lines each of which specifies
Juliusz Chroboczek committed
165 166
a global option, an interface specification or a filtering
rule.  Comments are introduced by an octothorp
Juliusz Chroboczek committed
167
.RB `` # ''
Juliusz Chroboczek committed
168
and terminate at the end of the line.
Juliusz Chroboczek committed
169 170 171 172 173 174 175 176 177 178
.SS Global options
.TP
.BI protocol-group " group"
This specifies the link-local multicast address to be used by the
protocol, and is equivalent to the command-line option
.BR \-m .
.TP
.BI protocol-port " port"
This specifies the UDP port number to be used by the protocol, and is equivalent to the command-line option
.BR \-p .
Juliusz Chroboczek committed
179 180 181 182 183 184
.TP
.BI kernel-priority " priority"
This specifies the priority value used when installing routes into the
kernel, and is equivalent to the command-line option
.BR \-k .
.TP
Juliusz Chroboczek committed
185 186 187 188 189 190 191
.BR reflect-kernel-metric " {" true | false }
Reflect route metrics as kernel priorities.  The priority effectively used
is
.B kernel-priority
+
.BR metric .
.TP
Juliusz Chroboczek committed
192 193 194 195 196 197 198
.BI allow-duplicates " priority"
This allows duplicating external routes when their kernel priority is
at least
.IR priority .
Do not use this option unless you know what you are doing, as it can
cause persistent route flapping.
.TP
Gabriel Kerneis committed
199 200 201 202 203
.BR random-id " {" true | false }
This specifies whether to use a random router-id, and is
equivalent to the command-line option
.BR \-r .
.TP
Matthieu Boutier committed
204
.BR ipv6-subtrees " {" true | false }
Juliusz Chroboczek committed
205
This specifies whether to use native source-specific IPv6 forwarding
Matthieu Boutier committed
206 207
rather than multiple routing tables.  The default is chosen automatically
depending on the kernel version.
Matthieu Boutier committed
208
.TP
Juliusz Chroboczek committed
209 210 211 212 213 214 215 216
.BI debug " level"
This specifies the debugging level, and is equivalent to the command-line
option
.BR \-d .
.TP
.BI local-port " port"
This specifies the TCP port on which
.B babeld
Juliusz Chroboczek committed
217 218
will listen for connections from a configuration client in read-only mode,
and is equivalent to the command-line option
Juliusz Chroboczek committed
219
.BR \-g .
Juliusz Chroboczek committed
220
.TP
Juliusz Chroboczek committed
221 222 223 224 225
.BI local-port-readwrite " port"
This specifies the TCP port on which
.B babeld
will listen for connections from a configuration client in read-write mode,
and is equivalent to the command-line option
Julien Cristau committed
226 227
.BR \-G .
This allows any local user to change
Juliusz Chroboczek committed
228 229 230
.BR babeld 's
configuration, and may therefore be a security issue.
.TP
Julien Cristau committed
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
.BI local-path " path"
This specifies the filesystem path to a socket on which
.B babeld
will listen for connections from a configuration client in read-only mode,
and is equivalent to the command-line option
.BR \-g .
.TP
.BI local-path-readwrite " path"
This specifies the filesystem path to a socket on which
.B babeld
will listen for connections from a configuration client in read-write mode,
and is equivalent to the command-line option
.BR \-G .
Any user with write access to that socket will be able to change
.BR babeld 's
configuration.
.TP
Juliusz Chroboczek committed
248 249 250 251 252 253 254
.BI export-table " table"
This specifies the kernel routing table to use for routes inserted by
.BR babeld ,
and is equivalent to the command-line option
.BR \-t .
.TP
.BI import-table " table"
Juliusz Chroboczek committed
255
This specifies a kernel routing table from which routes are
Juliusz Chroboczek committed
256 257
redistributed by
.BR babeld ,
Juliusz Chroboczek committed
258 259
and can be specified multiple times with a cumulative effect.  This is
equivalent to the command-line option
Juliusz Chroboczek committed
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
.BR \-T .
.TP
.BR link-detect " {" true | false }
This specifies whether to use carrier sense for determining interface
availability, and is equivalent to the command-line option
.BR \-l .
.TP
.BR diversity " {" true | false | "\fIkind\fB" }
This specifies the diversity algorithm to use;
.B true
is equivalent to
.I kind
3.  The default is
.B false
(do not use any diversity algorithm).
.TP
.BI diversity-factor " factor"
This specifies by how much the cost of non-interfering routes should
be multiplied, in units of 1/256.  The default is 128 (division by 2).
.TP
.BI smoothing-half-life " seconds"
This specifies the half-life in seconds of the exponential decay used
for smoothing metrics for performing route selection, and is
equivalent to the command-line option
.BR \-M .
Juliusz Chroboczek committed
285
.TP
Gabriel Kerneis committed
286
.BR daemonise " {" true | false }
Juliusz Chroboczek committed
287 288 289
This specifies whether to daemonize at startup, and is equivalent to
the command-line option
.BR \-D .
290 291 292 293 294
.TP
.BR skip-kernel-setup " {" true | false }
If this flag is set, no kernel (sysctl) setup is performed on startup. This can
be useful when running in environments where system permissions prevent setting
kernel parameters, for instance inside a Linux container.
Juliusz Chroboczek committed
295 296 297 298 299
.TP
.BI router-id " id"
Specify the router-id explicitly, as a modified EUI-64 or a MAC-48
address.  If two nodes have the same router-id, bad things will happen.
Don't use this option unless you know what you are doing.
Juliusz Chroboczek committed
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
.TP
.BI state-file " filename"
This specifies the name of the file used for preserving long-term
information between invocations of the
.B babeld
daemon, and is equivalent to the command-line option
.BR \-S .
.TP
.BI log-file " filename"
This specifies the name of the file used to log random messages to,
and is equivalent to the command-line option
.BR \-L .
.TP
.BI pid-file " filename"
This specifies the name of the file to which
.B babeld
writes out its process id, and is equivalent to the command-line option
.BR \-I .
Matthieu Boutier committed
318 319 320 321 322 323 324 325
.TP
.BI first-table-number " table"
This specifies the index of the first routing table to use for
source-specific routes.  The default is 10.
.TP
.BI first-rule-priority " priority"
This specifies smallest (highest) rule priority used with source-specific
routes.  The default is 100.
Juliusz Chroboczek committed
326
.SS Interface configuration
Juliusz Chroboczek committed
327
An interface is configured by a line with the following format:
Juliusz Chroboczek committed
328
.IP
Juliusz Chroboczek committed
329 330 331 332
.B interface
.I name
.RI [ parameter ...]
.PP
Juliusz Chroboczek committed
333 334
where
.I name
Juliusz Chroboczek committed
335 336
is the name of the interface (something like
.BR eth0 ).
Juliusz Chroboczek committed
337 338
The default value of an interface parameter can be specified changed
by a line of the form
Juliusz Chroboczek committed
339 340 341 342
.IP
.B default
.RI [ parameter ...]
.PP
Juliusz Chroboczek committed
343 344 345

Each
.I parameter
Juliusz Chroboczek committed
346
can be one of:
Juliusz Chroboczek committed
347
.TP
Juliusz Chroboczek committed
348 349 350 351 352
.BR type " {" auto | wired | wireless | tunnel }

The default is
.B auto
unless the
Juliusz Chroboczek committed
353 354 355
.B \-w
command-line flag was specified.
.TP
Juliusz Chroboczek committed
356
.BR link\-quality " {" true | false | auto }
Juliusz Chroboczek committed
357 358
This specifies whether link quality estimation should be performed on this
interface.  The default is to perform link quality estimation on wireless
Juliusz Chroboczek committed
359
interfaces only.
Juliusz Chroboczek committed
360
.TP
Juliusz Chroboczek committed
361
.BR split\-horizon " {" true | false | auto }
Juliusz Chroboczek committed
362
This specifies whether to perform split-horizon processing on this
Juliusz Chroboczek committed
363 364
interface.  The default is to perform split-horizon processing on
on wired interfaces, unless the
Juliusz Chroboczek committed
365
.B \-s
Juliusz Chroboczek committed
366
flag was set.
Juliusz Chroboczek committed
367
.TP
Juliusz Chroboczek committed
368
.BI rxcost " cost"
Juliusz Chroboczek committed
369
This defines the cost of receiving frames on the given interface under
Juliusz Chroboczek committed
370 371 372 373
ideal conditions (no packet loss); how this relates to the actual cost
used for computing metrics of routes going through this interface depends
on whether link quality estimation is being done.  The default is 256 if
the interface is wireless, and 96 otherwise.
Juliusz Chroboczek committed
374
.TP
Juliusz Chroboczek committed
375 376 377 378 379 380 381 382 383 384
.BI channel " channel"
Sets the channel for this interface.  The value
.I channel
can be either an integer, or one of the strings
.B interfering
or
.BR noninterfering .
The default is to autodetect the channel number for wireless interfaces,
and
.B noninterfering
Juliusz Chroboczek committed
385
for other interfaces.
Juliusz Chroboczek committed
386 387 388 389 390 391
.TP
.BR faraway " {" true | false }
This specifies whether the network is "far away", in the sense that
networks behind it don't interfere with networks in front of it.  By
default, networks are not far away.
.TP
Juliusz Chroboczek committed
392
.BI hello\-interval " interval"
Juliusz Chroboczek committed
393 394 395 396 397 398
This defines the interval between hello packets sent on this interface.
The default is specified with the
.B \-h
and
.B \-H
command-line flags.
Juliusz Chroboczek committed
399 400 401 402
.TP
.BI update\-interval " interval"
This defines the interval between full routing table dumps sent on this
interface; since Babel uses triggered updates and doesn't count to
Juliusz Chroboczek committed
403
infinity, this can be set to a fairly large value, unless significant
Juliusz Chroboczek committed
404
packet loss is expected.  The default is four times the hello interval.
Baptiste Jonglez committed
405
.TP
Baptiste Jonglez committed
406
.BR enable\-timestamps " {" true | false }
Juliusz Chroboczek committed
407 408
Enable sending timestamps with each Hello and IHU message in order to
compute RTT values.  The default is
Juliusz Chroboczek committed
409
.B true
Juliusz Chroboczek committed
410
for tunnel interfaces, and
Juliusz Chroboczek committed
411 412
.B false
otherwise.
Baptiste Jonglez committed
413
.TP
Juliusz Chroboczek committed
414 415 416 417
.BR rfc6126\-compatible " {" true | false }
Only send TLVs that are defined by RFC 6126, the older version of Babel.
The default is
.BR false .
Juliusz Chroboczek committed
418 419 420
This option does nothing in this version of
.BR babeld ,
it is provided for compatiblity with future versions.
Juliusz Chroboczek committed
421
.TP
Juliusz Chroboczek committed
422
.BI rtt\-decay " decay"
Baptiste Jonglez committed
423
This specifies the decay factor for the exponential moving average of
Juliusz Chroboczek committed
424 425 426
RTT samples, in units of 1/256.  Must be between 1 and 256, inclusive.
Higher values discard old samples faster.  The default is
.BR 42 .
Baptiste Jonglez committed
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
.TP
.BI rtt\-min " rtt"
This specifies the minimum RTT, in milliseconds, starting from which
we increase the cost to a neighbour. The additional cost is linear in
(rtt -
.BR rtt\-min ).
The default is
.B 10
ms.
.TP
.BI rtt\-max " rtt"
This specifies the maximum RTT, in milliseconds, above which we don't
increase the cost to a neighbour. The default is
.B 120
ms.
.TP
.BI max\-rtt\-penalty " cost"
This specifies the maximum cost added to a neighbour because of RTT,
i.e. when the RTT is higher or equal than
.BR rtt\-max .
The default is
Juliusz Chroboczek committed
448 449 450 451 452 453
.BR 96
if the interface is of type
.B tunnel,
and
.BR 0 
otherwise.
Juliusz Chroboczek committed
454 455 456 457 458 459
.SS Filtering rules
A filtering rule is defined by a single line with the following format:
.IP
.I filter
.IR selector ...
.I action
Juliusz Chroboczek committed
460 461 462
.PP
.I Filter
specifies the filter to which this entry will be added, and can be one of
Juliusz Chroboczek committed
463 464 465 466 467 468 469 470
.B in
(applied to routes learned from Babel neighbours),
.B out
(applied to routes announced to Babel neighbours),
.B redistribute
(applied to routes redistributed from the kernel), or
.B install
(applied to routes installed into the kernel).
Juliusz Chroboczek committed
471

Juliusz Chroboczek committed
472 473
Each
.I selector
Juliusz Chroboczek committed
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
specifies the conditions under which the given statement matches.  It
can be one of
.TP
.BI ip " prefix"
This entry only applies to routes in the given prefix.
.TP
.BI eq " plen"
This entry only applies to routes with a prefix length equal to
.BR plen .
.TP
.BI le " plen"
This entry only applies to routes with a prefix length less or equal to
.BR plen .
.TP
.BI ge " plen"
This entry only applies to routes with a prefix length greater or equal to
.BR plen .
.TP
Matthieu Boutier committed
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
.BI src-ip " prefix"
This entry only applies to routes with a source prefix in the given prefix.
.TP
.BI src-eq " plen"
This entry only applies to routes with a source prefix length equal to
.BR plen .
.TP
.BI src-le " plen"
This entry only applies to routes with a source prefix length less or
equal to
.BR plen .
.TP
.BI src-ge " plen"
This entry only applies to routes with a source prefix length greater
or equal to
.BR plen .
.TP
Juliusz Chroboczek committed
509 510 511 512
.BI neigh " address"
This entry only applies to routes learned from a neighbour with
link-local address
.IR address .
Juliusz Chroboczek committed
513 514 515 516 517 518 519
.TP
.BI id " id"
This entry only applies to routes originated by a router with router-id
.IR id .
.TP
.BI proto " p"
This entry only applies to kernel routes with kernel protocol number
Juliusz Chroboczek committed
520 521
.IR p .
If neither
Juliusz Chroboczek committed
522 523 524
.B proto
nor
.B local
Juliusz Chroboczek committed
525 526
is specified, this entry applies to all non-local kernel routes with
a protocol different from "boot".
Juliusz Chroboczek committed
527 528 529
.TP
.B local
This entry only applies to local addresses.
Juliusz Chroboczek committed
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552
.TP
.BI if " interface"
For an input filter, this specifies the interface over which the route
is learned.  For an output filter, this specifies the interface over
which this route is advertised.  For a redistribute statement, this
specifies the interface over which the route forwards packets.
.PP
.I Action
specifies the action to be taken when this entry matches.  It can have
one of the following values:
.TP
.B allow
Allow this route, without changing its metric (or setting its metric
to 0 in case of a redistribute filter).
.TP
.B deny
Ignore this route.
.TP
.BI metric " value"
For an input or output filter, allow this route after increasing its metric by
.IR value .
For a redistribute filter, redistribute this route with metric
.IR value .
Matthieu Boutier committed
553 554 555 556
.TP
.BI src-prefix " prefix"
For a redistribute filter, set the source prefix of this route to
.IR prefix .
Matthieu Boutier committed
557 558 559 560 561 562 563 564
.TP
.BI table " table"
In an
.B install
filter, specify the kernel routing table to use.  For source-specific
routes, this only works reliably for IPv6, and only when
.B ipv6-subtrees
is true.
Juliusz Chroboczek committed
565 566 567 568 569
.PP
If
.I action
is not specified, it defaults to
.BR allow .
Juliusz Chroboczek committed
570 571

By default,
Juliusz Chroboczek committed
572
.B babeld
Juliusz Chroboczek committed
573 574 575 576 577 578 579
redistributes all local addresses, and no other routes.  In order to
make sure that only the routes you specify are redistributed, you
should include the line
.IP
redistribute local deny
.PP
as the last line in your configuration file.
Juliusz Chroboczek committed
580 581 582 583 584 585 586 587 588
.SH LOCAL CONFIGURATION INTERFACE
If
.B babeld
is invoked with the flag
.BR \-g ,
it accepts TCP connections from local clients on the given port and address
.B ::1
(the IPv6
.B localhost
Julien Cristau committed
589 590
address), or on the given UNIX-domain socket path if the argument starts with
\[oq]/\[cq].  When a client connects,
Juliusz Chroboczek committed
591 592 593 594 595
.B babeld
replies with
.B BABEL
followed with the supported version of the local configuration protocol (currently
.BR 1.0 ).
Juliusz Chroboczek committed
596
This is followed with a number of informational lines
Juliusz Chroboczek committed
597
.RB ( version
Juliusz Chroboczek committed
598
etc.), terminated by
Juliusz Chroboczek committed
599 600 601
.BR ok .
The client can then send requests, one per line.  To each request,
.B babeld
Juliusz Chroboczek committed
602
replies with one or more lines of data terminated by one of
Juliusz Chroboczek committed
603 604 605 606 607 608 609 610 611
.BR ok ,
.BR no ,
or
.BR bad .

The following requests are currently defined:
.IP \(bu 2
any configuration file directive, including
.BR interface ;
Juliusz Chroboczek committed
612
.IP \(bu
Juliusz Chroboczek committed
613
.BR "flush interface" ;
Juliusz Chroboczek committed
614
.IP \(bu
Juliusz Chroboczek committed
615
.BR dump ;
Juliusz Chroboczek committed
616
.IP \(bu
Juliusz Chroboczek committed
617 618 619
.B monitor
and
.BR unmonitor ;
Juliusz Chroboczek committed
620
.IP \(bu
Juliusz Chroboczek committed
621
.BR quit .
Juliusz Chroboczek committed
622
.SH EXAMPLES
Juliusz Chroboczek committed
623
You can participate in a Babel network by simply running
Juliusz Chroboczek committed
624
.IP
Juliusz Chroboczek committed
625
# babeld wlan0
Juliusz Chroboczek committed
626
.PP
Juliusz Chroboczek committed
627
where
Juliusz Chroboczek committed
628
.B wlan0
Juliusz Chroboczek committed
629
is the name of your wireless interface.
Juliusz Chroboczek committed
630

Juliusz Chroboczek committed
631 632 633
In order to gateway between multiple interfaces, just list them all on
the command line:
.IP
Juliusz Chroboczek committed
634
# babeld wlan0 eth0 sit1
Juliusz Chroboczek committed
635
.PP
Juliusz Chroboczek committed
636 637
On an access point, you'll probably want to redistribute some external
routes into Babel:
Juliusz Chroboczek committed
638
.IP
Juliusz Chroboczek committed
639
# babeld \\
Juliusz Chroboczek committed
640
    \-C 'redistribute metric 256' \\
Juliusz Chroboczek committed
641
    wlan0
Juliusz Chroboczek committed
642
.PP
Juliusz Chroboczek committed
643
or, if you want to constrain the routes that you redistribute,
Juliusz Chroboczek committed
644
.IP
Juliusz Chroboczek committed
645
# babeld \\
Juliusz Chroboczek committed
646 647
    \-C 'redistribute proto 11 ip ::/0 le 64 metric 256' \\
    \-C 'redistribute proto 11 ip 0.0.0.0/0 le 24 metric 256' \\
Juliusz Chroboczek committed
648
    wlan0
Juliusz Chroboczek committed
649
.SS Source-specific routing
Matthieu Boutier committed
650 651 652 653 654
.PP
If your want to redistribute kernel routes as source-specific to the network,
with the 2001:DB8:0:1::/64 prefix:
.IP
redistribute src-prefix 2001:DB8:0:1::/64
Juliusz Chroboczek committed
655 656 657 658 659 660 661 662 663
.PP
For more information about source-specific routing, please see
.IP
Matthieu Boutier and Juliusz Chroboczek.  Source-sensitive routing.  In
Proc. IFIP Networking 2015.  2015.
.PP
available online at
.IP
http://arxiv.org/pdf/1403.0445v4.pdf
Juliusz Chroboczek committed
664 665
.SH FILES
.TP
Juliusz Chroboczek committed
666
.B /etc/babeld.conf
Juliusz Chroboczek committed
667 668
The default location of the configuration file.
.TP
Juliusz Chroboczek committed
669
.B /var/lib/babel\-state
Juliusz Chroboczek committed
670
The default location of the file storing long-term state.
Juliusz Chroboczek committed
671
.TP
Juliusz Chroboczek committed
672
.B /var/run/babeld.pid
Juliusz Chroboczek committed
673 674
The default location of the pid file.
.TP
Juliusz Chroboczek committed
675
.B /var/log/babeld.log
Juliusz Chroboczek committed
676
The default location of the log file.
Juliusz Chroboczek committed
677 678 679
.SH SIGNALS
.TP
.B SIGUSR1
Juliusz Chroboczek committed
680
Dump Babel's routing tables to standard output or to the log file.
Juliusz Chroboczek committed
681 682
.TP
.B SIGUSR2
Juliusz Chroboczek committed
683
Check interfaces and kernel routes right now, then reopen the log file.
Juliusz Chroboczek committed
684
.SH SECURITY
Juliusz Chroboczek committed
685 686
Babel is a completely insecure protocol: any attacker able to inject
IP packets with a link-local source address can disrupt the protocol's
Juliusz Chroboczek committed
687
operation.  This is no different from unsecured neighbour discovery or ARP.
Juliusz Chroboczek committed
688

Juliusz Chroboczek committed
689 690 691 692 693 694
Usage of the
.B \-G
flag allows any user logged on the local host to change
.BR babeld 's
configuration.

Juliusz Chroboczek committed
695
Since Babel uses link-local IPv6 packets only, there is no need to update
Juliusz Chroboczek committed
696
firewalls to allow forwarding of Babel protocol packets.  If local
Juliusz Chroboczek committed
697 698 699
filtering is being done, UDP datagrams to the port used by the protocol
should be allowed.  As Babel uses unicast packets in some cases, it is not
enough to just allow packets destined to Babel's multicast address.
Juliusz Chroboczek committed
700 701 702 703 704 705 706
.SH SEE ALSO
.BR routed (8),
.BR route6d (8),
.BR zebra (8),
.BR ahcpd (8).
.SH AUTHOR
Juliusz Chroboczek.