Spotlight | Reviews | Current Issue | Academy | Newsletter | Subscribe | Shop |
Departments

Partner Links
Make your own website
WinWeb OnlineOffice
Comparing prices of hardware is worth it.
Price Comparison
What:
Where:
Country:
vacatures Netherlands njobs Linux vacatures
arbeit Deutschland njobs Linux arbeit
work United Kingdom njobs Linux jobs
Lavoro Italia njobs Linux lavoro
Emploi France njobs Linux emploi
trabajo Espana njobs Linux trabajo

user friendly

Admin Magazine

ADMIN Network & Security

Subscribe now and save!

 ADMIN - Explore the new world of system administration! ADMIN is a smart, technical magazine for IT pros on heterogeneous networks. Each issue delivers technical solutions to the real-world problems you face every day. Learn the latest techniques for better:

  • network security
  • system management
  • troubleshooting
  • performance tuning
  • virtualization
  • cloud computing

 on Windows, Linux, Solaris, and popular varieties of Unix.

http://www.admin-magazine.com/

  linux-magazine.com » Issues » 2009 » 98 » Mesh Networking  

Print this page. Recommend
Share

Configuration

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 10.0.0.1. 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 10.0.0.1 netmask 255.255.255.0 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 10.0.0.0/24 for the mesh network my-mesh.org, sets the gateway to 10.0.0.0.1, 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

net.ipv4.ip_forward=1

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 10.0.0.0/24 -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

01 subnet 10.0.0.0 netmask 255.255.255.0 {
02   range                       10.0.0.100 10.0.0.199;
03   option routers              10.0.0.1;
04   option domain-name          "my-mesh.org";
05   option domain-name-servers  10.0.0.1;
06   default-lease-time          600;
07 }

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.

Conclusions

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.

Read full article as PDF » 056-059_mesh.pdf 383.39 kB


Comments


Print this page. Recommend
Share
Get your backstage pass to Linux!

If you're ready for a deeper look, Linux Magazine gives you a view behind the scenes.

Don't miss out on the tools, tutorials, and reviews you'll need to unlock the secrets of Linux.

more...