Wednesday, June 25, 2014

Mesh Networks

I have been following the progress of the Broadband-Hamnet group for several years. This group has developed and packaged firmware for use on Linksys routers (and now Ubiquiti) to be used as a WiFi mesh node. Because the 13 cm ham band (2.4 Ghz) overlaps with the 2.4 Ghz ISM band, hams can use larger antennas and power in this segment and achieve a high speed, self discovering, self configuring, fault tolerant, wireless computer network over some significant ranges (up to 10 miles with stock hardware with just external antennas).

I acquired several Linksys routers a while back for use with this firmware but had not had an opportunity to try them yet. After a closer inspection I found that only one of the two Linksys devices I had was compatible (WRT54GS v2). I remember that a fellow ham had acquired several Linksys devices also and I asked if he could bring over what he had so we could experiment with a mesh network. It turned out he had a compatible WRT54G v2 device.

After studying the above Broadband-Hamnet site there are several great documents on loading the firmware and setting up the nodes. The GS model already had OpenWRT on it so I used the upgrade file- bbhn-1.0.0-brcm.trx for that one and on the G model the bin file- bbhn-1.0.0-wrt54g.bin was used.

The firmware is very nice. From what I can tell reading their site, this release (version 1) has many improvements. Since this is a mesh network every node must have a unique set of IP addresses. The firmware does this by using the last three hex values of the network interfaces MAC address as your IP address. The full IP address is then formed as 10.x.y.z where x,y,z are the last three hex values of the network interface. These Linksys devices have have three interfaces (Wifi, LAN, and WAN). The Wifi and LAN interfaces are the ones assigned the 10.x.y.z addresses and the WAN interface is reserved for internet gateway use. The firmware sets up a DHCP server on the LAN side and each node has DNS which is distributed across the mesh. The following diagram is the basic mesh network that was built.


As you can see we have three nodes. The third node was actually a OLSR switch software running on a Windows XP laptop. I had found some basic notes HERE on how to do this and after some experimenting with the OLSR switch, it works but lacks some of the features (e.g. DNS) of the Linksys firmware. However it does function as a full mesh node on the Wifi side. I have yet to try hsmm-pi which runs the mesh software on a Raspberry Pi but it is not as nice as just running it on a everyday Windows laptop. This OLSR switch software is not the most current evolution of OLSR that is running in the HSMM firmware but is workable. The nice thing is that on windows, you can bind it to any of the network interfaces and turn it off and on easily so you can switch from a normal client Wifi use to mesh Wifi. This configuration allowed me to test with routing to the internet as well. Any mesh node roaming into this mesh gets internet access provided by the N6SER-100 node. You can also provide many other services (e.g. web, cameras, etc) in this same way and all nodes in the mesh will automatically have access. As an additional exercise a Linksys WAP54 was added to the LAN port of one of the Linksys mesh nodes and this was used to provide access to the mesh network with a standard wifi client, like a smart phone or any computer with a Wifi interface. The HSMM firmware supports a wireless access point mode as well, however this would need two Linksys devices to achieve this and since the WAP54 model that we had could not be loaded with the HSMM firmware it is a better use of hardware since you would want to you use your HSMM Linksys nodes as mesh nodes.

The next step is to use gain antennas and establish a mesh network over a greater distance perhaps 2-3 miles then maybe 10 miles.



No comments:

Post a Comment