[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

Leave a Reply

Your email address will not be published. Required fields are marked *