Freifunk is a very cool version of Open WRT that allows you to create a mesh network of routers. You can simply connect additional routers to extend the network, and it pretty much takes care of itself.
Unfortunately documentation, at least in English, is somewhat lacking...
We are using it here in Afghanistan to make Mesh networks for schools as part of One Laptop Per Child. It avoids the need to cable between the classrooms and holds the possibility to extend the school network around the school.
This has been tested on my Ubuntu 8.10 Machine with a D-Link DIR 300 Router. This was the one we had recommended to use (it's price to hardware specs ratio is pretty good). However it should in theory work with any other router that supports Openwrt. If you are not using a dir 300 then obviously the dir 300 flash script does not apply - it should be flashed the normal tftp way the same as open wrt.
Getting Started
Install tftp on your machine - from the command line run:
$sudo apt-get install tftp-hpaDownload the Dir 300 Flash script (dir300-flash-0.9.9.tar.gz) to any directory on your machine from http://x-alina.freifunk-potsdam.de/downloads/dir300-flash/
$wget http://x-alina.freifunk-potsdam.de/downloads/dir300-flash/dir300-flash-0.9.9.tar.gz
$tar -xzf dir300-flash-0.9.9.tar.gz
This should result in a folder called dir300-flashDownload into the newly extracted dir300-flash folder the firmware files. Download openwrt-atheros-root.squashfs and openwrt-atheros-vmlinux.lzma from http://dev.luci.freifunk-halle.net/freifunk-snapshots/atheros/ - or the e
Flashing the router
cd into the dir300-flash directory that was created.
Plugin the ethernet cable to the WAN socket on the back of the router to your computer's first ethernet interface (eth0)
./dir300-flash.sh
Wait for the script to complete. Make sure that the router will not get unplugged during this time.
Configuration
For this let's assume that we are creating a Mesh under a private IP range (e.g. 192.168.25.x) .
Unplug the cable between your computer and the router from the WAN port on the back of the router and put it into one of the four LAN ports.
Open your browser and go to 192.168.1.1
Username is root, password at this stage is blank
Select Freifunk → Freifunkassistent
Check the boxes to activate Freifunk and OLSR
The IP address comes from putting Freifunknetz + Subnetz (Projekt) + Knoten together. For the moment I am using
Freifunknetz = 192.168
Subnetz (Projekt) = 25
Knoten = 18
If this is the router that will be connected to the Internet or wider network then check the box 'Eigenen Internetzugang freigeben'
Click submit, then save and apply. This will take some time and there might be some errors in your browser. Don't worry...
Under essid enter the normal essid that you want – this should be the same amongst all routers.
Under Netzprefix enter the same as per Freifunknetz – 192.168 for example
Click save and apply
Click Network → Wifi → Wifi0 then choose a channel. Of course make sure to use the same channel with the different routers.
Click Network → Interfaces → Wifi0 and change the netmask to 255.255.255.0
Put a sticker on this router and then put it somewhere to the side. Repeat the procedure with another router giving it a different Knoten (node) number.
Make sure that both routers are powered on and within range of each other. Wait a few minutes...
Click status → OLSR → Routen. You should see the other router's IP listed here
From your client computer try to ping the IP of the other router that is now connected through the mesh – e.g. ping 192.168.25.18
Troubleshooting / Additional Notes
- Make sure that you do allow enough time for OLSR to determine routes before checking to see if it knows about other routers on your mesh
- Encryption may well not work! As far as I have heard it causes some issues... I will check this out a little later...
- It can be possible to run multiple wireless networks from one router - however when I tested this and added an AP network as well that didn't co-operate.
We are using Freifunk to create a wireless backbone – one can use one router as an access point then connect it to other routers running Freifunk that form the backbone – this is still under testing but seems to be co-operating as of right now. Each AP has a traffic control system on it – thus hopefully preventing the mesh backbone from being overloaded...