WifiMesh
Contents[hide] |
Introduction
Starting with kernel 2.6.26 most wireless adapter drivers can take advantage of advanced wireless functions. One of the functions is the ability to form wireless mesh networks. This wiki page will help you try to setup a wireless mesh network. Ask an experienced Ubuntu/Debian user to help you set this up.
References
Since this is very new not much Ubuntu documentation exists. Please see below for links.
- http://www.open80211s.org
- http://www.open80211s.org/trac
- http://www.open80211s.org/trac/wiki/HOWTO
- http://en.wikipedia.org/wiki/IEEE_802.11s
- http://linuxwireless.org/en/users/Documentation/iw
- http://linuxwireless.org/en/users/Documentation/modes
- http://linuxwireless.org/mac80211book
Requirements
- Kernel 2.6.26 or higher.
- Wireless adapter with iw capable module: http://linuxwireless.org/en/users/Drivers
- Ubuntu version greater than 8.10 with "iw" in the repository.
- Remove the Networkmanager software completely and use the /etc/network/interfaces file below then reboot.
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
Step 1 - Install the software
Install the linux-restricted and linux-backports modules using "synaptic".
Type the following in a terminal to get the controller software.
sudo aptitude install iw
Step 2 - Check if the kernel module is working
Type the following in a terminal to check if the mac80211 modules are loaded.
sudo lsmod | grep mac80211
The mac80211 module should be listed. See below.
lbm_cw_mac80211 224804 2 rt2x00pci,rt2x00lib lbm_cw_cfg80211 68640 2 rt2x00lib,lbm_cw_mac80211
Type the following in a terminal to get the mac80211 properties.
sudo iw list
Your wireless adapter should be listed. See below.
Wiphy phy0 Band 1: Frequencies: * 2412 MHz [1] (15.0 dBm) * 2417 MHz [2] (15.0 dBm) * 2422 MHz [3] (15.0 dBm) * 2427 MHz [4] (15.0 dBm) * 2432 MHz [5] (15.0 dBm) * 2437 MHz [6] (15.0 dBm) * 2442 MHz [7] (15.0 dBm) * 2447 MHz [8] (15.0 dBm) * 2452 MHz [9] (15.0 dBm) * 2457 MHz [10] (15.0 dBm) * 2462 MHz [11] (15.0 dBm) * 2467 MHz [12] (disabled) * 2472 MHz [13] (disabled) * 2484 MHz [14] (disabled) Bitrates: * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps Supported interface modes: * IBSS * Station * AP * AP(VLAN) * WDS * Monitor * mesh point <--- This is the important mode !
Type the following in a terminal to get the wireless device name.
sudo iwconfig
Your device should be listed as wlanX normally. Check the hardware page for more info if not.
Step 3 - Create a mesh wireless interface
Type the following in a terminal to create the mesh interface.
sudo iw dev wlan0 interface add mesh0 type mp mesh_id maties
This creates a mesh interface mesh0 which will connect with other mesh nodes in the mesh network named maties.
Type the following in a terminal to bring up the mesh interface for IP networking.
sudo ifconfig mesh0 up
Type the following in a terminal to check if the mesh interface is up.
sudo ifconfig | grep mesh0
Your wireless mesh IP interface should be listed. See below.
mesh0 Link encap:Ethernet HWaddr 00:22:b0:4f:c8:fb
Step 4 - Configure your wireless mesh IP interface
Type the following in a terminal.
sudo ifconfig mesh0 10.10.1.10 netmask 255.255.0.0
This gives your mesh IP interface the 10.10.1.10 IP address.
In the default configuration, mesh points will automatically attempt to create peer links will all other mesh nodes with the same mesh ID. You can examine which peer links have been established with the iw dev mesh station dump command:
# iw dev mesh0 station dump Station 00:ff:f3:00:f7:3d (on mesh) inactive time: 504 ms rx bytes: 443 tx bytes: 709 mesh llid: 33183 mesh plid: 19335 mesh plink: ESTAB Station 00:ff:f3:00:f7:30 (on mesh) inactive time: 692 ms rx bytes: 1994 tx bytes: 510 mesh llid: 40419 mesh plid: 6405 mesh plink: ESTAB Station 00:ff:f3:a0:27:15 (on mesh) inactive time: 836 ms rx bytes: 5653 tx bytes: 222 mesh llid: 3233 mesh plid: 47892 mesh plink: ESTAB Station 00:ff:f3:a0:24:b8 (on mesh) inactive time: 800 ms rx bytes: 26680 tx bytes: 294 mesh llid: 22106 mesh plid: 33481 mesh plink: ESTAB
You should now be able to ping any node in the mesh. After doing that you can use iw dev mesh0 mpath dump to inspect the path table and see which path was used to reach the ping destination.
# iw dev mesh0 mpath dump 00:ff:f3:00:f7:30 00:ff:f3:00:f7:30 mesh 1 16386 0 1496 0 0 0x11 00:ff:f3:00:f7:3d 00:ff:f3:00:f7:3d mesh 2 16386 0 1496 0 0 0x15 00:ff:f3:a0:24:b8 00:ff:f3:a0:24:b8 mesh 5 16386 0 1496 0 0 0x11 00:ff:f3:a0:27:15 00:ff:f3:a0:27:15 mesh 1 8577 0 1496 0 0 0x11
If all the above works, then you have joined/created a wireless IP mesh network. Well done.
Step 5 - Make the mesh wireless settings permanent
Add the following to /etc/rc.local before the exit 0 line using your favorite editor in a terminal.
/usr/bin/iw dev wlan0 interface add mesh0 type mp mesh_id maties /sbin/ifconfig mesh0 up /sbin/ifconfig mesh0 10.10.1.10 netmask 255.255.0.0
If you want to route traffic through other wired networks or encrypt wireless network traffic, I leave that up to you and other maties users to figure out.
No comments:
Post a Comment