Thursday, November 13, 2008

mesh networking in Ubuntu 8.10

I was happy to find this when I upgraded my laptop to the new 8.10 release:

$ grep MESH /boot/config-`uname -r`

The kernel shipped with Ubuntu 8.10 (2.6.27) comes with draft-802.11s enabled and mesh-capable b43 and zd1211rw wireless drivers. I suggest that you try and make your own mesh if you have two or more PCs with a b43-supported interface! The only prerequisite is building iw from source as it's not packaged yet, but it's quite easy. Here's how:

First, get a couple of dependencies:

$ sudo apt-get install build-essential libnl-dev

Download the latest iw tarball and extract it, for example:

$ wget
$ tar -xf iw-0.9.6.tar.bz2
$ cd iw-0.9.6

Now make a config (the default config works fine) and build and install iw:

$ cp defconfig .config
$ make
$ sudo make install

Now that you have iw, you can use it to turn your wireless card into a mesh node. First, kill NetworkManager (it doesn't deal with Mesh Point interfaces at this time) and identify your wireless device. For example, you can run "ifconfig -a" and look for an interface named "wlan0". To make a mesh, on each PC do:

$ sudo killall NetworkManager
$ sudo iw dev wlan0 interface add mesh0 type mp mesh_id mymesh

...where "mesh0" is the name of your new interface. The Mesh ID is similar to an SSID and should be the same for all your mesh nodes. Now bring that interface up and assign each one a unique address on the same subnet, for example:

$ sudo ifconfig mesh0 up

Each PC should be able to ping any other in the mesh. Once in a mesh, you can ask iw for a list of nodes that your interface sees like this:

$ sudo iw dev mesh0 station dump

For more details, see the iw documentation or the HOWTO.
Post a Comment