File: batctl.8

package info (click to toggle)
batctl 2025.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 840 kB
  • sloc: ansic: 12,083; makefile: 155; sh: 21
file content (517 lines) | stat: -rw-r--r-- 24,768 bytes parent folder | download
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
.\" SPDX-License-Identifier: GPL-2.0
.\" License-Filename: LICENSES/preferred/GPL-2.0
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH "BATCTL" "8" "July 17, 2015" "Linux" "B.A.T.M.A.N. Advanced Control Tool"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.\" --------------------------------------------------------------------------
.\" Process this file with
.\" groff -man batctl.8 -Tutf8
.\" Retrieve format warnings with
.\" man --warnings batctl.8 > /dev/null
.\" --------------------------------------------------------------------------
.ad l
.SH NAME
batctl \- B.A.T.M.A.N. advanced control and management tool
.SH SYNOPSIS
.B batctl [\fIoptions\fP]\ \fIcommand\fP|\fIdebug\ table\fP|\fIdebug\ JSON\fP\ [\fIparameters\fP]
.br
.SH DESCRIPTION
batctl offers a convenient way to configure the batman\-adv kernel module as well as displaying debug information
such as originator tables and translation tables. In combination with a bat\-hosts file batctl allows
the use of host names instead of MAC addresses.
.PP
B.A.T.M.A.N. advanced operates on layer 2. Thus all hosts participating in the virtual switched network are transparently
connected together for all protocols above layer 2. Therefore the common diagnosis tools do not work as expected. To
overcome these problems batctl contains the commands \fBping\fP, \fBtraceroute\fP, \fBtcpdump\fP which provide similar
functionality to the normal \fBping\fP(1), \fBtraceroute\fP(1), \fBtcpdump\fP(1) commands, but modified to layer 2
behaviour or using the B.A.T.M.A.N. advanced protocol. For similar reasons, \fBthroughputmeter\fP, a command to test network
performances, is also included.

.SH OPTIONS

.TP
\fB\-m\fP
specify mesh interface (default 'bat0')
.TP
\fB\-h\fP
print general batctl help
.TP
\fB-v\fP
print batctl version and batman-adv version (if the module is loaded)

.SH COMMANDS

