Retrospect - B.A.T.M.A.N. in 2009

Added by Marek Lindner almost 13 years ago

Now that the end of the year is close, it is time to lean back for a moment and review the events & achievements happening throughout the past year.

We published 2 bugfix releases of our batmand [layer 3] branch (batmand 0.3.1 and "batmand 0.3.2::/news/5) as well as a major milestone of our batman-adv [layer 2] kernel module (batman-adv 0.2). Deprecated branches (batman-advanced userland version and vis-advanced) were removed from the repository because their functionality was replaced by the kernel module. The newly created tool 'batctl' (former battools) matured enough to be added to the standard release.

The trac based webinterface celebrated its first birthday a few days ago. Especially in the first months of 2009 we spent quite some time to ease the transition and improve the setup to serve better the growing needs of the project. During the late summer was born which plays a crucial role in our efforts to merge the batman-adv kernel code into the linux kernel. The git repository got up to speed in autumn and the first set of patches was accepted during the 2.6.33 merge window.

In April we took part in the Paris WirelessBattleMesh meeting with French hackers and other routing protocol developers to swap ideas and to get up to date with each others' latest improvements The follow-up meeting in Brussels was a very good occasion to prepend a BATMAN developer meeting in which we squashed bugs discussed the current development strategy upcoming releases and BATMAN V. At the 26C3 we are going to come together again - drop us a mail if you want to meet us there.

In 2010 B.A.T.M.A.N. will continue to evolve. Expect more linux kernel integration, another batman-adv major release as well as B.A.T.M.A.N. V.

We wish you all a successful 2010,

the B.A.T.M.A.N. team

B.A.T.M.A.N. V outlook

Added by Marek Lindner almost 13 years ago

Now that B.A.T.M.A.N. IV is out there and works quite well, it is time to merge our gained experience and work towards B.A.T.M.A.N. V. This page contains the first collection of ideas of what the improvements could look like. To keep the list size in a digestable format we had to draw a line somewhere. Therefore it only contains items which come with a plausible concept or (even better) a proof-of-concept patch. Nevertheless, it is not final yet. Over time some ideas might proove to not work or new ideas might arise. Feel free to contact us] if you want to [[Contribute.

Convergence speed:

In order to increase the convegence speed B.A.T.M.A.N. IV forwards all valid OGMs coming by and thus increasing the probability of more packets coming through. To avoid routing problems it fixes the TQ and TLL values of packets not coming from the best neighbor. It turned out this behaviour of forward and replace may cause transient routing loops under certain conditions and the convergence speed leaves room for improvements.
B.A.T.M.A.N. V will forward packets from the best neighbor only without replacing any values. Furthermore, in case of packet loss it will detect when an OGM packet from its best neighbor did not arrive and will then broadcast the missing packet by itself (using the last known sequence number & TQ value). That way, B.A.T.M.A.N. increases the probability of transmitting OGMs over a longer chain of nodes. B.A.T.M.A.N. V could send the originator interval along with the OGM to let other nodes determine whether an OGM was missed or not.

Overhead reduction:

The traffic B.A.T.M.A.N. IV generates to discover the best path through the network is quite low compared to other protocols, but especially when B.A.T.M.A.N. has many single hop neighbors which rebroadcast each others OGMs we see room for improvements. B.A.T.M.A.N. V will split the well-known originator message into two different message types. The OGM will remain but only be used to flood the TQ throughout the network. The new message type (a name needs to be found) will contain the link qualities of the single hop neighbors only. This message won't be rebroadcasted and just reaches the local neighborhood. These local message can be sent much more often than the global TQ messages and thus reduce the traffic [nearly just create a linear growth of traffic with more nodes in the local neighborhood instead of a squared amount].

Starving mode:

Fast moving nodes always have the problem of adjusting their routing information in time. They can choose to send more routing information, so that their environment can adjust to them but stationary nodes won't do the same and increase the mobile node's adaption time greatly. However, when a B.A.T.M.A.N. V node detects that his local environment changed quickly he will enter the starvation mode. In this mode the node will actively try to confirm a working route as fast as possible by sending a "batman ping" to its new neighbors. Each B.A.T.M.A.N. neighbor will try to forward the message to its destination, once arrived there it will travel back. If the mobile node receives the reply it can change its route towards the new neighbor without waiting for OGMs as the route has been verified.

Mesh bonding mode:

In certain setups it might be desirable to use 2 or more dedicated wifi links (towards your direct neighbor) at the same time to increase the bandwidth. B.A.T.M.A.N. V will provide the mechanisms to automatically detect neighbors it could bond with and establishes the bonded connection.

Incoming interface based routing:

B.A.T.M.A.N. IV will find the best route through the network which does not fully utilize the capabilities of "multi-link nodes". If a single node is able to maintain several connections via its various interfaces to its neighbors the protocol should consider switching the interfaces in order to reduce latency and increase bandwidth. To achieve this B.A.T.M.A.N. V will create a routing table on a per interface basis. Whenever a payload packet arrives at the node it will lookup the path using the routing table for that interface. Imagine a network full of nodes having 2 wifi interfaces - B.A.T.M.A.N. V would try to make use of all existing interfaces to avoid interference and maximize throughput.

There are numerous other ideas such as faster HNA handover, optimized multicast support, etc which need to mature before they can be added to the list.

Wireless Battle Mesh (Brussels) - the 2nd encounter

Added by Marek Lindner about 13 years ago

This time, the Wireless Battle Mesh was held in the Belgium hackerspace 'OKNO' (Brussels). The techy and artistic environment provided a perfect athmosphere for both development and testing as well as convivial talks and discussions. We (the batman developers) used the occasion to gather some days before the official events started to dedicate that time entirely to B.A.T.M.A.N. related topics. Unfortunately, it was not possible to get all batman developers to join the event.

We prepared the (at that time) pending batman-adv 0.2 release, spoke about remaining issues and fixed outstanding bugs. One of the bigger problems were the temporary routing loops Andrew & Yang discovered. The tricky part was the number of nodes required to trigger the problem combined with the amount of logfiles to be analyzed before we could get even close to a solution. Simon grabbed the first part of the problem and developed a setup that would allow us replaying the situation to retrieve logfiles and test patches. His setup works great and will allow us better testing in the future (besides, he fully documented his work). Marek worked on the other side of the story and created "batctl bisect" which is able to parse large logfile sets to search for routing loops, reconstruct the OGM flow throughout the network, etc. That ultimately put us in the position to fix the issue.

Another big topic was the upcoming linux kernel integration and its impact on the project itself. Getting your code "mainline" is much more than "just" coding style changes. We discussed several kernel interface changes that will need to be implemented in the near future to keep the kernel hackers happy. To a certain degree it definitely has its advantage because some areas were a proof of concept at the beginning, meant to be cleaned later on which did not happen until now. Together with Andrew (who is driving the kernel integration process) we came up with a todo list that you can find at the bottom of this page.

Nico from the OpenWRT team had developed a neat configuration deployment tool that could reconfigure a whole bunch of routers to run a certain configuration. Linus fine tuned a configuration set for an easy batman-adv deployment which includes a vis server configuration as well as remote logging (to bisect it later on). You can grab this configuration from the wiki. In combination with Nico's deployment tool it should allow us/you to spend more time on testing (instead of configuring) at the next Wireless Battle Mesh. ;)

For the testing the Belgians prepared a bunch of "portable outdoor boxes" plus mobile power supplies that allowed rapid deployment. They were mainly used to deliver test results regarding the question whether 2 single radio nodes (both 2.4GHz) connected via ethernet would be able to boost the performance by using both wifi devices in different channels or whether the short range interference would decrease the performance. The attendants from Italy (Saverio Proto and Claudio Pisa) created a document explaining the setup and test method as well as the results. The full report from the WBM organizers also is worth reading.

Many thanks also go to the attendants from Belgium, who had been organising everything and offered places to sleep at their hackerspace and also showed us some of their pubs and restaurants with their delicious food and beer :).


the B.A.T.M.A.N.-team

The batman developers that could make it to Brussels (from left to right):

Linus, Marek, Simon & Andrew

Batman-adv 0.2 released

Added by Marek Lindner about 13 years ago

The B.A.T.M.A.N. team is pleased to announce the availability of the second batman-adv release which brings major improvements, new features, changes along the way and a series of bugfixes. As the kernel module always depends on the kernel it was compiled against it does not make sense to provide binaries. However, you will find signed source tarballs for the module and batctl:

Important changes

With this release we believe that the kernel module is fully capable to replace a routing daemon feature wise as well stability wise. Therefore the batman-adv user space daemon (which was marked deprecated since the last release) as well as the vis-adv daemon have been removed from our repositories as they are no longer supported. We urge all remaining users to consider a migration towards the the kernel module.


Special thanks go to:

  • Sven Eckelmann who continuously provides us with patches and advice whenever problems show up
  • Andrew Lunn & Yang Su for their analysis of the routing protocol which helped us to identify temporary routing loops in the code
  • Linus Luessing & Freifunk Luebeck for the rigorous testing & bug reporting of all (im)possible race conditions they encountered
  • Jacob Marble who tried to find a new home for our extravagant mailing list requirements and gave birth to the batctl idea

Thanks to all people sending in patches (in no particular order):


The module has undergone some major changes to better fit into the event based nature of the kernel. We removed a number of timers (e.g the new interface detection) which also greatly reduces the risk of race conditions. Also new is the packet queue that allowed implementing the aggregation (already known from the user space implementation) as well as transmission retry (ARQ) for payload broadcasts because we noticed most broadcasts vanish in transit. This feature merits some extra attention as it is the first in which the routing module influences the payload traffic directly to enhance the mesh experience. We also spent quite some energy to fix bugs in the routing algorithm that triggered temporary routing loops, squashed a TTL code bug and removed the ghost entries
from the originator table. The whole code received linux coding style adjustments, refactoring & cleanups. Furthermore all kernel version compatibility code has been unified in compat.h. The internal vis server received another output format (JSON) plus secondary interface export functionality in the dot draw format. Numerous small bugs were fixed such as using the random ethernet generator from the kernel for better randomness, exporting the version via /sys/module/batman_adv/version, fixing alignment issues, race conditions and deadlocks.


Although this is the first release of batctl it carries the same release version as the kernel module (for the sake of simplicity). It is based on the work of Andreas Langer who created the battools which were never officially released. Since then it has been extended to the point that it serves as configuration utility, monitoring and debugging application. It allows to modify the module parameters, reading the logfiles & tables, decapsulate embedded packets on the fly, traceroute to / ping mac addresses, generate sequence number graphs and more. Check the README to get an impression.

road ahead

The batman-adv development lying ahead can be separated into 2 big chunks: The linux kernel integration already started and we began working on batman's move into the linux land (more information can be found on - expect follow up news in the coming weeks. In the meantime a large number of ideas are flying around how to further improve the B.A.T.M.A.N. algorithm to increase its convergence speed, reduce traffic overhead and much more. A first idea collection will be published soon.

Happy routing,

The B.A.T.M.A.N. team

B.A.T.M.A.N. goes mainline

Added by Marek Lindner about 13 years ago

Since its existence the batman-adv kernel module has been residing outside of the linux kernel and needed to be downloaded / compiled / installed seperately. We intend to change this by merging the batman-adv kernel module into the linux mainline tree. Greg Kroah Hartman has agreed to include the module as part of the staging drivers as a first step.


  • Bringing the 0.2 release into staging asap.
  • After gathering feedback from other kernel hackers build patches on top of 0.2 to conform with the linux kernel coding style & rules. The result will be version 0.2.5.
  • In parallel we will start the 0.3 branch in which new features can be included as well as the linux patches from the 0.2.5 branch.

How are we going to tackle this ?

As the kernel developers prefer git over SVN we created our own git repository which imports all changes from our SVN to make backporting changes as easy as possible. git allows us to manage different patchesets for the kernel hackers. Checkout to get the git repository and learn how to use it.


We maintain a TODO file in the git repository that you can see here:

If you are interested in helping us out you can grab one item, make a patch and send it to our Mailinglist.

Batman 0.3.2 released

Added by Marek Lindner over 13 years ago

Hi folks,

the B.A.T.M.A.N. team is releasing the second bugfix and maintenance release of the 0.3 batman daemon which also contains smaller enhancements in various areas. It's mostly an update to batman 0.3 and does not contain major routing protocol changes. We offer signed source tarballs:

In the past many new users experienced difficulties using batman to connect to the internet as it was necessary to enable NAT on the tunnel manually. With this release we address this issue. The batman daemon will try to locate the iptables binary to setup the masquerading automatically. This behaviour can be turned off using the "--disable-client-nat" option. If the outgoing packets are not masqueraded (the iptables binary wasn't found / the automatism deactivated) batman will switch to the "half tunnel" mode which operates without masquerading. This mode requires the gateway to have a routing entry for each client that accesses the internet (e.g. non-batman clients may be announced via HNA).

The whole HNA code has been rewritten and now supports multiple nodes announcing the same network segment. You may have one non-batman network but several entry points to it. All border nodes can announce the same network. Receiving batman nodes choose their entry point based on the best TQ value available. The packet aggregation that exists since batman 0.3 has been enabled by default.

Thanks to Benjamin Henrions persistence the hop penalty was modified to make use of multi radio interfaces to maximize throughput. Nathan Wharton and Sven Eckelmann debugged alignment issues on Avila boards. Sven also improved the kernel routing communication and contributed many more patches. Antoine van Gelder developed an extension for the vis server that allows the vis server to export its data in the JSON format if it was started using the "-j" parameter.

In the coming months we want to focus on improving the protocol. Therefore we will start the batman 0.4 branch soon.

Happy routing,

The B.A.T.M.A.N. team

Wireless Battle Mesh 2009 (Paris) - aftermath

Added by Marek Lindner over 13 years ago

The /tmp/lab crew called wireless mesh protocols to a gathering in Paris. As it seemed to be a good place to exchange ideas and testing our latest stuff we decided to join this event.

We were positively surprised to find out that the area around the /tmp/lab
is very suited for wireless testing: lots of free space, packet loss and collisions.

Nico from the OpenWRT team prepared all images + packages for the various setups and helped all teams to solve OpenWRT related issues. Great job! The B.A.T.M.A.N. project was supported by a French team consisting of massoud, xeu and loloster. They helped us flashing the routers, placing them outside and configuring batman. Before this event they were not using batman at all, hence it was very interesting for us watching them interacting with the batman daemon. They managed the setup very well and we had a lot of fun.


As we wanted to use the occasion to test batman layer 3 we decided to run the trunk (revision 1244 at this time). On top of that we were running the batman vis server to visualize the topology
using s3d. The debian s3d packages worked like a charm - thanks Sven!

The good:

  • Batman (including all its flavors) has an excellent OpenWRT integration. The batman team was the first one ready to deploy despite the lack of mesh / batman experience (other teams needed considerably longer).
  • The daemon is easy to setup & manage. We did not give introduction talks or training of any sort to our French friends. We let them start and whenever needed we explained a feature to them (e.g. how to activate internet gatewaying).
  • The routing was stable and at its optimum.
  • The traffic overhead created by batman is reasonable (much lower than other protocols but not the lowest). There is room for more improvements.
  • Batman handles full & half internet tunnels without problems. No other protocol has a working solution for multiple natted gateways although we heard whispers that the idea of tunneling towards the gateway is spreading.
    We are looking forward to compare the implementations.
  • The 3D visualization of the topology still is an eye opener. ;-)

Lessons learned:

  • We can reduce the traffic overhead even more. Batman could throw away quite some packets without hurting the routing decision.
  • The packet aggregation works but the TQ values are going down if the aggregation is enabled. It might be related to a higher probability of collisions when the packet is bigger or we have a bug somewhere.
  • Compared to other protocols batman is slow converging over many hops.

The event was a great success. We had many discussions with other mesh people which will help all involved parties to move forward. For future events it would be nice to have a database of difficult scenarios for comparing protocols with each other. Also, more testing on layer 2 would be interesting which requires hardware that supports linux 2.6.

We are looking forward to the next Wireless Battle Mesh,

the B.A.T.M.A.N. team

Batman 0.3.1 released (1 comment)

Added by Marek Lindner almost 14 years ago


the B.A.T.M.A.N. team is pleased to announce the availability of batman 0.3.1 a bugfix and maintenance release. As usual, we provide signed source tarballs:

As you may have noticed we slighty modified the folder structure to seperate binaries and sources better. Also, we will keep providing older source tarballs to support the various distributions better. In addition, we added a release "bundle" folder which contains related source packages:

Many people outside the B.A.T.M.A.N. team contributed to make this release possible. Thanks to everyone that helped us. Special thanks goes to Antonio and the crew. They provided us with bug reports, test beds and ideas to improve the overall batman experience. Also, we wish to thank Sven Eckelmann for his endless stream of patches and thoughtful hints.

During the past months the code received improvements all over the place. Nearly all functions were touched. The packet aggregation was debugged and improved. Areas with a high density of nodes suffered from bogus routing information which was fixed. BSD compability was committed. Now, on a changing route batman adds new routes to the kernel routing table before the old routes are deleted to avoid race conditions. The batgat kernel module received many fixes that improve stability. The makefile reduced the verbosity of its output to allow easy distinctions between warnings and commands.

Happy routing,


Batman-adv 0.1 released

Added by Marek Lindner almost 14 years ago

(posted by Marek on Dec 28th 2008)


today, after a 6 months stabilization and debugging phase we release the first milestone towards a stable version: batman advanced 0.1. As this implementation resides in the kernel land only we wanted to make sure its stability before releasing it to the public.

This batman implemention is marked with the label "advanced" to outline the fact that it operates on layer 2 (mac layer) as opposed to batman which operates on layer 3. To gain optimal performance it resides in the kernel as a module and can be turned on/of or configured via the /proc/net/batman-adv/ interface.

Unfortunately, we can not offer precompiled packages for your kernel as the module sources need to be linked against your very own kernel headers. If you are using debian you will find packages that you can install via apt-get. OpenWRT also has the package included. If you intend to use the module on your own system, simply download the sources, build and load the module.

You can find the sources here:

Special thanks to Sven Eckelmann and Scott Raynel who spent a considerable amount of time testing, debugging and patching the sources. We included all their patches which allow us to release today.

The biggest changes since the beta release are:
  • support latest kernel version (2.6.20 - 2.6.28)
  • LOTS of cleanup: locking, stack usage, memory leaks
  • Change Ethertype from 0x0842 to 0x4305 unregistered at IEEE, if you want to sponsor an official Ethertype ($2500) please contact us

We welcome any feedback/patches/ideas,

The B.A.T.M.A.N. developer team

Batman-adv now available in Debian

Added by Marek Lindner about 14 years ago

(posted by Marek on Nov 16th 2008)

Even if the news is still some days old - its worth mentioning: batman-advanced is now available in Debian!

The packages are available through your favorite dpkg frontend (apt-get, aptitude, ...) using the unstable repositories. To follow the package development you can visit the following pages:

batman-adv-source contains the source code and can be compiled for your kernel using module-assistant [1]. batman-adv-battool contains the battool which provides ping, traceroute and other tools for the batman-adv network.

Big thanks to Sven Eckelmann, Simon Wunderlich and Holger Levsen for their work on these packages. :)

BTW, you also can find the current batman stable (0.3) in the lenny and unstable repositories. Here the respective package pages:



Also available in: Atom