Project

General

Profile

News

GSoC 2012 Midterm Interview

Added by Simon Wunderlich over 12 years ago

Half-time for our Google Summer of Code projects - time to pause for a moment and see what has been accomplished in the last few weeks. We asked our students Edo Monticelli, Martin Hundebøll and Spyros Gaster to bring their work to a state of a working prototype, which can be found in their respective git repositories on https://git.open-mesh.org/ or on the wiki in their respective project pages (Edo: GSOC2012_BW, Martin: Fragmentation, Spyros: BackwardsCompatibility). We have also interviewed them about their experiences with the Google Summer of Code, which we don't want to hold back. :)

Question: The midterm of your GSoC project has been reached. Can you describe in a few sentences what you have achieved so far and which tasks remain for the second half of this GSoC ?

Martin: I am working with a new implementation of the fragmentation feature in batman-adv. The current implementation only fragments packets of type BATADV_UNICAST, but a more and more features are added to batman-adv, other types should be fragmented as needed.

While we are at it, we also want to add support for more than two fragments per packet, and merging of fragments if they are forwarded on an interface with large enough MTU.

So far, I have developed a working prototype of the new fragmentation. It is (main-)feature complete in the sense that our goals for the new fragmentation are implemented and work: packet-type-independent, multiple fragments, routing of fragments. The solution is based on a encapsulation-of-encapsulation, where (the encapsulating batman-adv) packets with size bigger than MTU, are split and encapsulated with a fragment header.

Now I need to make the code SMP- and architecture-safe, and of course find and fix bugs. Also, my mentors will probably have a lot of suggestions that I need to consider and work with.

Spyros: My project is extending the batman-adv protocol to be backwards compatible through the use of tvlv(Type Version Length Value) information messages. So far I have made a working prototype for the project which transfers the gateway announcement tvlv. Now I have to polish the existing code, do some bug-fixes (thank you for your remarks everyone) and finally include the right function calls in various places in the code so as tvlvs are part of the protocol.

Edo: I am implementing in kernel space a protocol for the bandwidth measurement, in order to have a lightweight approximation of TCP behavior. At the moment the protocol is working with fixed size window and cumulative acknowledgment.

What should be done in the next month is a lot of testing and bugfixing. Some features are still missing, like the possibility to choose if a node is sender or receiver.

Question: Looking at the past weeks what have been your greatest challenges and how did you master them ?

Martin: It is always wonderful to live in the world of SKB-pointers, where the whole thing may break, if you forget to (re)set a single pointer in the skb-struct. I have spent quite some time with printk's and skb->foo's :)

Spyros: I had some trouble making myself comfortable with the linux kernel coding style and learn how to interpret the kernel panic logs. Even though I'm not a pro at both of them I have at some degree mastered them with a solid amount of help from the mentors and the community and some scolding of course.

Edo: The worst moment was at the beginning, when I had to start coding with very small knowledge of the batman code and no experience of kernel-space programming. The greatest difficulties were bound to kernel related techniques and features, like workqueue and locks.

I have been able to overcome difficulties by looking at the batman code that manages similar issues and with the community help (mentor and IRC people).

Question: What has been the most exciting experience relating to your GSoC project so far (e.g. mastering a technique, learning new approaches, successes, etc) ?

Edo: When the project worked. Also to solve some hard bug has been of great satisfaction!

Martin: I find it very exciting that I can develop and contribute an entire feature to batman-adv (i.e. fragmentation). By being the author of such a feature, one feel responsible for it and get to take one step up the "batman-adv-developer-ladder".

Spyros: Pretty much everything about gsoc has been exciting but if I have to pick just one aspect I choose the part that I'm working with others on a code-base written by them. So far I had only done university assignments which even though they were enlightening enough, they were just newbie-level example code compared to the GSoC requirements. Now I hope I get to see how the pros do it.

Question: Could the batman-adv organisation (website, community, mentors, individual supporters, etc) have done anything different to facilitate your life as GSoC student ? Was there something you considered too complicated or even scary ?

Spyros: No, the organisation has already provided more than enough for me. The mentors provide much of their time for feedback and tutoring meetings and the community is there when I have a question however stupid the question is.

Edo: In general I found the batman organization adequate and of great help.

Martin: I think my mentor(s) should visit me in Denmark. If not during the GSoC time, then at least within 2012.