.TP
\fBbisect_iv\fP [\fB\-l MAC\fP][\fB\-t\fP \fIMAC\fP][\fB\-r\fP \fIMAC\fP][\fB\-s\fP \fImin\fP [\- \fImax\fP]][\fB\-o\fP \fIMAC\fP][\fB\-n\fP] \fIlogfile1\fP ...
Analyses the B.A.T.M.A.N. IV logfiles to build a small internal database of all sent sequence numbers and routing table
changes. This database can then be analyzed in a number of different ways. With "\-l" the database can be used to search
for routing loops. Use "\-t" to trace OGMs of a host throughout the network. Use "\-r" to display routing tables of the
nodes. The option "\-s" can be used to limit the output to a range of sequence numbers, between min and max, or to one
specific sequence number, min. Furthermore using "\-o" you can filter the output to a specified originator. If "\-n" is
given batctl will not replace the MAC addresses with bat\-host names in the output.
.RE
.TP
\fBevent\fP|\fBe\fP [\fB\-t\fP|\fB\-r\fP]
batctl will monitor for events from the netlink kernel interface of batman-adv. The local timestamp of the event will be printed
when parameter \fB\-t\fP is specified. Parameter \fB\-r\fP will do the same but with relative timestamps.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP
.TQ
[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP [\fB-M\fP] \fBadd\fP|\fBdel\fP \fIiface\fP ...
If no parameter is given or the first parameter is neither "add" nor "del" the current interface settings are displayed.
In order to add or delete interfaces specify "add" or "del" as first argument and append the interface names you wish to
add or delete. Multiple interfaces can be specified.
The "\-M" option tells batctl to not automatically create the batman-adv interface on "add". It can also be used to
suppress the warning about the manual destruction when "del" removed all interfaces which belonged to it.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP \fBcreate\fP [\fBrouting_algo\fP|\fBra\fP \fIRA_NAME\fP]
A batman-adv interface without attached interfaces can be created using "create". The parameter routing_algo
can be used to overwrite the (default) routing algorithm.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBinterface\fP|\fBif\fP \fBdestroy\fP
Remove all attached interfaces and destroy the batman-adv interface.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBping\fP|\fBp\fP [\fB\-c\fP \fIcount\fP][\fB\-i\fP \fIinterval\fP][\fB\-t\fP \fItime\fP][\fB\-R\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP
Layer 2 ping of a MAC address or bat\-host name.  batctl will try to find the bat\-host name if the given parameter was
not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when
the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and
destination devices are in the same IP subnet.
The "\-c" option tells batctl how man pings should be sent before the program exits. Without the "\-c"
option batctl will continue pinging without end. Use CTRL + C to stop it.  With "\-i" and "\-t" you can set the default
interval between pings and the timeout time for replies, both in seconds. When run with "\-R", the route taken by the ping
messages will be recorded. With "\-T" you can disable the automatic translation of a client MAC address to the originator
address which is responsible for this client.
.TP
\fBrouting_algo\fP|\fBra\fP [\fIalgorithm\fP]
If no parameter is given the current routing algorithm configuration as well as
supported routing algorithms are displayed.
Otherwise the parameter is used to select the routing algorithm for the following
batX interface to be created.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBstatistics\fP|\fBs\fP
Retrieve traffic counters from batman-adv kernel module. The output may vary depending on which features have been compiled
into the kernel module.
.br
Each module subsystem has its own counters which are indicated by their prefixes:
.TS
tab (@);
r lx.
mgmt@T{
mesh protocol counters
T}
tt@T{
translation table counters
T}
.TE
All counters without a prefix concern payload (pure user data) traffic.
.TP
\fBtcpdump\fP|\fBtd\fP [\fB\-c\fP][\fB\-n\fP][\fB\-p\fP \fIfilter\fP][\fB\-x\fP \fIfilter\fP] \fBinterface ...\fP
batctl will display all packets that are seen on the given interface(s). A variety of options to filter the output
are available: To only print packets that match the compatibility number of batctl specify the "\-c" (compat filter)
option. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. To filter
the shown packet types you can either use "\-p" (dump only specified packet types) or "\-x" (dump all packet types
except specified). The following packet types are available:

.TS
tab (@);
r lx.
1@T{
batman ogm packets
T}
2@T{
batman icmp packets
T}
4@T{
batman unicast packets
T}
8@T{
batman broadcast packets
T}
16@T{
batman unicast tvlv packets
T}
32@T{
batman fragmented packets
T}
64@T{
batman tt / roaming packets
T}
128@T{
non batman packets
T}
.TE
Example: batctl td <interface> \-p 129 \-> only display batman ogm packets and non batman packets
.TP
[\fBmeshif\fP \fInetdev\fP] \fBthroughputmeter\fP|\fBtp\fP \fIMAC\fP
This command starts a throughput test entirely controlled by batman module in
kernel space: the computational resources needed to align memory and copy data
between user and kernel space that are required by other user space tools may
represent a bottleneck on some low profile device.

The test consist of the transfer of 14 MB of data between the two nodes. The
protocol used to transfer the data is somehow similar to TCP, but simpler: some
TCP features are still missing, thus protocol performances could be worst. Since
a fixed amount of data is transferred the experiment duration depends on the
network conditions. The experiment can be interrupted with CTRL + C. At the end
of a successful experiment the throughput in KBytes per second is returned,
together with the experiment duration in millisecond and the amount of bytes
transferred. If too many packets are lost or the specified MAC address is not
reachable, a message notifying the error is returned instead of the result.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtraceroute\fP|\fBtr\fP [\fB\-n\fP][\fB\-T\fP] \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP
Layer 2 traceroute to a MAC address or bat\-host name. batctl will try to find the bat\-host name if the given parameter
was not a MAC address. It can also try to guess the MAC address using an IPv4/IPv6 address or a hostname when
the IPv4/IPv6 address was configured on top of the batman-adv interface of the destination device and both source and
destination devices are in the same IP subnet.
batctl will send 3 packets to each host and display the response time. If "\-n" is given batctl will
not replace the MAC addresses with bat\-host names in the output. With "\-T" you can disable the automatic translation
of a client MAC address to the originator address which is responsible for this client.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtranslate\fP|\fBt\fP \fIMAC_address\fP|\fIbat\-host_name\fP|\fIhost_name\fP|\fIIP_address\fP
Translates a destination (hostname, IP, MAC, bat_host-name) to the originator
mac address responsible for it.

.SH SETTINGS

.TP
[\fBmeshif\fP \fInetdev\fP] \fBaggregation\fP|\fBag\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current aggregation setting is displayed. Otherwise the parameter is used to enable or disable
OGM packet aggregation.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current ap isolation setting is displayed. Otherwise the parameter is used to enable or
disable ap isolation.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP]
.TQ
[\fBmeshif\fP \fInetdev\fP] \fBvid <vid>\fP \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP]
.TQ
\fBvlan\fP \fIvdev\fP \fBap_isolation\fP|\fBap\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current ap isolation setting for the specified VLAN is displayed. Otherwise the parameter is used to enable or
disable ap isolation for the specified VLAN.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBbonding\fP|\fBb\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current bonding mode setting is displayed. Otherwise the parameter is used to enable or disable
the bonding mode.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBbridge_loop_avoidance\fP|\fBbl\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current bridge loop avoidance setting is displayed. Otherwise the parameter is used to enable
or disable the bridge loop avoidance. Bridge loop avoidance support has to be enabled when compiling the module otherwise
this option won't be available.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBdistributed_arp_table\fP|\fBdat\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current distributed arp table setting is displayed. Otherwise the parameter is used to
enable or disable the distributed arp table.
.TP
\fBhardif\fP \fIhardif\fP \fBelp_interval\fP|\fBet\fP [\fIinterval\fP]
If no parameter is given the current ELP interval setting of the hard interface is displayed otherwise the parameter is used to set the
ELP interval. The interval is in units of milliseconds.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBfragmentation\fP|\fBf\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current fragmentation mode setting is displayed. Otherwise the parameter is used to enable or
disable fragmentation.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBgw_mode|gw\fP [\fBoff\fP|\fBclient\fP|\fBserver\fP] [\fIsel_class\fP|\fIbandwidth\fP]
If no parameter is given the current gateway mode is displayed otherwise the parameter is used to set the gateway mode. The
second (optional) argument specifies the selection class (if 'client' was the first argument) or the gateway bandwidth (if 'server'
was the first argument). If the node is a server this parameter is used to inform other nodes in the network about
this node's internet connection bandwidth. Just enter any number (optionally followed by "kbit" or "mbit") and the batman-adv
module will propagate the entered value in the mesh. Use "/" to separate the down\(hy and upload rates. You can omit the upload
rate and the module will assume an upload of download / 5.
.RS 17
default: 10000 \-> 10.0/2.0 MBit
.RE
.RS 16
examples:  5000 \->  5.0/1.0 MBit
.RE
.RS 26
 5000kbit
 5mbit
 5mbit/1024
 5mbit/1024kbit
 5mbit/1mbit
.RE
.RS 7
If the node is a gateway client the parameter will decide which criteria to consider when the batman-adv module has to choose
between different internet connections announced by the aforementioned servers.
.RE
.RS 7
B.A.T.M.A.N. IV:
.RE
.RS 17
default: 20 \-> late switch (TQ 20)
.RE
.RS 16
examples:  1 -> fast connection
.RS 16
consider the gateway's advertised throughput as well as the link quality towards the gateway and stick with the selection until the gateway disappears
.RE
.RE
.RS 25
  2 \-> stable connection
.RS 7
chooses the gateway with the best link quality and sticks with it (ignore the advertised throughput)
.RE
  3 \-> fast switch connection
.RS 7
chooses the gateway with the best link quality but switches to another gateway as soon as a better one is found
.RE
 XX \-> late switch connection
.RS 7
chooses the gateway with the best link quality but switches to another gateway as soon as a better one is found which is at
least XX TQ better than the currently selected gateway (XX has to be a number between 3 and 256).
.RE
.RE
.RS 7
B.A.T.M.A.N. V:
.RE
.RS 17
default: 5000 \-> late switch (5000 kbit/s throughput)
.br
example: 1500 \-> fast switch connection
.RS 17
switches to another gateway as soon as a better one is found which is at least 
1500 kbit/s faster throughput than the currently selected gateway. Throughput is
determined by evaluating which is lower: the advertised throughput by the
gateway or the maximum bandwidth across the entire path.
.RE
.RE
.br
.TP
[\fBmeshif\fP \fInetdev\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP]
If no parameter is given the current hop penalty setting is displayed. Otherwise the parameter is used to set the
hop penalty. The penalty is can be 0-255 (255 sets originator message's TQ to zero when forwarded by this hop).
.TP
[\fBhardif\fP \fIhardif\fP] \fBhop_penalty\fP|\fBhp\fP [\fIpenalty\fP]
If no parameter is given the current hop penalty setting of the hard interface is displayed. Otherwise the parameter is used to set the
hop penalty. The penalty can be 0-255 (255 sets originator message's TQ to zero when forwarded over this interface).
.TP
[\fBmeshif\fP \fInetdev\fP] \fBisolation_mark\fP|\fBmark\fP [\fIvalue\fP[/\fImask\fP]]
If no parameter is given the current isolation mark value is displayed.
Otherwise the parameter is used to set or unset the isolation mark used by the
Extended Isolation feature.
.br
The input is supposed to be of the form $value/$mask, where $value can be any
32bit long integer (expressed in decimal or hex base) and $mask is a generic
bitmask (expressed in hex base) that selects the bits to take into consideration
from $value. It is also possible to enter the input using only $value and in
this case the full bitmask is used by default.

.br
.br
Example 1: 0x00000001/0xffffffff
.br
Example 2: 0x00040000/0xffff0000
.br
Example 3: 16 or 0x0F
.br
.TP
[\fBmeshif\fP \fInetdev\fP] \fBloglevel\fP|\fBll\fP [\fIlevel\fP ...]
If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log
level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting.
Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to
translation table operations. Level 'bla' enables messages related to the bridge loop avoidance. Level 'dat' enables
messages related to ARP snooping and the Distributed Arp Table.
Level 'mcast' enables messages related to multicast optimizations. Level 'tp' enables messages related to throughput meter.
Level 'all' enables all messages. The messages are sent to the kernels trace buffers. Use \fBtrace-cmd stream -e batadv:batadv_dbg\fP
to receive the system wide log messages.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBmulticast_fanout\fP|\fBmo\fP [\fIfanout\fP]
If no parameter is given the current multicast fanout setting is displayed. Otherwise the parameter is used to set
the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a
multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBmulticast_forceflood\fP|\fBmff\fP [\fI0\fP|\fI1\fP]
If no parameter is given the current multicast forceflood setting is displayed. Otherwise the parameter is used to enable or
disable multicast forceflood. This setting defines whether multicast optimizations should be replaced by simple broadcast-like
flooding of multicast packets. If set to non-zero then all nodes in the mesh are going to use classic flooding for any
multicast packet with no optimizations.
.TP
[\fBmeshif\fP \fInetdev\fP] \fBorig_interval\fP|\fBit\fP [\fIinterval\fP]
If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the
originator interval. The interval is in units of milliseconds.
.TP
\fBhardif\fP \fIhardif\fP \fBthroughput_override|to\fP [\fIbandwidth\fP]
If no parameter is given the current througput override is displayed otherwise
the parameter is used to set the throughput override for the specified hard
interface.
Just enter any number (optionally followed by "kbit" or "mbit").

.SH DEBUG TABLES

The batman-adv kernel module comes with a variety of debug tables containing various information about the state of the mesh
seen by each individual node.

All of the debug tables support the following options:
.TP
\fB-w\fP
refresh the list every second or add a number to let it refresh at a custom interval in seconds (with optional decimal places)
.TP
\fB-n\fP
do not replace the MAC addresses with bat\-host names in the output
.TP
\fB-H\fP
do not show the header of the debug table

.PP
The originator table also supports the "\-t" filter option to remove all originators from the output that have not been seen
for the specified amount of seconds (with optional decimal places). It furthermore supports the "\-i" parameter to specify an
interface for which the originator table should be printed. If this parameter is not supplied, the default originator table
is printed.

The local and global translation tables also support the "\-u" and "\-m" option to only display unicast or multicast translation table announcements respectively.

.TP
[\fBmeshif\fP \fInetdev\fP] \fBbackbonetable\fP|\fBbbt\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
(compile time option)
.TP
[\fBmeshif\fP \fInetdev\fP] \fBclaimtable\fP|\fBcl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
.TP
[\fBmeshif\fP \fInetdev\fP] \fBdat_cache\fP|\fBdc\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
(compile time option)
.TP
[\fBmeshif\fP \fInetdev\fP] \fBgateways\fP|\fBgwl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
.TP
[\fBmeshif\fP \fInetdev\fP] \fBmcast_flags\fP|\fBmf\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
(compile time option)
.TP
[\fBmeshif\fP \fInetdev\fP] \fBneighbors\fP|\fBn\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP]
.TP
[\fBmeshif\fP \fInetdev\fP] \fBoriginators\fP|\fBo\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-t\fP \fItimeout_interval\fP] [\fB-i\fP \fIinterface\fP]
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtransglobal\fP|\fBtg\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-u\fP] [\fB-m\fP]
(compile time option)
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtranslocal\fP|\fBtl\fP [\fB-n\fP] [\fB-H\fP] [\fB-w\fP \fIinterval\fP] [\fB-u\fP] [\fB-m\fP]

