The Fonera Pack Story

This blog entry is mainly in english. Sorry for that, but the original recipient (a belgian guy) is very much better in english. Since beginning of 2007, a startup company called "FON" is distributing very cheap (subventioned) WLAN devices: the la-Fonera wireless LAN router. For these, I've created and published an additional software, called the Freifunk-Fonera-Pack available here: http://download.olsrexperiment.de/fonera/ . The Pack offers Freifunk meshing in parallel to the FON function. Obviously, I've missed to explain the different networking modes and hance a posting on our internal berlin mailing list reaches me with a lot of questions. Mario asked me to publish the anwers here.
Hi Steven,
yes I know. There's not enough info about the networking / mode stuff in the ff-fonera-pack readme. OK – I'll try.
Networking Model
The networking model / how internet is distributed in a Freifunk mesh is very different to the FON business model. The FON model includes a certain amount of hotspots scattered over an arbitrary area. Each FON router should have its own (wired) internet access via DSL, leased line or dialup modem. The idea is – as you hopefully know – to share/sell the unused bandwidth of the payed personal internet access to others. Freifunk is different. We form a wireless intranet, where internet access is a service offered by volunteers. We normally do not pay for internet connectivity. In short: Freifunk forms a network and FON is a hotspot service offer.
To "catch" paying users, a FON hotspot offers it's connectivity in a mode easily understand by typical end-user laptops/notebooks/PCs: the access point wifi mode. A connecting PC should have connectivity and zero-admin config, so it is hopefully really easy to display the"insert-coin-here" page. Freifunk again is different here. To participate as equal with equals in a network, we need to cooperate at least on the techical level. This includes using a specific wifi mode (ad-hoc or IBSS) as well as relaying data of other users and running a certain protocol program to find and configure optimized data paths through the network.
To combine these different networking models, the Freifunk-Fonera-Pack offers different operation "modes". These modes are designed following these simple rules:

  1. The FON and Freifunk stuff should function as designed in parallel
  2. It should not be possible to sell the internet connectivity offered by Freifunk volunteers via FON
  3. It should not be possible to nerve wreck Freifunk users with the FON login page
  4. There should be a benefit for the average FON user to install that stuff