If I should mention one serious improvement also, it could be more assistance when defining the project goals and writing the application.

Question: Do you have any advice, words of wisdom or valuable feedback you'd like to share with future batman-adv GSoC students (with regards to expectation, preparation and time consumption for example) ?

Edo: I found effective to agree with my mentor and the batman community on the tasks to develop and how to develop them, so that the project could benefit of their advice. So the help of the community for my has been fundamental.

Martin: If you want to be a GSoC-student with batman-adv in 2013, you might as well get started now. Download the batman-adv source, install it on three laptops and get your first mesh running. Then buy a book about SKB's and kernel development, and ask on IRC, if there are any low hanging fruits, that you can pick to become familiar with batman-adv.

By getting familiar before the beginning of next years GSoC, you make it a lot easier to fulfill the goals!

Spyros: Start early, never stop, familiarize yourself with everything first, listen to the mentors, and above all when in trouble and you cant find the answer online ask at the channel. You are in open source and the greatest thing is the community and the incredible geeks which are part of it. Oh and buy the mentors many beers when you see them, put that gsoc money to good use :P(kidding)

Thanks a lot to the students for their good work, keep it up!

Happy Routing,

The B.A.T.M.A.N. Team

Batman-adv 2012.2.0 released

Added by Marek Lindner almost 13 years ago

Today, the B.A.T.M.A.N. team releases batman-adv 2012.2.0, packed with new features and improvements in various subsystems as well as the usual set of fixes and cleanups. As the kernel module always depends on the Linux kernel it was compiled against, it does not make sense to provide binaries on our website. As usual, you will find the signed tarballs in our download section:

https://downloads.open-mesh.org/batman/releases/batman-adv-2012.2.0/

as well as prepackaged binaries in your distribution.

Important changes

This release comes with a completely rewritten bridge loop avoidance (also known as bridge loop avoidance II). The concept of the first bridge loop avoidance was simple and worked well in small size LANs while larger networks suffered from the overhead. The new concept is very different and requires changes in your batman-adv configuration. If you were using the bridge loop avoidance you should consult our documentation before upgrading your network(s).

The default "per hop" penalty was increased to encourage batman-adv to take shorter routes. If you notice altered routing behavior and are unhappy with the result you should revisit the hop penalty configuration option.

Thanks

Thanks to all people sending in patches:

and to all those that supported us with good advice, code review and/or rigorous testing:

batman-adv

The new bridge loop avoidance certainly is the most prominent of the new features this release has to offer (completely replacing the old bridge loop avoidance mechanism). The major design goals were performance and scalability. Since the old implementation was relying on a single gateway to be the main gateway to the LAN for everybody else it created a performance bottleneck. Furthermore, the LAN was used to send traffic to and receive data from the main gateway. With the number of bridged gateways grew the amount of broadcast traffic in the LAN. The new bridge loop avoidance splits the client responsibility amongst all participating gateways. Each gateway "claims" the clients it feels responsible for and ignores the traffic from all other clients to avoid the bridge loop. It also is able to handle multiple VLANs on top of the batX interface connected to different topologies. All details about the loop avoidance mechanism are explained in our documentation section.

The routing code also received lots of attention: The recently added routing protocol abstraction was further polished and extended to better accommodate the needs of alternative routing protocols. B.A.T.M.A.N. IV protocol has been enhanced with an additional flag to apply stricter forwarding rules to OGMs which allows the protocol to avert routing loops in certain corner cases. Also, the B.A.T.M.A.N. IV sequence numbers are now randomized at startup to reduce the probability of a collision and thus, slowing down the protocol in the startup phase. Rerouting of unicast payload packets during a roaming phase is handled with greater efficiency to avoid as much packet loss while roaming as possible.

All manual HZ-jiffies-calculations have been replaced with the in-kernel jiffies_to_msecs() function. To facilitate comprehension of the code base the ETH_ALEN macro is used instead of hardcoded numeric constants. The batman-adv internal bitarray operations have been converted to the efficient in-kernel bitmap operations. It was discovered that the TT-Request packet did not always send the tt-crc field in network byte order, thereby invalidating the packet. This has been fixed alongside the suboptimal DHCP option list parser used by the gateway extension. OGM sequence numbers now are always printed as unsigned long to avoid misinterpretation while printing the numbers in the debug log.

