summaryrefslogtreecommitdiffstats
path: root/doc/user/babeld.rst
blob: bda0045a603aa93f1162558cd93dcdc61d2a663b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
.. _babel:

*****
Babel
*****

Babel is an interior gateway protocol that is suitable both for wired networks
and for wireless mesh networks.  Babel has been described as 'RIP on speed' --
it is based on the same principles as RIP, but includes a number of refinements
that make it react much faster to topology changes without ever counting to
infinity, and allow it to perform reliable link quality estimation on wireless
links.  Babel is a double-stack routing protocol, meaning that a single Babel
instance is able to perform routing for both IPv4 and IPv6.

FRR implements Babel as described in :rfc:`6126`.

.. _configuring-babeld:

Configuring babeld
==================

The *babeld* daemon can be invoked with any of the common
options (:ref:`common-invocation-options`).

The *zebra* daemon must be running before *babeld* is
invoked. Also, if *zebra* is restarted then *babeld*
must be too.

Configuration of *babeld* is done in its configuration file
:file:`babeld.conf`.

.. _babel-configuration:

Babel configuration
===================

.. clicmd:: router babel

   Enable or disable Babel routing.

.. clicmd:: babel diversity

   Enable or disable routing using radio frequency diversity.  This is
   highly recommended in networks with many wireless nodes.
   If you enable this, you will probably want to set `babel
   diversity-factor` and `babel channel` below.


.. clicmd:: babel diversity-factor (1-256)

   Sets the multiplicative factor used for diversity routing, in units of
   1/256; lower values cause diversity to play a more important role in
   route selection.  The default it 256, which means that diversity plays
   no role in route selection; you will probably want to set that to 128
   or less on nodes with multiple independent radios.

.. clicmd:: network IFNAME

   Enable or disable Babel on the given interface.


.. clicmd:: babel <wired|wireless>

   Specifies whether this interface is wireless, which disables a number
   of optimisations that are only correct on wired interfaces.
   Specifying `wireless` (the default) is always correct, but may
   cause slower convergence and extra routing traffic.

.. clicmd:: babel split-horizon

   Specifies whether to perform split-horizon on the interface.  Specifying
   ``no babel split-horizon`` is always correct, while ``babel
   split-horizon`` is an optimisation that should only be used on symmetric
   and transitive (wired) networks.  The default is ``babel split-horizon``
   on wired interfaces, and ``no babel split-horizon`` on wireless
   interfaces.  This flag is reset when the wired/wireless status of an
   interface is changed.


.. clicmd:: babel hello-interval (20-655340)

   Specifies the time in milliseconds between two scheduled hellos.  On
   wired links, Babel notices a link failure within two hello intervals;
   on wireless links, the link quality value is reestimated at every
   hello interval.  The default is 4000 ms.


.. clicmd:: babel update-interval (20-655340)

   Specifies the time in milliseconds between two scheduled updates.  Since
   Babel makes extensive use of triggered updates, this can be set to fairly
   high values on links with little packet loss.  The default is 20000 ms.


.. clicmd:: babel channel (1-254)
.. clicmd:: babel channel interfering
.. clicmd:: babel channel noninterfering

   Set the channel number that diversity routing uses for this interface (see
   `babel diversity` above).  Noninterfering interfaces are assumed to only
   interfere with themselves, interfering interfaces are assumed to interfere
   with all other channels except noninterfering channels, and interfaces with
   a channel number interfere with interfering interfaces and interfaces with
   the same channel number.  The default is ``babel channel interfering`` for
   wireless interfaces, and ``babel channel noninterfering`` for wired
   interfaces.  This is reset when the wired/wireless status of an interface is
   changed.


.. clicmd:: babel rxcost (1-65534)

   Specifies the base receive cost for this interface.  For wireless
   interfaces, it specifies the multiplier used for computing the ETX
   reception cost (default 256); for wired interfaces, it specifies the
   cost that will be advertised to neighbours.  This value is reset when
   the wired/wireless attribute of the interface is changed.

.. note::
   Do not use this command unless you know what you are doing; in most
   networks, acting directly on the cost using route maps is a better
   technique.


.. clicmd:: babel rtt-decay (1-256)

   This specifies the decay factor for the exponential moving average of
   RTT samples, in units of 1/256.  Higher values discard old samples
   faster.  The default is 42.


.. clicmd:: babel rtt-min (1-65535)

   This specifies the minimum RTT, in milliseconds, starting from which we
   increase the cost to a neighbour. The additional cost is linear in
   (rtt - rtt-min).  The default is 10 ms.


.. clicmd:: babel rtt-max (1-65535)

   This specifies the maximum RTT, in milliseconds, above which we don't
   increase the cost to a neighbour. The default is 120 ms.


.. clicmd:: babel max-rtt-penalty (0-65535)

   This specifies the maximum cost added to a neighbour because of RTT, i.e.
   when the RTT is higher or equal than rtt-max. The default is 150. Setting it
   to 0 effectively disables the use of a RTT-based cost.


.. clicmd:: babel enable-timestamps

   Enable or disable sending timestamps with each Hello and IHU message in
   order to compute RTT values.  The default is `no babel enable-timestamps`.


.. clicmd:: babel resend-delay (20-655340)

   Specifies the time in milliseconds after which an 'important' request or
   update will be resent.  The default is 2000 ms.  You probably don't want to
   tweak this value.


.. clicmd:: babel smoothing-half-life (0-65534)

   Specifies the time constant, in seconds, of the smoothing algorithm used for
   implementing hysteresis.  Larger values reduce route oscillation at the cost
   of very slightly increasing convergence time.  The value 0 disables
   hysteresis, and is suitable for wired networks.  The default is 4 s.

.. _babel-redistribution:

Babel redistribution
====================


.. clicmd:: redistribute <ipv4|ipv6> KIND

   Specify which kind of routes should be redistributed into Babel.

.. _show-babel-information:

Show Babel information
======================

These commands dump various parts of *babeld*'s internal state.


.. clicmd:: show babel route


.. clicmd:: show babel route A.B.C.D


.. clicmd:: show babel route X:X::X:X


.. clicmd:: show babel route A.B.C.D/M


.. clicmd:: show babel route X:X::X:X/M


.. clicmd:: show babel interface


.. clicmd:: show babel interface IFNAME


.. clicmd:: show babel neighbor


.. clicmd:: show babel parameters

Babel debugging commands
========================

   simple: debug babel KIND
   simple: no debug babel KIND

.. clicmd:: debug babel KIND

   Enable or disable debugging messages of a given kind. ``KIND`` can
   be one of:

   - ``common``
   - ``filter``
   - ``timeout``
   - ``interface``
   - ``route``
   - ``all``

.. note::
   If you have compiled with the ``NO_DEBUG`` flag, then these commands aren't
   available.


Babel sample configuration file
===============================

.. code-block:: frr

   debug babel common
   !debug babel kernel
   !debug babel filter
   !debug babel timeout
   !debug babel interface
   !debug babel route
   !debug babel all

   router babel
   ! network wlan0
   ! network eth0
   ! redistribute ipv4 kernel
   ! no redistribute ipv6 static

   ! The defaults are fine for a wireless interface

   !interface wlan0

   ! A few optimisation tweaks are optional but recommended on a wired interface
   ! Disable link quality estimation, enable split horizon processing, and
   ! increase the hello and update intervals.

   !interface eth0
   ! babel wired
   ! babel split-horizon
   ! babel hello-interval 12000
   ! babel update-interval 36000

   ! log file /var/log/frr/babeld.log
   log stdout