From Sudo Room
Jump to navigation Jump to search

Freifunk is a mesh group, mesh network and mesh firmware based out of Germany with several hundred nodes.

Routing protocol

Most of the Freifunk nodes are in meshes that use OLSR. Some local Freifunk meshes use batman (I'm assuming batman-adv).

Firmware distribution

It seems like there are at least three primary points of distribution of firmwares.

The README.txt file has a lot of useful information.
Seems to have a different set of downloads than the ipkg site, with some overlaps.
  • Meshkit - A firmware building wizard.
It actually creates the firmware based on your choices, including chipset and community profile. Really nice!


There is a 2007 creative commons by-sa 2.5 licensed book from South Africa called Building a Rural Wireless Mesh Network which is a step by step guide that focuses on using the OLSR-based Freifunk firmware.

The source code for the Freifunk-specific openwrt packages can be browsed here.


Most Freifunk nodes report a bunch of information using JSON to a central map server, that reports a bunch of things, including the lattitude and longtitude.

Reporting nodes are shown on the Freifunk map.

It looks like the package freifunk-mapupdate is responsible for reporting to the central map server.

Assigning IP addresses

I'm still not sure how IP addresses are assigned in a Freifunk network. It looks like it's manual static assignment though. The Meshkit wizard just asks for a static IP and has the IP field pre-filled with the correct subnet based on the selected community profile (e.g. for Berlin).

Real-world IP addresses

Some of the local Freifunk meshes, such as Berlin and Leipzig, actually have real internet routable IPv4 adresses.

Anonymized IRC snippet from #freifunk on

<Juul> is freifunk berlin really using ?
<Juul> if i'm not mistaken, that's an unassigned ARIN subnet
<Juul> any reason to believe it won't be assigned in the future?
<Juul> (i'm part of a group setting up a mesh in Oakland, California, and I stumbled upon that in the berlin community profile, wondering if there's any advantage to using an unassigned range instead of just 
<alice> yes
<alice> im from leipzig, a suburb of berlin, we have 104.61.... since years.. 
<alice> it IS now assigned (some months ago..) :-/
<alice> but most of freifunk netzwork is at to be seen at
<alice> 104er IPs im Bild:  RT @kinolux: History repeats itself: eine IP Debatte im #freifunk IRC. #LOL

Community profiles

Freifunk has meshes in several different cities and suburbs. They keep a list of community profiles that contain settings specific to the local mesh.

Here is the Berlin profile:

1 	config 'community' 'profile'
2	    option 'name' 'Freifunk Berlin'
3	    option 'homepage' ''
4	    option 'ssid' ''
5	    option 'mesh_network' ''
6	    option 'splash_network' ''
7	    option 'splash_prefix' '27'
8	    option 'latitude' '52.52075'
9	    option 'longitude' '13.40948'
10	    list 'mapserver' ''
11	    list 'mapserver' ''
13	config 'defaults' 'wifi_device'
14	    option 'channel' '10'
16	config 'defaults' 'interface'
17	    option 'netmask' ''
19	config 'defaults' 'olsr_interface'
20	    option 'Ip4Broadcast' ''
21	    option 'HelloInterval' '3.0'
22	    option 'HelloValidityTime' '125.0'
23	    option 'TcInterval'  '2.0'
24	    option 'TcValidityTime' '500.0'
25	    option 'MidInterval' '25.0'
26	    option 'MidValidityTime'  '500.0'
27	    option 'HnaInterval' '10.0'
28	    option 'HnaValidityTime' '125.0'
30	config 'defaults' 'olsrd'
31	    option 'AllowNoInt' 'yes'
32	    option 'FIBMetric' 'flat'
33	    option 'Pollrate' '0.025'
34	    option 'TcRedundancy' '2'
35	    option 'NatThreshold' '0.75'
36	    option 'LinkQualityAlgorithm' 'etx_ff'

Freifunk packages

This is a list of packages installed by the Freifunk Meshkit firmware with explanations of what they each do. Some of them are OpenWRT packages and others were made by Freifunk.

Freifunk's own packages:

  • freifunk-common
Includes ff_olsr_watchdog, which in combination with olsrd-mod-watchdog restarts olsrd if olsrd freezes up. Includes ffdzero, which seems to fetch zeroes from a webserver and write then to /dev/zero (?). Includes which uses wget and sed and the olsrd-mod-txtinfo webserver to show some info about neighbors, and includes which is just a shell script version of the normal watch command. source.
  • freifunk-policyrouting
Special routing rules for the Freifunk network. Probably won't apply to other meshes. source.
  • luci-app-meshwizard
A wizard web GUI for easily configuring the router with mesh access. I think this relies on the meshwizard package, which is just a shell script to implement the changes.
  • community-profiles
A set of configuration profiles for the different local Freifunk meshes.

Web GUI extensions by Freifunk:

  • luci-app-freifunk-policyrouting
Web GUI for the Freifunk routing rules. source
  • luci-mod-freifunk
  • luci-mod-freifunk-community
  • luci-theme-freifunk-generic
  • luci-app-freifunk-widgets

OLSRd packages. All of the -mod- packages are actually part of the main olsrd source tree (download openwrt olsrd source here). If you go to the lib/ directory in the olsrd source, each -mod- package has its own directory and a readme file.

  • olsrd
The mesh routing protocol daemon.
  • olsrd-mod-arprefresh
Looks at all received UDP packets and updates the arp cache based on these. This means fewer arp queries needed.
  • olsrd-mod-dyn-gw-plain
An IPv4-only internet gateway detector that announces internet connectivity to the mesh when it is detected.
  • olsrd-mod-txtinfo
Adds a telnet+http service to port 2006 that allows getting info about the mesh node.
  • olsrd-mod-jsoninfo
Like mod-txtinfo but using JSON format
  • olsrd-mod-nameservice
Kinda like mDNS, but specifically created for OLSR. Note that an olsrd-mod-mdns package also exists, which allows mDNS to be used on the mesh. This might be preferable, since it will interoperate with LAN and other non-mesh mDNS-capable software. It might also be dangerous, since e.g. people's mDNS-capable network printers will be announcing themselves to the mesh if no other precautions are taken.
  • olsrd-mod-watchdog
Writed to a file ever n seconds if olsrd is not frozen. Allows implementation of a watchdog that restarts olsrd if it freezes.

Misc other packages:

  • uhttpd
uHTTPd is a tiny single threaded HTTP server with TLS, CGI and Lua support. It is intended as a drop-in replacement for the Busybox HTTP daemon.
  • libiwinfo-lua
Lua bindings for libiwinfo, a library for getting wireless interface information.
  • luci-app-firewall
Firewall GUI for the web interface.
  • luci-mod-admin-full

I think the initial dash means that these packages are excluded rather than included, but I could be wrong.

  • -nas
Proprietary broadcom WPA authenticator.
  • -ppp
Point-to-point protocol support.
  • -ppp-mod-pppoe
PPP over ethernet.
  • -wpad-mini
Minimal WPA-PSK authenticator.

root password

The default root password for the meshkit freifunk firmware is: admin