Documentation/networking/batman-adv.rst
Source file repositories/reference/linux-study-clean/Documentation/networking/batman-adv.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/networking/batman-adv.rst- Extension
.rst- Size
- 5708 bytes
- Lines
- 169
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
==========
batman-adv
==========
Batman advanced is a new approach to wireless networking which does no longer
operate on the IP basis. Unlike the batman daemon, which exchanges information
using UDP packets and sets routing tables, batman-advanced operates on ISO/OSI
Layer 2 only and uses and routes (or better: bridges) Ethernet Frames. It
emulates a virtual network switch of all nodes participating. Therefore all
nodes appear to be link local, thus all higher operating protocols won't be
affected by any changes within the network. You can run almost any protocol
above batman advanced, prominent examples are: IPv4, IPv6, DHCP, IPX.
Batman advanced was implemented as a Linux kernel driver to reduce the overhead
to a minimum. It does not depend on any (other) network driver, and can be used
on wifi as well as ethernet lan, vpn, etc ... (anything with ethernet-style
layer 2).
Configuration
=============
Load the batman-adv module into your kernel::
$ insmod batman-adv.ko
The module is now waiting for activation. You must add some interfaces on which
batman-adv can operate. The batman-adv mesh-interface can be created using the
iproute2 tool ``ip``::
$ ip link add name bat0 type batadv
To activate a given interface simply attach it to the ``bat0`` interface::
$ ip link set dev eth0 master bat0
Repeat this step for all interfaces you wish to add. Now batman-adv starts
using/broadcasting on this/these interface(s).
To deactivate an interface you have to detach it from the "bat0" interface::
$ ip link set dev eth0 nomaster
The same can also be done using the batctl interface subcommand::
batctl -m bat0 interface create
batctl -m bat0 interface add -M eth0
To detach eth0 and destroy bat0::
batctl -m bat0 interface del -M eth0
batctl -m bat0 interface destroy
There are additional settings for each batadv mesh interface, vlan and hardif
which can be modified using batctl. Detailed information about this can be found
in its manual.
For instance, you can check the current originator interval (value
in milliseconds which determines how often batman-adv sends its broadcast
packets)::
$ batctl -M bat0 orig_interval
1000
and also change its value::
$ batctl -M bat0 orig_interval 3000
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.