summaryrefslogtreecommitdiff
path: root/docs/configuration/protocols/babel.md
blob: b03e9fa4d3c638d82ee8906f2701a058759a6d44 (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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
```{eval-rst}
.. meta::
   :description: The Babel routing protocol provides robust and efficient
                 routing for wired and wireless mesh networks.
   :keywords: babel, routing, protocol, wireless, mesh, network, metric,
              ipv4, ipv6
```

(babel)=

# Babel

The Babel protocol provides robust and efficient routing for both wired and
wireless mesh networks. By default, Babel uses hop-count metrics on wired links
and a variant of Expected Transmission Count (ETX) on wireless links.
Administrators can configure Babel to account for radio diversity,
automatically compute link latency, and include that latency in the routing
metric. {rfc}`8966` defines the Babel protocol.

Babel is a dual-stack protocol. A single Babel instance routes both IPv4 and
IPv6 traffic simultaneously.

## General configuration

VyOS does not require a specific command to start the Babel process. The system
automatically starts the routing process when you configure the first
Babel-enabled interface.

```{cfgcmd} set protocols babel interface \<interface\>

**Enable Babel routing on the specified interface.**

The system immediately begins sending and receiving Babel packets on this
interface.
```

## Optional configuration

```{cfgcmd} set protocols babel parameters diversity

**Enable radio-frequency diversity routing for the Babel process.**

Enabling this feature is highly recommended for networks with many
wireless nodes.

:::{note}
When you enable diversity routing, you should also configure the
``diversity-factor`` and ``channel`` parameters.
:::
```

```{cfgcmd} set protocols babel parameters diversity-factor \<1-256\>

**Configure the multiplicative factor for diversity routing, in units of
1/256.**

Lower multiplicative factors give greater weight to diversity in route
selection. The default value is 256, which disables diversity routing.
On nodes with multiple independent radios, configure a value of 128 or less.
```

```{cfgcmd} set protocols babel parameters resend-delay \<20-655340\>

**Configure the delay in milliseconds before the system resends an
important request or update.**

The default value is 2000 ms.
```

```{cfgcmd} set protocols babel parameters smoothing-half-life \<0-65534\>

**Configure the time constant, in seconds, for the smoothing algorithm used
to implement hysteresis.**

Higher values reduce route oscillation but slightly increase convergence
time. A value of 0 disables hysteresis and is suitable for wired networks.
The default is 4 seconds.
```

## Interfaces configuration

```{cfgcmd} set protocols babel interface \<interface\> type \<auto|wired|wireless\>

**Configure the network type for the Babel-enabled interface.**

Choose from the following:

* ``auto``: Babel automatically detects if an interface is wired or
  wireless.
* ``wired``: Babel enables optimizations for wired interfaces.
* ``wireless``: Babel disables optimizations suitable only for wired
  interfaces. Specifying wireless is always correct, but may cause slower
  convergence and increased routing traffic.
```

```{cfgcmd} set protocols babel interface \<interface\> split-horizon \<default|disable|enable\>

**Configure the split-horizon routing behavior for the specified
interface.**

Use one of the following options:

* ``default``: Babel automatically enables split-horizon on wired
  interfaces and disables it on wireless interfaces.
* ``enable``: Babel enables split-horizon on the interface. This
  optimization should be used only on symmetric, transitive (wired)
  networks.
* ``disable``: Babel disables split-horizon on the interface. Disabling
  split-horizon is always safe and correct.
```

```{cfgcmd} set protocols babel interface \<interface\> hello-interval \<20-655340\>

**Configure the interval, in milliseconds, between scheduled hello messages
on the specified interface.**

On wired links, Babel detects link failures within two hello intervals.
On wireless links, link quality is reestimated at each interval. The
default is 4000 ms.
```

```{cfgcmd} set protocols babel interface \<interface\> update-interval \<20-655340\>

**Configure the interval, in milliseconds, between scheduled routing
updates on the specified interface.**

Because Babel uses triggered updates extensively, you can increase this
value on reliable links with minimal packet loss. The default is 20000 ms.
```

```{cfgcmd} set protocols babel interface \<interface\> rxcost \<1-65534\>

**Configure the base receive cost for the specified interface.**

Babel applies this value based on the configured network type:

* ``wired``: The value is the routing cost advertised to neighboring
  routers.
* ``wireless``: The value is a multiplier used to compute the ETX
  (Expected Transmission Count) reception cost.

The default value is 256.
```

```{cfgcmd} set protocols babel interface \<interface\> rtt-decay \<1-256\>

**Configure the decay factor for the exponential moving average of RTT
samples, in units of 1/256.**

Higher values discard older samples faster. The default value is 42.
```

```{cfgcmd} set protocols babel interface \<interface\> rtt-min \<1-65535\>

**Configure the minimum RTT, in milliseconds, at which the cost to a
neighbor begins to increase.**

The additional cost is linear in (rtt - rtt-min). The default value is 10 ms.
```

```{cfgcmd} set protocols babel interface \<interface\> rtt-max \<1-65535\>

**Configure the maximum RTT, in milliseconds, above which the cost to a
neighbor stops increasing.**

The default value is 120 ms.
```

```{cfgcmd} set protocols babel interface \<interface\> max-rtt-penalty \<0-65535\>

**Configure the maximum cost added to a neighbor when RTT meets or exceeds
rtt-max.**

Setting this value to 0 disables RTT-based costs. The default value is 150.
```

```{cfgcmd} set protocols babel interface \<interface\> enable-timestamps

**Configure adding timestamps to each Hello and IHU message to calculate
RTT values.**

Enabling timestamps is recommended for tunnel interfaces.
```

```{cfgcmd} set protocols babel interface \<interface\> channel \<1-254|interfering|noninterfering\>

**Configure the channel identifier that diversity routing uses for the
specified interface.**

Interfaces interfere with each other based on the assigned channel
identifier:

* ``1–254``: The interface interferes with interfaces sharing the same
  channel number and with interfaces configured as ``interfering``.
* ``interfering``: The interface interferes with all others except those
  configured as ``noninterfering``.
* ``noninterfering``: The interface interferes only with itself.
```

## Redistribution configuration

```{cfgcmd} set protocols babel redistribute \<ipv4|ipv6\> \<route source\>

**Configure the redistribution of routing information from the specified
route source into the Babel process.**

The following route sources are available:

* **ipv4:** ``bgp``, ``connected``, ``eigrp``, ``isis``, ``kernel``,
  ``nhrp``, ``ospf``, ``rip``, ``static``
* **ipv6:** ``bgp``, ``connected``, ``eigrp``, ``isis``, ``kernel``,
  ``nhrp``, ``ospfv3``, ``ripng``, ``static``
```

```{cfgcmd} set protocols babel distribute-list \<ipv4|ipv6\> access-list \<in|out\> \<number\>

**Configure global Babel route filtering using an access list.**

Specify the direction in which the access list is applied:

* ``in``: Filters incoming routes.
* ``out``: Filters outgoing routes.
```

```{cfgcmd} set protocols babel distribute-list \<ipv4|ipv6\> interface \<interface\> access-list \<in|out\> \<number\>

**Configure Babel route filtering on the specified interface using an
access list.**

Specify the direction in which the access list is applied:

* ``in``: Filters incoming routes.
* ``out``: Filters outgoing routes.
```

```{cfgcmd} set protocols babel distribute-list \<ipv4|ipv6\> prefix-list \<in|out\> \<name\>

**Configure global Babel route filtering using a prefix list.**

Specify the direction in which the prefix list is applied:

* ``in``: Filters incoming routes.
* ``out``: Filters outgoing routes.
```

```{cfgcmd} set protocols babel distribute-list \<ipv4|ipv6\> interface \<interface\> prefix-list \<in|out\> \<name\>

**Configure Babel route filtering on the specified interface using a
prefix list.**

Specify the direction in which the prefix list is applied:

* ``in``: Filters incoming routes.
* ``out``: Filters outgoing routes.
```

## Configuration example

### Basic two-node babel network

**Goal:** The following example connects two routers (Node 1 and Node 2) via
their eth0 interfaces and uses the Babel routing protocol to advertise
(redistribute) each router's locally configured networks (represented by
loopback addresses) to one another.

**Node 1:**

```none
# Configure the loopback (local networks) and physical (eth0) addresses
set interfaces loopback lo address 10.1.1.1/32
set interfaces loopback lo address fd12:3456:dead:beef::1/128
set interfaces ethernet eth0 address 192.168.1.1/24

# Enable Babel on the physical link
set protocols babel interface eth0 type wired

# Instruct Babel to advertise (redistribute) the locally configured networks
set protocols babel redistribute ipv4 connected
set protocols babel redistribute ipv6 connected
```

**Node 2:**

```none
# Configure the loopback (local networks) and physical (eth0) addresses
set interfaces loopback lo address 10.2.2.2/32
set interfaces loopback lo address fd12:3456:beef:dead::2/128
set interfaces ethernet eth0 address 192.168.1.2/24

# Enable Babel on the physical link
set protocols babel interface eth0 type wired

# Tell Babel to advertise (redistribute) the locally configured networks
set protocols babel redistribute ipv4 connected
set protocols babel redistribute ipv6 connected
```