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

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
16
While it is optimised for wireless mesh networks, Babel will also work
17
efficiently on wired networks.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
18 19 20 21 22 23
.SH OPTIONS
.TP
.BI \-m " multicast-address"
Specify the link-local multicast address to be used by the protocol.
.TP
.BI \-p " port"
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
24
Specify the UDP port number to be used by the protocol.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
25 26 27 28
.TP
.BI \-S " state-file"
Set the name of the file used for preserving long-term information
between invocations of the
29
.B babel
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
30
daemon.  If this file is deleted, the daemon will run in passive mode
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
31
for 3 minutes when it is next started (see
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
32
.B -P
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
33
below), and other hosts might initially ignore it.  The default is
34
.BR /var/lib/babel-state .
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
35 36
.TP
.BI \-h " hello-interval"
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
37
Specify the interval in seconds at which scheduled hello packets are
38
sent on wireless interfaces.  The default is 4 seconds.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
39 40
.TP
.BI \-H " wired-hello-interval"
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
41
Specify the interval in seconds at which scheduled hello packets are
42
sent on wired interfaces.  The default is 20 seconds.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
43
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
44
.BI \-i " idle-hello-interval"
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
45 46 47 48 49
Enable detection of idle networks (networks on which we haven't received
a hello packet in the last 5 minutes) and specify the interval in seconds
at which scheduled hello packets are sent on idle interfaces.  This
functonality is experimental, don't use it unless you know what you are
doing.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
50
.TP
51 52 53
.BI \-k " priority"
Specify the priority value used when installing routes into the kernel.
The default is 0.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
54
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
55 56 57
.B \-l
Use IFF_RUNNING (carrier sense) when determining interface availability.
.TP
58
.B \-w
59 60
Don't optimise wired links, assume all interfaces are wireless unless
explicitly overridden in the configuration file.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
61
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
62 63
.B \-s
Do not perform split-horizon processing on wired interfaces.
64
Split-horizon is not performed on wireless interfaces.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
65 66
.TP
.B \-P
67 68
Run in parasitic (passive) mode.  The daemon will only announce
redistributed routes.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
69 70 71 72
.TP
.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
73 74 75
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's avatar
Juliusz Chroboczek committed
76
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
77 78 79 80
.BI \-g " port"
Listen for connections from a front-end on port
.IR port .
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
81 82 83 84 85 86
.BI \-t " table"
Use the given kernel routing table for routes inserted by Babel.
.TP
.BI \-T " table"
Export routes from the given kernel routing table.
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
87 88 89 90
.BI \-c " filename"
Specify the name of the configuration file.  The default is
.BR /etc/babel.conf .
.TP
91 92 93 94 95 96 97 98 99 100
.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
.B /var/log/babel.log
otherwise.
.TP
.BI \-I " pidfile"
101 102
Specify a file to write our process id to.  The default is
.BR /var/run/babel.pid .
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
103
.TP
104 105 106 107
.RI "[ " id " ]"
The router-id of this daemon.  This should normally be an IPv6 or IPv4
address of this machine, but can be any unique 128-bit string.  If
omitted, Babel will try to determine a suitable router-id automatically.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
108 109 110
.TP
.IR interface ...
The list of interfaces on which the protocol should operate.
111 112
.SH CONFIG FILE FORMAT
The configuration file is a sequence of lines each of which specifies
113 114 115 116 117 118
either an interface or a filtering rule.  Blank lines are ignored.  Comments
are introduced with an octothorp
.RB `` # ''
and terminated by the end of line.
.SS Interface configuration
An interface is configured by a single line with the following format:
119
.IP
120 121 122 123 124 125 126 127 128 129 130
.B interface
.I name
.RI [ parameter ...]
.PP
.I Name
is the name of the interface (something like
.BR eth0 ).

