mpp-utils for OLPC

Here you will find utilities and instructions to test mesh networks formed by OLPCs including using some OLPCs as MPP (Mesh Portal Points), this is, gateways to link the entire mesh network to the outside world using a regular access point.

UPDATE: DHCP-anycast alternative

As an alternative to the original MPP server described below, we have built a modified version of dhclient to support the mesh anycast mac address (patch ). On the server side, MPP functionality is activated using echo 1 > /sys/class/net/mshX/anycast_mask and a regular dhcp server is used. With this approach, in case there are multiple dhcp servers in the network, the client would only get the response from the lowest cost one.

Updating OLPC

To test the mesh network you need at least OS image 239. Note that that is more recent than the one that came with B1 systems. To update your system, easiest method is to use OLPC autoreinstallation images.

Bringing up mesh networking

To make sure NetworkManager does not interfere with the testing, it must be stopped (killall NetworkManager will do).

If you are using an OS image recent enough, there will be a msh0 interface, which is a virtual interface to the wireless network card used for mesh networking. To bring the node to the mesh you need to run:

The first command is just used to turn on the radio (and will not be necessary in future releases), the essid is not relevant and it is not necessary to set it to the same value for nodes in the mesh. In fact, if the radio is turned on already, e.g. we are associated with an AP, this step is not necessary. About the second command, all the nodes in the mesh must have same-subnet IP addresses.

Setting up an MPP

Once the mesh network is configured, we can set a node to act as a gateway between the mesh and the outside world. We must associate the wireless ethX interface (typically eth0 on OLPCs) to an access point and get the appropriate configuration manually or through DHCP. In addition to a recent OS image, MPPs need:

Once the node has connectivity, running the script mpp.py (included in mpp-utils tarball) will activate the MPP functionality.

Connecting to the Internet through an MPP

A OLPC with a recent kernel will be able to connect to the outside without associating to an access point if there is an MPP present in the mesh, by running the script mppreq_client.py included in mpp-utils. The script will not produce any output if an MPP was found and the autoconfiguration was successful.

Further testing

If you have several OLPCs, we encourage you to test more complicated configurations with several MPPs in the network to test that the most appropriate one is chosen.

A handy tool for testing is the blinding table. This table contains MAC addresses that we do not want to talk to directly. For example, if we have three OLPCs, we can add the MPP to the blinding table of an OLPC and then try to connect through it, forcing the traffic to be routed through the third OLPC.

You can modify the it with iwpriv commands:

Download

Latest scripts available here

Feedback

For any question, comments, patches... you are encouraged to write to OLPC developer's list.