[GSoC-2014] Final report of the GSoC project: “BGP/Bird integration with OpenWRT and QMP”

Here I present you a report of the finals state of my GSoC project. For further information feel free to  contact me using the channels described in the github and documentation.

“BGP/Bird integration with OpenWRT and QMP” [0] project’s main goals were to improve Bird4/6 Daemon [1] adding a better integration with OpenWRT bringing UCI configuration to it, to add an user-friendly interface to make it easier using the LuCI web-framework, to be able to port it to QMP mesh networks and, finally, to automate the route exchange and metric translation between Guifi.net (BGP) and QMP (BMX6) [2].

Current solution consists on two OpenWRT packets: bird4/6-uci and bird4/6-luci. While bird4/6-uci allows the user to modify Bird’s configuration and apply it using the init.d script, the bird4/6-luci package brings a web interface to make this UCI configuration even easier.

Regarding bird4/6-uci package, UCI configuration scheme was agreed with Bird main developers owing, not just to make a solution, but also to consensus its development and characteristics with their main developers. The package includes a DOCUMENTATION file with all the available options, its description and examples.

Regarding bird4/6-luci package, it brings all the necessary files to add LuCI web-based configuration interface and has bird4/6-uci as a dependency.

Finally, the solution used to automate the translation and exchange of routes between BGP and BMX6, uses Bird filters instead of an external developed tool:

First of all, as BGP routes are automatically exported and imported only using UCI configuration, the efforts were put into the reverse part. Second, initial experiments were done in the WiBed platform [3], owing to be able to repeat and test the solution without the possibility of “breaking anything”. Once the solution was stable enough, packages were installed in a QMP mesh with 5 nodes (2x WDR4300, 1x WDR3900, 1x WRTNode and 1x WR703N) and also connected with a Mikrotik RouterBoard 750G to check the routes exported. Moreover, some tests were made connecting the RouterBoard to Guifi.net’s UPC point, working with more than 500 routes.

Example of original Bird configuration:

log “/tmp/bird4.log” all;
debug protocols all;
 
#Router ID
router id 10.1.26.50;
 
#Secondary tables
table aux;

Example of the same configuration using UCI:

config global ‘global’
    option log_file ‘/tmp/bird4.log’
    option log ‘all’
    option debug ‘all’
    option router_id ‘10.1.26.50’

config table
    option name ‘aux’

An example of the LuCI configuration web page can be seen here:

Bird BGP LuCI configuration example

Example of BMX6 Routes and how are they filtered:

# ip r show
10.0.0.0/8 dev bmxOut_HW-Ermi  proto static  metric 1024
10.1.32.0/27 dev bmxOut_HW-Ermi  proto static  metric 1024

The pattern used in IPv4 filters is the device name “bmx*” and also the metric “1024” owing not to repeat or export internal routes.

In IPv6 the procedure used is to filter the 60 kernel table, as it contains all BMX6 iroutes:

# ip -6 r s table 60
fd66:66:66:8:de9f:dbff:fe35:17b6 via fe80::de9f:dbff:fe34:17b6 dev wlan0.12  proto static  metric 1024
fd66:66:66:a:de9f:dbff:fe34:17b6 via fe80::de9f:dbff:fe34:17b6 dev wlan0.12  proto static  metric 1024

Future work:

  • Continue adding the rest of BGP options to improve the solution.
  • Add OSPF (first of all) and the rest of the protocols to the UCI and LuCI solution.
  • Send the bird4/6-uci/luci package to OpenWRT willing to became an official package.
  • Continue giving support to package users and maintaining it.

Both package repositories are actually in my personal Github account [4] and [5].

Finally, I want to  thank Freifunk for the opportunity given to me with this GSoC project, to my mentors Roger Baig and Axel Neumann, to Pau Escrich for his support during the project and to Guifi.net and QMP project and their communities for the support received.

Eloi Carbó Solé.

[0] http://blog.freifunk.net/2014/gsoc-bgpbird-integration-openwrt-and-qmp-project-report