batctl

The batctl utility supports the new bridge loop avoidance by providing an option to conveniently enable/disable the bridge loop avoidance and exports the bridge loop avoidance claim table. It will also warn about features that haven't been compiled into batman-adv such as debug log and bridge loop avoidance. The mini-tcpdump learned to display the newly added 'not best hop flag' when parsing OGMs.

Happy routing,

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

GSOC 2012: The students and their projects

Added by Marek Lindner almost 13 years ago

For this year's Google Summer of Code Freifunk granted us a total of 3 slots for students working on batman-adv. Many thanks to the Freifunk GSoC organizers for supporting us!

We asked the students to write a short introduction about themselves and their project as you can see below. Expect more information about each project to be published as the GSoC 2012 unfolds.

Edo Monticelli

Hi,

my name is Edo Monticelli, I was born in Cremona, Italy, 27 years ago. I am currently attending the last year of Master's in Computer Science at the University of Trento. My favourite programming languages are C and Python and I like functional programming too.

During my studies I attended several courses on various networking topics, including nomadic communications and mesh networking. I am really interested in Free Software philosophy and excited by the possibility to participate! I hope that Google Summer of Code will be a good way to further improve my coding skills and to help the community!

My GSOC project aims at the implementation of a tool for throughput measurement. This will be a lightweight, kernel space tool: user space programs, like iperf or netperf, need a larger amount of computational resources to align data and copy it between kernel and user memory. This workload may be too much on routers or similar devices and lead to wrong test results. My tool will implement a much simplified version of TCP to give an idea of the throughput that can be obtained between two nodes.

Further details and the project state can be found at the project wiki: bandwidth meter

Spyros Gasteratos

Hi,

My name is Spyros Gasteratos, I'm 22 years old, I live in Greece and I'm currently attending the 5th year of a Bachelor in Computer Science at the National University of Athens.
I got involved with batman-adv in the last battle-mesh(2012) and when I dont work for my project I try to get my degree.
My project is the implementation of backwards compatibility in batman-adv by use of TVLVs.
Further details and the project state can be found at the project wiki: TVLV project.

Martin Hundebøll

Hi,

my name is Martin Hundebøll, currently 27 summers old and living Denmark. I finished my master in Networks and Distributed Systems last summer and started my PhD in October. I got introduced to batman-adv through my master thesis, which was about Network Coding in Wireless Mesh Networks, for which we obviously needed a routing protocol :)

My current contributions to batman-adv are the catwoman branch and various minor patches. Besides working with batman-adv, I do the practical work in our research group, which covers implementing new ideas (when analysed and simulated by other group members) and configuring and maintaining test setups.

My GSOC project is to improve the current fragmentation functionality to support arbitrary packet types instead of just unicast packets. More information about the projects and its progress is found at Fragmentation.

Translation table in a nutshell

Added by Marek Lindner almost 13 years ago

For quite some time the term "translation table" keeps showing up in emails, release announcements and patches but why making such a fuzz about it ? The initial translation table release (batman-adv 2011.3.0) appeared a number of months ago and still, code refinements as well as new translation table features find their way into each release. It is about time to shed some light on what makes the translation table a vital component of a batman-adv mesh network.

The translation table

In most batman-adv mesh networks you have the mesh nodes building the backbone of your network and a number of ordinary (non-mesh) clients using the mesh network to exchange data amongst each other or to connect to external networks (e.g. the internet). Since the non-mesh clients do not participate in the mesh itself a mechanism is needed to share the information about the client's location within the network. That is the primary task of the translation table: At every given moment it knows which non-mesh client is connected to the mesh network via which batman-adv node. Without this information non-mesh clients would not be able to receive any traffic because no other node would know where to send the packets to.

One of the new concepts introduced with the translation table is the versioning of local changes. All non-mesh clients connecting or disconnecting from a mesh node within an OGM interval belong to the same translation table version. Once the translation table changes the new version is published in the network allowing neighbor nodes to request a translation table diff instead of the whole table, thereby drastically reducing the overhead. It also is possible to ask his direct neighbor for the current translation table of any other mesh node in the network as the tables can be identified using the version number. Large mesh networks do not need to retrieve the translation table from the far end of the mesh but can simply query their neighbors.

More features

