Exploring IEEE 802.11s mesh networking


To configure meshing, become root, then select the mac80211 driver platform (CONFIG_MAC80211) and the mesh property (CONFIG_MAC80211_MESH). For the ZD1211 WLAN card, you will need matching drivers, such as CONFIG_ZD1211RW. Now build and boot the new kernel.

In user space, again working as root, you will need the iw tool to configure the network card [5]. The tool is intended as a standardized, long-term replacement for iwconfig and its sibling commands, much as ip has become an alternative to ifconfig. Many distributions do not have a package for iw; you might need to download the iw source code via git:

git clone http://git.sipsolutions.net/iw.git

The package depends on libnl; you will need version 1.0-pre8 or newer [6]. Users with Debian or Ubuntu need the libnl-dev package.

To configure the mesh with the new tool, again as root, select a mesh ID. The mesh ID must be identical on each node. The ID can comprise a maximum of 32 characters; the example calls this MyMesh. Then go on to set up an interface – wmaster0 in this example:

iw dev wmaster0 interface add mesh0 type mp mesh_id MyMesh

This step creates a new interface, which you still need to set up for operations with the gateway To set the IP address and netmask, you can use the standard ifconfig command, then use iwconfig to select, for example, channel 7 for the mesh network:

iwconfig mesh0 channel 7
ifconfig mesh0 netmask up

After following these steps for all the devices on the mesh network, the mesh will start to converge. To check its progress, issue the following command:

iw dev mesh station dump

Nodes the command reaches are added to the list. This lets you check to see whether the protocol has set up connection between the nodes.

To finalize the configuration, you need to set up Internet access by configuring DHCP and NAT on the main node that will act as a gateway for the mesh network.

On Debian, you would configure the dhcp3-server package in /etc/dhcp/dhcpd.conf, as described in Listing 1. This step configures a private subnet of for the mesh network my-mesh.org, sets the gateway to, and tells the clients to request the name server. The name server is available in the Debian bind9 package. In the simplest case, you would add the IP address of a known DNS server on the Internet to the forwarders section of /etc/bind/named.conf.options. As a final step, enable the setting


in /etc/sysctl.conf to route packages out of the mesh network and onto the Internet. At the same time, add

iptables -A POSTROUTING -t nat -s -j MASQUERADE

to enable masquerading for the private addresses on the wireless network on the router's public IP address. This step completes the setup for the main node.

Listing 1

Simple DHCP Configuration


Working as root, you still need to run iw on each node to configure the mesh network. The IP addresses and DNS details are provided courtesy of the DHCP server. If you intend to set up access for normal clients without mesh support, you need to configure additional wireless modules with Host AP mode support on these nodes [7].

Linux IEEE 802.11s support is still at an early stage. It will take some time for more mesh-ready NICs and drivers to appear. Users can look forward to IEEE 802.11s becoming far simpler in the next version of the kernel, with more and more drivers supporting the mac80211 subsystem.


Until the standard is widely adopted by vendors, don't be surprised if the details of the configuration tools change. In the meantime, assuming you have the right cards and tools, nothing is stopping you from setting up your very own mesh network right now.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Boot and Work Faster: Kernel 2.6.30 has arrived

    Thanks to the already implemented fastboot patches, the new Kernel 2.6.30 has the ability to recognize hard disks simultaneously and therefore significantly quicker. Ext 4 operates more securely, and Ext 3 increases performance.

  • Wireless Standards

    The IEEE 802.11 standards are at the center of the wireless revolution. The wireless alphabet starts with 802.11a and extends to 802.11n. Linux Magazine helps you get your wireless spelling right.

  • Free Software Projects

    OpenWRT puts Linux on WLAN routers and helps users set up large-scale WLANs at home, and the FreeWRT derivative adds a professional touch. If you don’t have your own compile farm, the OpenSUSE build service may be just what you need. And we investigate the obstacles to new packages for Debian.

  • Go Wireless Intro

    When you’re going wireless,it pays to be careful. Get the right hardware,and make sure your network is as secure as you think it is.

  • Smart Home with Zigbee

    The RaspBee II module turns your Raspberry Pi into a smart control center for Zigbee devices.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More