hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/Documentation/networking/batman-adv.rst
....@@ -27,24 +27,8 @@
2727 $ insmod batman-adv.ko
2828
2929 The module is now waiting for activation. You must add some interfaces on which
30
-batman can operate. After loading the module batman advanced will scan your
31
-systems interfaces to search for compatible interfaces. Once found, it will
32
-create subfolders in the ``/sys`` directories of each supported interface,
33
-e.g.::
34
-
35
- $ ls /sys/class/net/eth0/batman_adv/
36
- elp_interval iface_status mesh_iface throughput_override
37
-
38
-If an interface does not have the ``batman_adv`` subfolder, it probably is not
39
-supported. Not supported interfaces are: loopback, non-ethernet and batman's
40
-own interfaces.
41
-
42
-Note: After the module was loaded it will continuously watch for new
43
-interfaces to verify the compatibility. There is no need to reload the module
44
-if you plug your USB wifi adapter into your machine after batman advanced was
45
-initially loaded.
46
-
47
-The batman-adv soft-interface can be created using the iproute2 tool ``ip``::
30
+batman-adv can operate. The batman-adv soft-interface can be created using the
31
+iproute2 tool ``ip``::
4832
4933 $ ip link add name bat0 type batadv
5034
....@@ -52,56 +36,45 @@
5236
5337 $ ip link set dev eth0 master bat0
5438
55
-Repeat this step for all interfaces you wish to add. Now batman starts
39
+Repeat this step for all interfaces you wish to add. Now batman-adv starts
5640 using/broadcasting on this/these interface(s).
57
-
58
-By reading the "iface_status" file you can check its status::
59
-
60
- $ cat /sys/class/net/eth0/batman_adv/iface_status
61
- active
6241
6342 To deactivate an interface you have to detach it from the "bat0" interface::
6443
6544 $ ip link set dev eth0 nomaster
6645
46
+The same can also be done using the batctl interface subcommand::
6747
68
-All mesh wide settings can be found in batman's own interface folder::
48
+ batctl -m bat0 interface create
49
+ batctl -m bat0 interface add -M eth0
6950
70
- $ ls /sys/class/net/bat0/mesh/
71
- aggregated_ogms fragmentation isolation_mark routing_algo
72
- ap_isolation gw_bandwidth log_level vlan0
73
- bonding gw_mode multicast_mode
74
- bridge_loop_avoidance gw_sel_class network_coding
75
- distributed_arp_table hop_penalty orig_interval
51
+To detach eth0 and destroy bat0::
7652
77
-There is a special folder for debugging information::
53
+ batctl -m bat0 interface del -M eth0
54
+ batctl -m bat0 interface destroy
7855
79
- $ ls /sys/kernel/debug/batman_adv/bat0/
80
- bla_backbone_table log neighbors transtable_local
81
- bla_claim_table mcast_flags originators
82
- dat_cache nc socket
83
- gateways nc_nodes transtable_global
56
+There are additional settings for each batadv mesh interface, vlan and hardif
57
+which can be modified using batctl. Detailed information about this can be found
58
+in its manual.
8459
85
-Some of the files contain all sort of status information regarding the mesh
86
-network. For example, you can view the table of originators (mesh
87
-participants) with::
60
+For instance, you can check the current originator interval (value
61
+in milliseconds which determines how often batman-adv sends its broadcast
62
+packets)::
8863
89
- $ cat /sys/kernel/debug/batman_adv/bat0/originators
90
-
91
-Other files allow to change batman's behaviour to better fit your requirements.
92
-For instance, you can check the current originator interval (value in
93
-milliseconds which determines how often batman sends its broadcast packets)::
94
-
95
- $ cat /sys/class/net/bat0/mesh/orig_interval
64
+ $ batctl -M bat0 orig_interval
9665 1000
9766
9867 and also change its value::
9968
100
- $ echo 3000 > /sys/class/net/bat0/mesh/orig_interval
69
+ $ batctl -M bat0 orig_interval 3000
10170
10271 In very mobile scenarios, you might want to adjust the originator interval to a
10372 lower value. This will make the mesh more responsive to topology changes, but
10473 will also increase the overhead.
74
+
75
+Information about the current state can be accessed via the batadv generic
76
+netlink family. batctl provides a human readable version via its debug tables
77
+subcommands.
10578
10679
10780 Usage
....@@ -142,48 +115,21 @@
142115 $ dmesg | grep batman-adv
143116
144117 When investigating problems with your mesh network, it is sometimes necessary to
145
-see more detail debug messages. This must be enabled when compiling the
146
-batman-adv module. When building batman-adv as part of kernel, use "make
118
+see more detailed debug messages. This must be enabled when compiling the
119
+batman-adv module. When building batman-adv as part of the kernel, use "make
147120 menuconfig" and enable the option ``B.A.T.M.A.N. debugging``
148121 (``CONFIG_BATMAN_ADV_DEBUG=y``).
149122
150
-Those additional debug messages can be accessed using a special file in
151
-debugfs::
123
+Those additional debug messages can be accessed using the perf infrastructure::
152124
153
- $ cat /sys/kernel/debug/batman_adv/bat0/log
125
+ $ trace-cmd stream -e batadv:batadv_dbg
154126
155127 The additional debug output is by default disabled. It can be enabled during
156
-run time. Following log_levels are defined:
128
+run time::
157129
158
-.. flat-table::
130
+ $ batctl -m bat0 loglevel routes tt
159131
160
- * - 0
161
- - All debug output disabled
162
- * - 1
163
- - Enable messages related to routing / flooding / broadcasting
164
- * - 2
165
- - Enable messages related to route added / changed / deleted
166
- * - 4
167
- - Enable messages related to translation table operations
168
- * - 8
169
- - Enable messages related to bridge loop avoidance
170
- * - 16
171
- - Enable messages related to DAT, ARP snooping and parsing
172
- * - 32
173
- - Enable messages related to network coding
174
- * - 64
175
- - Enable messages related to multicast
176
- * - 128
177
- - Enable messages related to throughput meter
178
- * - 255
179
- - Enable all messages
180
-
181
-The debug output can be changed at runtime using the file
182
-``/sys/class/net/bat0/mesh/log_level``. e.g.::
183
-
184
- $ echo 6 > /sys/class/net/bat0/mesh/log_level
185
-
186
-will enable debug messages for when routes change.
132
+will enable debug messages for when routes and translation table entries change.
187133
188134 Counters for different types of packets entering and leaving the batman-adv
189135 module are available through ethtool::
....@@ -214,7 +160,7 @@
214160 #batman on irc.freenode.org
215161 Mailing-list:
216162 b.a.t.m.a.n@open-mesh.org (optional subscription at
217
- https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n)
163
+ https://lists.open-mesh.org/mailman3/postorius/lists/b.a.t.m.a.n.lists.open-mesh.org/)
218164
219165 You can also contact the Authors:
220166