GSOC and qMp

Added by Pau Escrich about 10 years ago

In this last Google Summer of Code (2012) a project related with qMp was accepted and funded under to umbrella of the Freifunk organization0.

The GSOC proposal1 was sent by Joel Espunya, a computer's student and folk. It was about modify and extend the qMp system to work with the Guifi.net2 community network. The Quick Mesh Project is designed to use dynamic mesh protocols like OLSR, BMX6 and Babel. However the community (and also many others) are using BGP3, at least to interconnect the different clouds or zones.The main goal of this project was to add BGP support to our system. When we started doing the working schedule/plan, we realized there were two main points:

  1. Write an abstraction layer to execute BGP functions
  2. Find/customize some software to routes exchange (between dynamic protocols and BGP)

First stage

The Quick Mesh Project can be defined as an abstraction layer of OpenWRT which includes many features to make the job easier (web interface, autoconf. system, internet detect, etc.). Right now the core of this abstraction layer is written in shell script. You can execute commands like "qmpcontrol configure_network" to get the network automatically configured according some heuristics and a few configuration placed on "/etc/config/qmp".
However, some months ago, qMp developer team decided to rewrite this abstraction layer to LUA4. Why LUA? Because it is a programming language very tiny, optimized and also powerful. We are working in embedded hardware, which can be a 180MHz MIPS with 16MB of RAM and 4MB flash. The LUA interpreter and standard library of OpenWRT only take 90KB. So it fits perfectly in this environment. LUA has also been the choice of LUCI5, and it has a very nice API which can be reused.

Coming back to the GSOC project, instead of writing the BGP functions using Shell Script, we started the new LUA API. Not to develop it completely, but to have the basic features needed by the project. Here6 can be found a list of modules and functions of the library. And here7 can be found the code implemented. As can be seen there is a quagga module. Quagga8 is a software routing suit which includes a BGP daemon. It is a kind of standard suit, most of the current routing protocols have support for it, so all of them can easy exchange routes. At this point we started looking for the best way to use Quagga. Then we entered in the second stage.

Second stage

Quick Mesh Project uses BMX69 as main protocol and OLSR/BABEL/any as secondary (backup). The problem with BMX6 is that it didn't has support for Quagga. Then, instead of doing the routing exchange using some other crappy system, we decided to write a Quagga plugin for BMX6. However, Joel (the student) realized that it was out of his scope. He was not familiar with BMX6 implementation and neither with Quagga. So I (as a mentor) asked Axel Neumann for participate in the project. He was one of the B.A.T.M.A.N developers, and right now the BMX6 main maintainer. He accepted to contribute with us and made a very great job, the code can be found here10 and the documentation here11. At the end he received half of the funding.


So, at the end we have the Quagga plugin to automatic routes exchange and the LUA Quagga/BGP API to interact with the qMp system.

Right now (after the GSOC) we are still working on it. We are extending the API also to Network, WiFi, etc. To be used in the next release based on OpenWRT Attitude Adjustment12 which will include also BGP support. It will suppose an essential feature for the qMp/ integration and also for other network communities.