Each
.I parameter
specifies a parameter of the given interface.  It can be one of:
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
131
.TP
132 133
.BR wired " {" true | false | auto }
This specifies whether to enable optimisations specific to wired interface.
134
By default, this is determined automatically unless the
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
.B \-w
command-line flag was specified.
.TP
.BR link-quality " {" true | false | auto }
This specifies whether link quality estimation should be performed on this
interface.  The default is to perform link quality estimation on wireless
interfaces but not on wired interfaces.
.TP
.BR split-horizon " {" true | false | auto }
This specifies whether to perform split-horizon processing on this
interface.  The default is to never perform split-horizon processing on
wireless interfaces; on wired interfaces, the default depends on the
.B \-s
flag.
.TP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
150
.BI rxcost " cost"
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
151 152
This defines the cost of receiving frames on the given interface under
ideal conditions (no packet loss); how this relates to the actual cost used
153 154 155
for computing metrics of routes going through this interface depends on
whether link quality estimation is being done.  The default is 96 for wired
interfaces, and 256 for wireless ones.
156 157 158 159 160 161 162 163
.TP
.BI hello-interval " interval"
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.
164 165 166 167 168 169
.SS Filtering rules
A filtering rule is defined by a single line with the following format:
.IP
.I filter
.IR selector ...
.I action
170 171 172 173 174 175 176 177
.PP
.I Filter
specifies the filter to which this entry will be added, and can be one of
.BR in ,
.BR out ,
or
.BR redistribute .

178 179
Each
.I selector
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
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
198 199 200 201
.BI neigh " address"
This entry only applies to routes learned from a neighbour with
link-local address
.IR address .
202 203 204 205 206 207 208
.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
209 210
.IR p .
If neither
211 212 213 214 215 216 217
.B proto
nor
.B local
is specified, this entry applies to all non-local kernel routes.
.TP
.B local
This entry only applies to local addresses.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
.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 .
.PP
If
.I action
is not specified, it defaults to
.BR allow .
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
246 247 248 249 250 251 252 253 254 255 256

By default,
.B Babel
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.

257
.SH EXAMPLES
258
You can participate in a Babel mesh network by simply running
259
.IP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
260
# babel wlan0
261
.PP
262
where
263
.B wlan0
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
264
is the name of your wireless interface.
265

266 267 268
In order to gateway between multiple interfaces, just list them all on
the command line:
.IP
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
269
# babel wlan0 eth0 sit1
270
.PP
271 272
On an access point, you'll probably want to redistribute some external
routes into Babel:
273
.IP
274 275
# babel \\
    \-C 'redistribute metric 256' \\
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
276
    wlan0
277
.PP
278
or, if you want to constrain the routes that you redistribute,
279 280 281 282
.IP
# babel \\
    \-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's avatar
Juliusz Chroboczek committed
283
    wlan0
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
284 285
.SH FILES
.TP
286 287 288
.B /etc/babel.conf
The default location of the configuration file.
.TP
289
.B /var/lib/babel\-state
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
290
The default location of the file storing long-term state.
291
.TP
292 293 294
.B /var/run/babel.pid
The default location of the pid file.
.TP
295 296
.B /var/log/babel.log
The default location of the log file.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
297 298 299
.SH SIGNALS
.TP
.B SIGUSR1
300
Dump Babel's routing tables to standard output or to the log file.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
301 302
.TP
.B SIGUSR2
303
Check interfaces and kernel routes right now, then reopen the log file.
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
304
.SH SECURITY
305 306 307 308
Babel is a completely insecure protocol: any attacker able to inject
IP packets with a link-local source address can disrupt the protocol's
operation.  This is no different from unsecured neighbour discovery
(ARP in IPv4).
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
309

Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
310
Since Babel uses link-local addresses only, there is no need to update
Juliusz Chroboczek's avatar
Juliusz Chroboczek committed
311 312 313 314 315
firewalls to allow forwarding of Babel protocol packets.  If local
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's avatar
Juliusz Chroboczek committed
316 317 318 319 320 321 322 323 324
.SH BUGS
Plenty.  This is experimental software, run at your own risk.
.SH SEE ALSO
.BR routed (8),
.BR route6d (8),
.BR zebra (8),
.BR ahcpd (8).
.SH AUTHOR
Juliusz Chroboczek.