[1] https://github.com/openwrt-routing/packages/tree/master/bird

[2] http://qmp.cat/News/12_Google_Summer_of_Code_2014_and_QMP

[3] http://wiki.confine-project.eu/wibed:start

[4] https://github.com/eloicaso/bird4-openwrt

[5] https://github.com/eloicaso/bird6-openwrt

GSoC “BGP/Bird integration with OpenWRT and QMP” project report

This entry is for updating the information regarding this GSoC Project focused on the automate of BGP-BMX6 metrics and routes exchange and “translation”. 
 
During the WBMv7 in Leipzig, the WiBed platform [0] was presentated as well as the GSoC project[1] where I am participating. WiBed was used to deploy the testbed network where many routing and mesh related experiments were executed.
I was participating in the deployment and development teams of the WBMv7, so I contributed in many bug fixes and platform improvements.
The WiBed project is important for the GSOC because it provides a testing platform very similar to the production environment where we will apply the results of the GSOC project.
 
Currently I am studying and understanding the basis system we need to accomplish the objectives of my project. I am working on Bird4 and Bird6 [2] configuration transition to UCI[3] and LUCI[4] willing to give to the OpenWRT project and community a more user-friendly Bird Daemon configuration. For those who do not know, Bird is a lightweight and flexible BGP daemon which may be used as an alternative to Quagga (which is actually very heavy).
 
Once we got an usable version, we wll upload the work done to public GIT repository following the standard OpenWRT feeds format (so it might be included in the official repositories). To test our advances and implementation we are using the WiBed platform network deployed in our laboratory (at UPC university in Barcelona).
The first production test will be made in the QMP [5] network we have deployed in Barcelona.
 
The most challenging feature in our project is the exchange of routes (and associatd metrics) between routing protocols (BGP and BMX6 [6] in our case). We (me, the workgroup and mentors) are still discussing about the different ways to implement it and how to use the Bird solution to Guifi.net [7] where the main protocol is BGP and the most common OS is the privative routerOS from Mikrotik. Including Bird in the open/libre firmware QMP will allow people in Guifi.net to use this solution instead of routerOS. However to make the interconnections between the QMP (Mesh) networks and the current BGP/Infrastructure we need the called frontier (or border) nodes (those who exchange the routes between both network clouds). 
 
To not overload the current mesh clouds (running with BMX6), we will install a BGP Bird instance only in these QMP border nodes. They will exchange routes and metrics in the entrance of the network and summarize the result by publishing the aggregated routes to each network.
 
Another idea we are considering is to create a very small and simple OpenWRT image with the BMX6 daemon ready to perform the routing. This image may be installed as a virtual machine in the RouterOS firmware (present in 50-60% of the Guifi.net nodes). So Mikrotik nodes will be able to route BMX6 packets thus the BGP instance will not be longer necessary (we believe mesh routing protocols are a much better option than BGP/OSPF for a WiFi network). This approach is compatible with the (previous) border nodes one. We will provide both options to Guifi.net users to let them decide.
 
Finally, to conclude this  mid-term report, say that we expect to finish the project in time and  just mention that in the coming days we will start testing the first solution in a real production network.
 

GSoC2014 – BGP/Bird integration with OpenWRT and QMP

This year, the Google Summer of Code and FreiFunk have given to Guifi.net and QMP communities the opportunity to develope a project in this event. This project is: BGP/Bird integration with OpenWRT and QMP.

 

A brief description of the project

Most of the community networks run dynamic routing protocols (OLSR, BMX6, BATMAN-ADV, etc.) with non-dynamic ones (BGP, OSPF, etc.). Guifi.net (BGP) and QMP (BMX6) are a scenario where this collision of metrics and routes happens. 

Furthermore, these communities are using Quagga for the BGP routing, which is a complex and oversized tool for the type of nodes that will work with it. For these kind of nodes, Bird is a really lightweight BGP daemon that is still not well supported to be used easily by the community (it does not have an easy and graphical configuration system yet).

 