Due to the extensible nature of the translation table a number of features could be built on top of it. Notable examples are the AP Isolation and fast roaming support. With mobile devices getting more and more popular roaming is an often requested feature. To avoid connection loss while moving from one mesh node to the next it is imperative to sync all involved nodes about the non-mesh client's new location as fast as possible.

In order to illustrate the difficulty and how the translation table code handles this situation it is best to look at an example. Here we have a non-mesh client exchanging data with node1 while being connected to node9.

As soon as the non-mesh client roams from node9 to node10 the stream is disconnected until node1 learns the new location of our client. Depending on various parameters this synchronization can take a long time. This is how the old mechanism (pre translation table) recovered while running a 5sec OGM interval with 25% packet loss between each node (the blue bar marks the roaming event):

The old mechanism needed roughly 65 seconds to recover the stream from the client's roaming. Testing the translation table under the same circumstances looks much better:

Further reading

All this merely is the tip of the iceberg. The translation table is the key player when it comes to integrating non-mesh clients as efficiently as possible. A number of documents are available for the curious reader:

Happy routing,

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

Batman-adv 2012.1.0 released

Added by Marek Lindner about 13 years ago

The B.A.T.M.A.N. team is delighted to announce its newest release, 2012.1.0, bringing mainly bug fixes and code cleanups. Also part of the release is a newly developed routing algorithm framework which allows switching between different routing algorithms. As the kernel module always depends on the Linux kernel it was compiled against, it does not make sense to provide binaries on our website. As usual, you will find the signed tarballs in our download section:

https://downloads.open-mesh.org/batman/releases/batman-adv-2012.1.0/

as well as prepackaged binaries in your distribution.

Thanks

Thanks to all people sending in patches:

and to all those that supported us with good advice or rigorous testing:

batman-adv

Most changes coming with this release happened under the hood to either improve stability or pave the way for new features, most notably the routing algorithm abstraction. Over the last months several ideas centering around the question how to improve the current routing algorithm have surfaced. To better experiment with these ideas while keeping a working system for our users the routing algorithm abstraction was added. It allows to easily develop and test new routing concepts while taking advantage of the existing batman-adv features and infrastructure. The API will be further refined with the next releases to enable alternative algorithms to be included as well.
The translation table code received further attention which led to the discovery of endless loops in the tt-request mechanism (under certain circumstances). This was addressed along with a TT_CLIENT_NEW flag race condition when a new client was added to the internal hash. All batman-adv internal timeouts have been converted to milliseconds for consistency purposes. Even the batman-adv makefile was modernized to provide an install target and a selection system for conveniently compiling features into the module.

batctl

Each batman-adv (layer 2) ICMP packet used to ping or traceroute a node comes with a sequence number to detect failures. Prior to this release batctl ping/traceroute did not compare the outgoing sequence number with the incoming sequence number to verify whether they indeed match. In WiFi environments exhibiting high packet loss and excessive packet retransmissions this missing check led to false results.
Furthermore, the return code of batctl ping was improved to properly indicate a failure.

Happy routing,

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

Google Summer of Code 2012

Added by Simon Wunderlich about 13 years ago

the student application period for the Google Summer of Code 2012 has opened.
A chance for any student to get their hands dirty on their favorite OpenSource
project and getting its development process and code base to know better
during these 2 months - while getting payed for it!

As last year, B.A.T.M.A.N. tasks will be done as part of the freifunk project,
which again will serve as an umbrella organization for various projects dealing
with wireless mesh networks.

If you are interested in mesh networking and B.A.T.M.A.N. and if you also love
OpenSource software and would like to become a more firm part of it, then please
apply on fore freifunk:

https://www.google-melange.com/document/show/gsoc_program/google/gsoc2012/timeline

and get in touch with us via mailinglist and/or IRC. So far the following ideas
have been collected which you may apply for:

https://wiki.freifunk.net/Ideas#B.A.T.M.A.N.

But feel free to tell us your own suggestions and ideas, too.

*****                                                 ****
*** Student application deadline is the 6th of April!! ***
****                                                 *****

Happy routing,

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

Batman-adv powers Game of Life

Added by Simon Wunderlich about 13 years ago

We all love our blinking routers when they happily exchange our data. One of the things we have definitely not thought of while designing batman-adv: These LEDs can even have a higher meaning! Sean McIntyre and Jonathan Kiritharan created this nice Conway’s Game of Life implementation on 8 routers based on OpenWrt and batman-adv. Enjoy this fine art project!

