Short for Better Approach to Mobile Ad-Hoc Networking (advanced), this brilliantly-acronymed open-source project is a routing protocol for multi-hop ad-hoc mesh networks. In other words, it forwards all traffic until it reaches the destination, emulating a virtual network switch with all notes participating: therefore all nodes appear to be link-local and are unaware of the overall network’s topology, making them unaffected by any network changes.
Developed by German wireless radio initiative Freifunk, B.A.T.M.A.N. decentralizes knowledge about the best route through the network, eliminating the need to spread information to every point in the network. Individual nodes only save information about where it received the data from, then use that to send it along the path.
In 2007, they started trying to route on Layer 2 instead of the conventional Layer 3. From that, Batman-adv was born: instead of sending UDP packets and manipulating routing tables, it provides a virtual network interface for the transparent movement of packets.
Batman-adv is not limited to a certain interface type, meaning you can use any interface that can be found with iconfig or even Bluetooth. In addition, you can run almost any protocol above Batman-adv, such as IPv4, IPv6, DHCP, and IPX; nodes can participate in a mesh without an IP; and the kernel implementation makes it less processor intensive, making it especially good for use on smaller devices like mobile phones.
In addition, to make sure the user still has a convenient tool to configure and debug the protocol’s kernel module, the Batctl tool was developed: it offers a simple overview of all the module’s setting and status information, and contains layer 2 ping, traceroute, and tcpdump, the virtual network switch being transparent for protocols above layer 2.
The Batman-adv kernel module has been part of the official Linux Kernel since 2.6.38.