.SH JSON QUERIES

The generic netlink family provided by the batman-adv kernel module can be
queried (read-only) by batctl and automatically translated to JSON. This
can be used to monitor the state of the system without the need of parsing
the freeform debug tables or the native netlink messages.

.TP
[\fBmeshif\fP \fInetdev\fP] \fBbla_backbone_json\fP|\fBbbj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBbla_claim_json\fP|\fBclj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBdat_cache_json\fP|\fBdcj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBgateways_json\fP|\fBgwj\fP
.TP
\fBhardif\fP \fIhardif\fP \fBhardif_json\fP|\fBhj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBhardifs_json\fP|\fBhj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBmcast_flags_json\fP|\fBmfj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBmesh_json\fP|\fBmj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBneighbors_json\fP|\fBnj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBoriginators_json\fP|\fBoj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtranstable_global_json\fP|\fBtgj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBtranstable_local_json\fP|\fBtlj\fP
.TP
[\fBmeshif\fP \fInetdev\fP] \fBvid <vid>\fP \fBvlan_json\fP|\fBvj\fP
.TQ
\fBvlan\fP \fIvdev\fP \fBvlan_json\fP|\fBvj\fP

.SH EXAMPLES
The setup of a batadv interface usually consists of creation of the the main
interface, attaching of the (lower) hard-interface, adjusting of settings
and bringup of the interface:
.PP
.in +4n
.EX
# create batadv (mesh) interface bat0 with routing algorithm B.A.T.M.A.N. IV
.RB "$" " batctl meshif bat0 interface create routing_algo BATMAN_IV"
# add the (already up and running) mesh0 interface as lower (hard) interface to bat0
.RB "$" " batctl meshif bat0 interface -M add mesh0"
# change some settings to better match the requirements of the user
.RB "$" " batctl meshif bat0 orig_interval 5000"
.RB "$" " batctl meshif bat0 distributed_arp_table disable"
.RB "..."
# set the batadv (mesh) interface up before it is possible to use it
.RB "$" " ip link set up dev bat0"
.EE
.in