More details, source code and a video can be found on the project page: http://www.boxysean.com/portfolio/mesh4lyfe/
(BTW, also Hack A Day featured this project: https://hackaday.com/2012/02/04/using-routers-as-displays/ )

Thanks for this wonderful hack!

Batman-adv 2012.0.0 released

Added by Marek Lindner about 13 years ago

Today the B.A.T.M.A.N. team releases its latest edition, 2012.0.0, containing a series of stabilization changes and bug fixes. This release does not introduce any new features and uniquely focuses on stability. As the kernel module always depends on the Linux kernel it was compiled against, it does not make sense to provide binaries on our website. As usual, you will find the signed tarballs in our download section:

https://downloads.open-mesh.org/batman/releases/batman-adv-2012.0.0/

as well as prepackaged binaries in your distribution.

Thanks

Thanks to all people sending in patches:

and to all those that supported us with good advice or rigorous testing:

batman-adv

The gateway handling code was refactored as it became nearly impossible to understand the various gateway handling cases that were added over time. Also refactored was the TT handling code and a common subtype for locally and globally announced mac addresses was introduced. All told, the TT code was thoroughly reviewed leading to numerous fixes: When adding a tt entry to the hash failed its memory is properly freed. Globally roaming clients are now clearly marked as such. The length of a TT packet is compared with the length the packet claims to have, thereby avoiding memory corruptions. The expensive packet linearize function is called only when absolutely necessary.
We also were in the lucky position of getting a security audit from Paul Kot who did find a possible memory corruption in the batman socket reading code (CVE-2011-4604). However, since there is no way to exploit it, according to the reporter, we judged the risk to be low. Obviously, the fix for this corruption is part of the release. Also fixed was a kernel freeze when the bat0 interface could not be created.

batctl

The log level parameter parser was fixed, so that it now correctly exits after receiving an invalid option as well as correctly handles the 'all' log level option.

Happy routing,

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

WirelessBattleMeshv5 Announcement

Added by Marek Lindner about 13 years ago

The WirelessBattleMeshv5 announcement came in and we would like to invite you to join us in Athens / Greece! Once more, wireless communities / enthusiasts / developers are expected to attend the annual gathering. As usual we (the people behind the B.A.T.M.A.N. project) are going to use the opportunity to enjoy a full week with wireless hackers to discuss & develop on the latest hot new stuff. Details about the event's registration / locations / costs can be found in the announcement text below.


==========================================================
      Announcing the Wireless Battle Mesh v5
   (26th of March - 1st of April 2012, Athens, Greece)
==========================================================

The next 'Wireless Battle of the Mesh' will take place from
Mon 26th till Sun 1st of Arpil in the center of Athens 
(close to the acropolis), Greece. The event aims to
bring together people from across the Globe to test the
performance of different routing protocols for ad-hoc
networks, like Babel, B.A.T.M.A.N., BMX, and OLSR.

If you are a mesh networking enthusiast, community
networking activist, or have an interest in mesh networks
you have to check this out!

Informations about the event are gathered at:
http://battlemesh.org/BattleMeshV5

Location
========

The (optional) WBMv5 Warmup event takes place in Sarantaporo 
(rural area in range of the Olympus mountain). The main 
event  happens at the National Technical University of 
Athens (NTUA) in the very center of Athens.

Registration
============

Registrations will be available at different hackerspaces
(Fusolab, HSBXL, /tmp/lab, metalab, CCC, ...) and on the
official website for the event at:
 - http://battlemesh.org/BattleMeshV5_Warmup
 - http://battlemesh.org/BattleMeshV5

Fees
====

The warmup requires a small fee to cover the transportation 
costs to Sarantaporo. The main event is free of charge. We
offer the possibility to reserve a low-cost bed close to the
NTUA for you.

Spread the word
===============

Feel free to spread the word by forwarding this mail to all
lists / people that might be interested in it. Also blogging
about the event is more than welcome!

Contact
=======

* Web: 
 - http://battlemesh.org/BattleMeshV5_Warmup
 - http://battlemesh.org/BattleMeshV5
* Email: http://ml.ninux.org/mailman/listinfo/battlemesh
* IRC: irc.freenode.net #wbmv5

(81-90/121)

Also available in: Atom