You can use the "Open" mode, if you want to share your own internet uplink with the community. Every Freifunk user connecting via Ad-Hoc and running the OLSR routing program can use your internet gateway. It's announced per "HNA" which basically says "Internet here". The OLSR program will search and configure a data path ("route") to the nearest HNA internet gateway available. Without the FON login page of course.
You can use the "Ego" mode, if you do not want the FON stuff / FON login page at all. To keep fair play, the FON callback is stopped and there is no "FON_AP" signal then. If you want to offer internet to the community, simply configure internet as usual. If you want to use a Freifunk gateway, simply do not connect any internet uplink.
If you want to relay data via WLAN/radio from other Freifunk users, but you want your own internet uplink for yourself (and the FON users loggin in), you can use the "Stealth" mode. All the Freifunk mesh routing happens in a background routing table. You do not announce your internet gateway via HNA and an Ad-Hoc connected Freifunk node / PC / laptop uses a different default route (not your standard internet default route).
As a benefit for the FON offering user, you can tunnel your own internet gatway via Freifunk and offer a FON uplink elsewhere in the Freifunk mesh. For this, the different Master-Modes (Open-Master, Ego-Master, Ego-Slave) are offered. You can configure a second / third / forth Fonera as "Slave" and set up a tunnel via Freifunk-meshing to use and sell your own internet gateway via FON. You'll find a sample configuration on the "Freifunk-Advanced" web page installed as part of the Freifunk-Fonera-Pack. Besides that, the Freifunk-Fonera-Pack adds a bit more security currently, provided that you do not use 192.168.x.x as meshing IP – but that's another story.
Q: Why there are no "Open-Slave", "Ego-Slave" nor "Stealth-Slave" modes?
A: Well, if you re-think it and maybe read the above once more you will understand. "Open-Slave" is contraprodutive. A device should not announce internet which it does not have. "Ego-Slave" is not necessary. Simply use "Ego". "Ego" will configure/use the next HNA / Freifunk gateway, possibly your Fonera in "Open" mode. "Stealth-Slave": This is offered as "Slave" mode.
HTH
// Sven-Ola
At the next day, a posting with more questions dropped in. I don't want to cite that here, mainly because I have not asked Steven to do so. To summarize: He has not tried the tunnel stuff and wanted to have an easy configuration for a couple of other guys, e.g. "publish the FON password" and "we are all in Linus mode". I may be wrong, but those points are the main questions asked IMO.
Steven,
uuh! Lots of questions 🙁 OK – to sort that out, here are some more statements.
Tunneling Internet
Our understanding of a mesh network includes using those cheap devices, to form a network. You can – of course – use the precious laptops to join in. But in the long run, a mesh only functions, if the nodes (the laptops, PCs, the routing boxes running OLSR) are switched on for a longer period. I talk about months not minutes. Also, you normally do not want to place the laptop on the roof of your house. For example: we do not have OLSR for Vista currently – and only a very small number of whiners. We all use those boxes to connect (e.g. via DHCP and NAT). You plug in your laptop into the box (either by ethernet or by a second Access Point) and go. That's the main use case.
You wote, that you (and your friends) don't want to break your "FON promise". The ff-fonera-pack is open source, and because of that you are free to do anything you like. Some expertize required. Especially the "Chillispot needs to fiddle with the default route thing" will be the hurdle to master here. Also I expect some dirty policy routing tricks are required. I personally do not want to make that, because of the reasons I wrote in my last post.
Lets form an example. You have internet access via DSL. You have a fonera connected to the DSL line, configured all, and switched to "Open". You have two friends who also bought a Fonera. One has his own DSL line and one not. Your own fonera uses 172.16.0.254/12 as meshing IP, channel 3 and 02:ca:ff:ee:ba:be as meshing BSSID.
Friend1 with DSL line: That's easy. Just proceed as usual. He can use "Open" or "Stealth" modes, which depends on "does he want to share for free" or not. He switches to channel 3, configures an arbitrary ESSID (say IZEFON, but I would prefer a more sexy name) for meshing and the FON_Friend1 and MyPlace_Friend1 as usual. He configures 172.16.0.1/12 as meshing IP. The critical thing is the BSSID (the hex number). The meshing ESSID is not really used – the BSSID for meshing and the channel needs to be the same on all meshing Foneras. Ah – and you need a Wiki page stating: "Friend1 uses 172.16.0.1/12" as well as "Steven uses 172.16.0.254/12".
Friend2 without DSL line: To keep the "Fon promise", he normally needs to buy a DSL line. The FON promise is based on that. But: that friend can use for example the Steven-DSL via the tunnel setup. Setting up tunnels is easy, and the standad Fonera should be able to run ~ 8 tunnels concurrently (depends on memory consumption). The tunnel stuff should also be able to handle ~500kbyte/sec, which in most cases matches your DSL line speed. You will be happy if you reach that speed via meshing with some kilometres distance which also requires a very good antenna setup.
The first thing to do is adding "Friend2 uses 172.16.0.2/12" to the wiki page. Friend2 configures BSSID, MeshingIP and Channel3. Friend2 also switches to "Slave" which basically means: The device has internet via tunnel and does not interfere with the OLSR-HNA-search-best-gateway algorithm. He also changes the private MyPlace_Friend2 IP range from the default 192.168.10.1/24 to 192.168.11.1/24 (more on this later).
Now Steven switches to Open-Master to let Friend2 in. It needs to be a good friend, since he sells your DSL line to FON and he has access to your private IP range (the 192.168.10.1/24 used for your own MyPlace_Steven domain). To let his friend in, Steven needs to browse to the Advanced/Freifunk-Advanced page of his Fonera and enter this in the "Private IP" input field: "192.168.10.2:192.168.11.2/24". Steven also enters a tunnel password there, any arbitrary string will do.
Friend2 now also browse to the Freifunk-Advanced page, and enter the same tunnel password as well as this to the "Private IP" input: "192.168.11.2:192.168.10.2/24". You may note that those settings are symmetrical. Friend2 needs to define, which Master tunnel endpoint to use. So he enters this to the "Master IP" input: "172.16.0.254:4711". Which basically says: On Stevens fonera, there is an open tunnel endpoint on port 4711.
After restarting both Foneras, you should notice the "FON_xxx" on the Fonera of Friend2. This proves: Setup is working. Ah – you may enter the Foners command line or connect to MyPlace_Friend2. Then send "ping 192.168.10.1". This proves, that both private IP ranges (the 192.168.10.1/24 and 192.168.11.1/24) are linked by routing and theres no firewalling in between.
Phew. Much blabla. I hope this will help you a bit.
// Sven-Ola
To write down some final words: It is obvious, that setting up a Freifunk network is not too easy. To teach and inform, it needs much more text than (for example) attracting FON users with a Plug-and-Play promise. I'm sure, that we never reach that Plug-and-Play state, but of course things can be made more easy with good documentation and good Web-UI-Design. I hope that Steven finds his way through the competing network models. It should be clear that a company needs to make a profit, while Freifunk is created by volunteers. But we also want something from others of course – e.g. World domination (cited from Linus). TANSTAAFL!