This project will contribute with:

1st Block: Adapting Bird to fit into QMP firmware. (1 month)

  • Bird daemon improvements (3 weeks)
    • Give to Bird integration with OpenWRT: Add support for UCI configuration. Thus, will ease the configuring process and become closer to non-expert users.
    • Improve Bird UCI configuration adding LUCI support (web graphical interface). Adding a graphical user-friendly interface and the necessary tools to automate hardest processes of the configuration, non-expert community users could find this daemon as an easy to use routing tool.
  • Adapt Bird daemon to QMP (1 week)
    • Once working on OpenWRT and with an easy ‘to put on work’ configuration, add integration with the QMP firmware owing to replace Quagga’s routing functions in frontier nodes of the QMP network.

 

2n Block: Automate the translations of routes and metrics between a non-dynamic routing protocol and a dynamic one. (~2 months)

  • Creation of a routes and metrics exchange system (7 weeks)
    • Study and build an exchange system for metrics and routes between BGP (from Guifi.net) and BMX6 (from QMP).
    • Test and debug this solution in the real scenario (Guifi.net-QMP)

 

3rd Block: Project basic feedback and documentation (1 week)

  • Documentation, user support&feedback and results presentation.

 

About the author

I am Eloi Carbó, a Computer Science student specialized in Information Technology in the UPC of Barcelona. Currently I am working on my Final Degree dissertation: UPC CN-A testbed mesh network deployment, monitoring and validation. Using the Wibed Platform developed by the CONFINE Project [Link: https://wiki.confine-project.eu/wibed:start].

 

About the project collaborators

The project tutors are Roger Baig (fundació Guifi.net) and Axel Neumann (Freifunk and BMX6 support) and the special collaboration of Pau Escrich (fundació Guifi.net and QMP project).

Freifunk Google Summer of Code: Guifi.net and QMP

Hakais has put up some info about student projects that were accepted as Freifunk Google Summer of Code projects and which are taken care by Guifi.net. Two students involved in Guifi.net have been accepted for the Gsoc 2012.

Google Summer of Code is a global program that offers students stipends to write code for open source projects. We have worked with the open source community to identify and fund exciting projects for the upcoming summer. One of these projects is named Guifi.net integration for QMP system, which has been applied by Joel Espunya and mentored by Pau Escrich. The main objective of it is to provide an easy way to use the QMP Mesh firmware inside the Guifi.net community network. (http://guifi.net/en/node/47699)

More info on the projects:

State of the art

The main purpose of QMP (Quick Mesh Project) is to provide an open and free software solution for the quick deployment of a WiFi network based on Mesh/MANET technology. It is focused to be useful mainly in the wireless community network. It is based on OpenWRT Linux and it is completely OpenSource.

The QMP project was drafted by Guifi.net (http://guifi.net/en) active members during year 2010. It was started on the beginnings of 2011 thanks to the funding of a local fundation named puntCat (http://www.fundacio.cat/en_index.html). This funding was ended on december 2011. However the project development still alive by a volunteers team.

  • Mesh Network

Strictly speaking, a Mesh network is one where all nodes (participants) are routers, meaning that all the nodes accept and forward packets from other nodes according to the routing rules. Thanks to this property the physical topology of the network is only restricted by the need of all nodes to be connected through at least one link.

  • Community Network

A community network is a network made and maintained by the same participants. Unlike the model used by the global telecommunication companies (which are business-focused), each user is owner of his stretch following the philosophy make-it-yourself. Using some agreements and organizations (e.g web site) they are able to connect with neighbours, neighbours of the neighbours and so on.

Project description

  • Summary

The objective of the project is to provide a software solution to easy integrate the Guifi.net characteristics into the QMP system.

  • Why this is needed

Currently QMP is a working system, that can be used to easy deploy a Mesh Network but there are several missing features. One of them is the integration with the Guifi.net community. It can also be used as a template for the integration of other Network Communities like Freifunk, Funkfeuer, AWMN, etc.