This only makes sure that the layer 2 functionality of bat0 is started up. It
is the responsibility of the user to make sure that the bat0 device itself
gets attached to a bridge, configured with an IP address (manually/DHCP client/...)
or integrated in other parts of the system before it gets used.
.PP
Also the attached (lower) hard-interfaces attached to the batadv interface must
be configured by the user to support transportation of ethernet unicast and
broadcast packets between its linked peers. The most common reason for a not
working batman-adv mesh are incorrect configurations of the hard-interfaces,
hardware, firmware or driver bugs which prevent that some of the packet types
are correctly exchanged.
.PP
The current status of interface can be checked using the debug tables. It is
often relevant to check from which direct neighbors discovery packets were
received.
The next step is to check the (preferred) routes to originators. These will
only be established when the metric has detected bidirectional connections
between neighbors and might have forwarded discovery packets from not directly
reachable nodes/originators.
.PP
.in +4n
.EX
# get list of neighbors from which the current node was able to receive discovery packets
.RB "$" " batctl meshif bat0 neighbors"
# get (preferred) routes the routing algorithm found
.RB "$" " batctl meshif bat0 originators"
.EE
.in
.PP
If the bat0 interface should no longer used by the system, it can be destroyed
again:
.PP
.in +4n
.EX
# destroy the interface and let the system remove its state
.RB "$" " batctl meshif bat0 interface destroy"
.EE
.in

.SH FILES
.TP
\fBbat-hosts\fP
This file is similar to the /etc/hosts file. You can write one MAC address and one host name per line. batctl will search
for bat-hosts in /etc, your home directory and the current directory. The found data is used to match MAC address to your
provided host name or replace MAC addresses in debug output and logs. Host names are much easier to remember than MAC
addresses.

.SH SEE ALSO
.BR bridge (8),
.BR dmesg (1),
.BR ip (8),
.BR ip-link (8),
.BR ping (8),
.BR tcpdump (8),
.BR traceroute (1),
.BR trace-cmd (1)
.SH AUTHOR
batctl was written by Andreas Langer <an.langer@gmx.de> and Marek Lindner <marek.lindner@mailbox.org>.
.PP
This manual page was written by Simon Wunderlich <sw@simonwunderlich.de>, Marek Lindner <marek.lindner@mailbox.org> and
Andrew Lunn <andrew@lunn.ch>