-
Notifications
You must be signed in to change notification settings - Fork 54
HOWTO 0.1.2
This page explains how to set up a simple static mesh network using open80211s and a "Airlink 101 USB wireless adapter, Model:AWLL3026":http://www.airlink101.com/products/awll3026.html.
Get a kernel including the open80211s stack:
$ git clone git://o11s.org/open80211s.git
Configure the kernel including the mac80211
stack and zd1211-rw
driver (CONFIG_ZD1211RW
, CONFIG_MAC80211
). Compile and install.
Make sure /lib/modules/${KERNEL_VERSION}/build/include
points to your kernel headers. This is necessary for pynl80211 to work.
Get pynl80211:
$ git-clone http://git.sipsolutions.net/pynl80211.git
It is not necessary to compile it, but make sure that wificonf.py
is in your $PATH
.
Get "iproute2-2.6.23":http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.23.tar.bz2 and apply "the mesh support patch":http://o11s.org/patches/iproute2/iproute2-2.6.23-mesh-support-0.1.2.patch. Configure, compile, install.
- Boot several nodes with the compiled kernel and tools.
- Add a new mesh interface for the zd1211-rw device to each node with the pynl80211 utility:
# MESH_IFACE_TYPE=7
# wificonf.py new_interface 0 mesh $MESH_IFACE_TYPE
A new interface will be created:
# ifconfig -a | grep mesh
mesh Link encap:Ethernet HWaddr 00:18:39:14:48:B5
- You can assign a mesh id. This mesh id will be use in the mesh node beacons when the interface is brought up. Todo this with the pynl80211 utility, execute:
# wificonf.py set_mesh_cfg
mesh_id is max 32 characters long. If no mesh id is set, the zero-length wildcard mesh id will be used.
- Assign a same-subnet IP to the mesh interface in each node.
# ifconfig
- Nodes will be able to communicate if they have an established peer link and an entry for the destination node in their path tables. The first condition will be satisfied by default if the nodes are in range. Create a network topology with the modified iproute2:
# ip mshpath add dst next_hop dev .
It is also possible to show and clear the mesh path table with the show
and delete
subcommands.
- All mesh interfaces start by default in channel 1. The channel can be changed with
# iwconfig channel
- If the paths are correct (i.e. they connect two nodes both ways) and the nodes are on the same channel, it will be possible to ping the nodes or perform any other kind of data transfer, for example, an ssh session. Note that since broadcast packets are not forwarded yet, the two nodes must be within range or it will necessary to bypass the arp resolution by adding the MAC and IP addresses to the arp table on each node with:
# arp -s
You can see the mesh peer links table with
# ip mshplink
Possible commands for mshplink are:
-
show
: same as no command, list all the plinks. -
add dev $MESH_DEV addr $HW_ADDR
: adds the peer to the table and tries to establish a link if the node is configured to do so. -
del dev $MESH_DEV addr $HW_ADDR
: deletes a peer link from the peer table. -
block dev $MESH_DEV addr $HW_ADDR
: blocks a peer so we cannot get any traffic from him. -
open dev $MESH_DEV addr $HW_ADDR
: tries to establish a peer link with a peer already in the table and inLISTEN
state.