Short Tutorial on Mesh networking I wrote

John

Well-Known Member
Joined
Oct 4, 2003
Messages
124
Reaction score
0
Location
.
================
Download the Dev88 build from www.locustworld.com. Set up two
PC's and they should mesh.
IF TWO MESH BOXES DON'T MESH:
Do the boxes see each other if you run "sigspy"?
Do the boxes see each other if you run "iwlist wlan0 scan"?
Have they blocked each other (entries in /proc/aodv/blocked)?
==================


vtund #
pingtest #pings all the nodes
speedtest
speeddaemon #open a shell window on router and type speeddaemon use to check mesh or backhaul
iptables -L , #can be used to block meshboxes of the network.
cwradius username password
crontab -e # Issue blocknode command here
crontab -l
minsig # Same as blocknode
radping # Pings radius server

ifconfig #shows the interface configuration, the same as the ethernet/wlan section of 'reporter'
ifconfig , #increase or decrease senoa radio power
ifconfig wlan0 txpower 200mw # should this not be the iwconfig command?
ifconfig wlan0 txpower 50mw

iwconfig #shows the wireless interface configuration - many options available
iwconfig wlan0 txpower auto
iwconfig eth0 essid any
iwconfig eth0 essid "My Network"
iwconfig wlan0 essid off
iwconfig eth0 freq 2.422G
iwconfig eth0 channel 3
See http://leaf.sourceforge.net/devel/jnilo/manpages/iwconfig.html

iwlist - useful stats from wireless interface - more info at leaf.sourceforge
iwlist wlan0 scanning, #far node looks back upstream if there is noise on network
# Shows you everything the node can see


Cat /proc/aodv/monitor # use this with Iwlist wlan0 scanning command
unblock #commnand unblocks a node if wiana blocked it.
reporter #gives status of all meshboxes eth etc.
"speedtest &" on the gateway and "speeddaemon" and
"speeddaemon up" on the repeater nodes.
ssh #secure shell into a meshbox and then issue command like getandverify
ssh <ipadres> # Use for remote control of a meshbox
getandverify test, #tests to see if wiana.org is available, should say WIANA REACHABLE
getandverify tobuild25dev90 , #to upgrade to a specific build
getandverify tobuild25dev87
getandverify tobuild25dev85
checkuplinkvalidity #after you ssh into box, should say OK.
distread #used before a 'remotemanagement' this cleans up some things.
Careful! Its is roughly the same as 'factoryreset' Seems to kill the
dhcpd.leases file (?)
factoryreset #puts meshbox back to original factory state. Will require you to
get a new certificate again from wiana and get the wiana settings again.
remotemanagement #use this to get the Mesh node to connect to Wiana and get the latest settings. The Mesh node should do this automatically every 30mins, but sometimes you just don't want to wait.

sigspy #use to check if your node can see the other nodes. Gives signal strength.
arp -n # Networking command
mmii-tool #allows interrogation of status of ethernet module, and allows you to specify settings or to reset the ethernet
cat /proc/aodv/... #in here you can find files with current details of the meshing and aodv operation.
cat /var/state/dhcp/dhcpd.leases #tells you which DHCP leases have been given out to clients and when they expire.




==============
CONNECT Linksys Access Point to MESH:
Attaching a standard AP to the ethernet port of a repeater node is a
really good way to offer a local channel for wireless users. Use the "wired
captiveportal" option to enable authentication over it and make sure to use a
different channel/essid to your mesh. The AP needs to be operating in
standard transparent bridging mode which is normally the default.
This wont work on a gateway node though and if the "wired captive
portal" option is enabled on a gateway it is likely to try and authenticate the
upstream router resulting in no traffic being allowed to flow.

==============
STATIC IP assignment tutorial vers. 1

Thursday, 13 May 2004
To establish static settings before you can connect to wiana:
Once booted, login on the console as root user (or SSH in as root) and create a file called /etc/STATIC

It is recommended to use the vi editor for this
create the file like so:
1.2.3.4 netmask 255.255.255.0
3.4.5.6
7.8.9.0
Where 1.2.3.4 is the IP address you want for the meshAP device and replace 255.255.255.0 with your local netmask and 3.4.5.6 with your gateway address. 7.8.9.0 is optional address for the static name server.
IMPORTANT - make sure you end the last line with a carriage return.

Once this is done, issue the command "reboot" and the system should come back up with the static address. You'll want to duplicate the same settings on the wiana management page for the meshap once registered. Issue the command "remotemanagement" to force a connection to wiana. Configuring a static connection in wiana Go to bottom right of management page to Core Settings Enter values in the fields for:

static eth addr:
static eth netmask:
static eth gateway:
and optionally
static eth dns:
The values in the Wired local 192.168.: section are overridden by the static settings.


===============
STATIC registration on Wiana tutorial vers. 2
WIANA REGISTRATION tutorial from www.ultramesh.com
wianaregister # ?
Ultramesh MeshAP
UltraMesh Quick Setup
Register at wiana.org to receive an encryption key and management of nodes.
Email Wiana login name to [email protected].
Node will be transferred to your account.
Nodes are set up for Infrastructure mode with the ESSID of Ultramesh and DHCP client on the Ethernet interface. If your DHCP server does not hand out an address due to an incompatibility, use the following instructions to set a static IP on the box.
Connect wirelessly and obtain an address. From there, using SSH, log into the unit using the gateway address on the laptop you are using. The login username is root and the password terra7. From there, enter the following commands:
vi /etc/STATIC <ENTER>
Then edit the file as follows:
Hit <INS> key and enter
192.x.x.x 255.x.x.x
192.x.x.1
Where the ip address you want on the unit is the first 192.x.x.x, the subnet is the 255.x.x.x and the gateway is 192.x.x.1. Change those values to whatever makes sense for your network.
Then hit <ESC> and then :wq <ENTER>.
Type reboot <ENTER> and start a ping to see if the box is communicating via the Ethernet port.

================
wiana.settings webscript
http://www.melissen.net/cgi-bin/foe
http://www.melissen.net/cgi-bin/foe carries the most recent version of
wiana.settings web script, a script that allows you to quickly edit
wiana.settings and reboot your node, without having to wait for wiana
or having to log in with ssh and manually edit /etc/wiana.settings
The scripts on the web page are for testing. Carefully study the write
script - it does not write /etc/wiana.settings directly. It has a
commented out line for
/tmp/wiana.settings. If you remove the # , a
/tmp/wiana.settings will be created which can be cp'ed to
/etc/wiana.settings during boot,
before /etc/wiana.settings is being parsed by the locust scripts.
These scripts are quick hacks, useful for testing, but don't run them
in production as wiana compatibility has not yet been tested fully.
Advantages:
- bash only, no need for perl, java or anything else
- changes are immediate
- wiana compatibility
- easy to change

FTP files into a meshhbox if you can't attach a CDROM to it(sits on a mountain):
use scp.... its secure copy shell like ssh but for coping... runs like
ftp. you can scp between nodes , or using a windows box, and something like
winscp ( http://winscp.sourceforge.net/eng/ )
http://winscp.sourceforge.net/eng/download.php
================
THERE MUST BE 9DB seperation between signal and noise:
General rule of thumb, look for 9db separation. The value does not
matter, only the difference between the two.
So on your example - level:-25 dBm Noise level:-38 dB - good signal
the rest I would regard as unworkable.
Joe Roper
www.meshworks.ws
 
John what I need from you is...

John what I need from you is to implant this 'mesh' software into a virus. Then I will infect the WLANs I come across. The virus must automatically reconfigure all the WLANs to become part of the ZA / Pta mesh...
 
Ok, this mesh stuff is getting to complicated. All you want is working stable system without having to learn Linux. The solution is very simple:
Fork out R580 extra for your node and buy commercial support and software from www.qorvus.com. If you have 10 nodes then you will pay R5800 for the WISP software. Miro sells Mikrotik WISP software and it does not come close to what www.qorvus.com provides.
As far as I know only Locustworld implements the Adhoc On demand Open
distance Vector routing protocol AODV. You can't daisychain a couple of
vanilla D-Links to form a mesh, it won't work.
To each locust mesh node you connect CPE or Customer Premise Equipment namely Linksys WRT54G Access Points. This is a dirt cheap , stable and practically tested system that simple works.

If you want to video monitor a block of streets via a Locust mesh you need the bandwidth 5.8ghz provides. Contact http://feeedpro.net for this.

These professional commercial support companies turns anybody into
full fledged Locust mesh WISP. The closest thing you will get to this is a
R12 000 rand 5.8ghz Access Point from www.firetide.com that has it's own daisy chain repeater mesh software.

============
Here is some more notes on connectiing a Linksys WRT54G router to the network:
Linksys WRT54G Routed Client (CPE) setup instructions for Sveasoft
Alchemy-6.0

You can implement the WRT54G in Routed Client mode, meaning everything
is routed/NAT'd between the WRT54G Ethernet switch and the Mesh. The
only device the Mesh sees is the Routers WAN MAC address. This allows
you to plug in up to 4 devices into the WRT54G and only have to
authenticate once on the Splash page for all devices. This
implementation results in shared bandwidth for all clients attached to
the WRT54G.

1. Under the Wireless tab, Basic Settings, change Wireless Mode: to
Client
2. Change Wireless Network Mode: to B-Only (Found to work better
than mixed mode with MeshAP's)
3. Change Wireless Network Name (SSID): to your MeshAP SSID
4. Save Settings
5. Leave Client Mode: as Routed
6. Under Wireless, Security, implement your Mesh security (ie. WEP)
if appropriate
7. Save Settings
8. Under Status, Wireless, confirm link under AP Signal: (This will
give the signal strength and MAC address of the associated AP)
9. If there is still no AP connection, go to the Setup tab, under
Basic Setup, and choose Save Settings (sometimes it seems necessary to
do a main Save Settings to implement major wireless changes)


Linsys WRT54G Bridged Client (CPE) setup instructions for Sveasoft
Satori-4.0

You can implement the WRT54G in Bridged Client mode, meaning the WRT54G
will appear invisible to the client and the Mesh. The Mesh will see
all
devices connected to the WRT54G. Each connected device will have to
authenticate on the Splash page. This implementation results in
dedicated bandwidth for each client attached to the WRT54G.

1. Under the Wireless tab, Basic Settings, Change Wireless Mode: to
Client
2. Change Wireless Network Mode: to B-Only (Found to work better
than mixed mode with MeshAP's)
3. Change Wireless Network Name (SSID): to your MeshAP SSID
4. Save Settings
5. Change IP of associating AP: to the IP address of the MeshAP you
wish to bridge to
6. Under Wireless, Security, implement your Mesh security (ie. WEP)
if appropriate
7. Save Settings
8. Under Status, Wireless, confirm link under AP Signal: (This will
give the signal strength and MAC address of the associated AP)
9. Under Setup, Basic Setup, disable DHCP server
10. Save Settings
11. Renew your IP address for your pc and you will be bridged to
your Mesh.
 
Last edited:
We are finally able to create a 40km backbone link between PTA and JHB or to the
nearest train station for www.transtel.co.za bandwidth.
Your www.qorvus.com or http://feeedpro.net software is installed or you managed to use your considerable Linux skills to get the mesh working. The repeater nodes relaying the signal from point to point will provide local node connectivity to your surrounding users. As explained this is done by connecting a Linksys WRT54G to the ethernet port of the mesh node. Each www.locustworld.com node will have two back to back parabolic antenna's connected via a signal splitter to the mesh node. Either this or you insert another Senao 200mw PCI card into the mesh box so that each card has it's own antenna. http://www.hyperlinktech.com has pictures of signal splitters. If you connect 10 linksys AP ($60) each to this single Linsys AP connected to your mesh repeater node and divide the total cost by 10 people you can see just how cheap this whole setup is for individual users ( R4500 + 5 ( R1800))/ 10
= R2250 for each user once off.

The 2.4ghz spectrum is severely polluted so Omni's are out. You can use a signal splitter on your Linksys and connect 60deg sectored antenna's. Hyperlink even has a 4port splitter providing your with 360degree functionality Your client Linksys AP will connect to these 60 deg antenna's via parabolics, ensuring max signal to noise ratio. Just remember that a signal splitter halves the power from a card. So use short run
Lm400 microwave cable. All www.poynting.co.za antenna's use N-Female.

It is recommended that your startup script on each node issues the
[iwconfig wlan0 txpower auto] command. I recommend that you get www.qorvus.com software and forget about Linux so we can get this thing of the ground. Will you at least list your email details on www.nodedb.com !

The setup of the main backbone mesh nodes assumes a path from one point
to the Internet linkup. For the mesh to branch off into additional nodes is a simple matter of adding more repeater nodes that linkup with an additional repeater node on the backbone.

Note that the client Linksys WRT54G must all be connected in Infrastructure mode. That is they must all see the main Linksys AP which is connected to the ethernet port of the repeater node and not each other. The embedded Frottle software on the Linksys AP solves the hidden node problem that this
setup introduces, which is why you can't use D-Links, trendnet, Gigabyte or
anything else for your client devices.
 
Last edited:
nicroets said:
John what I need from you is to implant this 'mesh' software into a virus. Then I will infect the WLANs I come across. The virus must automatically reconfigure all the WLANs to become part of the ZA / Pta mesh...


ROFL, go Nic
 
WIRELESS CAMERA AND THE LOCUSTWORLD MESH
QUES:
We have set up a D-Link DWL5300 web cam and all is working right with the camera but I
get an error "192.168.250.215 sent an invalid ICMP error to a Broadcast (4 times)" and
this message keeps repeating on the gateway box.
If I take out the Host Mapping Settings the error goes away. And one other strange thing
when my Host Mapping Settings are in I can't
get the Washington Post web site to come up, take out the settings and all works fine.
We use the host mapping settings so that the camera
can be viewed with a public address. Also all of the sudden after about 2 weeks it will
cause the gateway node to lock up and go to "tick struck".
Need some help with these problems.
ANSW:
Is the gateway tunnel set to PPP or IP? This is under the core
settings. Make sure it is IP.

<hr>
ANSW:
If these nodes are checking into Wiana, you can see that in Wiana.
Otherwise, type: cat /var/state/dhcp/dhcpd.leases
to see what leases have been handed out.
QUES:
Is there a command I can issue to see what ip the meshap assigned
to the camera? I am using just a gateway right now for testing. Again if
you do not have the time I can understand. Thanks in advance.


<hr>

Wireless cameras

(1) Port mapping in the meshap doesn't work properly to outside IP's
and requires way too many entries anyway) so host mapping is the way to
go
(2) You will need a seperate host-map entry for each camera
(3) On the gateway in the Host Map field, you enter static outside IP
cell ID #1 on the destination meshAP> <local 192.168.x.x IP for the
camera that's linked to the destination meshAP> for example 24.2.34.50 180
192.168.0.30
(4) The local 192.168.x.x address for the camera should be static.
(5) If you have a standard router (like a linksys) sitting between
the gateway meshap and the outside internet, you can use port forwarding
inside that router to the individual IP's you've set up on the gateway for
host mapping. In that case, use 192.168.x.y static addresses in the first
entry on the host mapping field instead of the static outside IP. Make sure
that the "x" in 192.168.x.y is a different value than the "x" you use for
the camera's IP. A general comment- you will not get good performance from 30 cameras
in one mesh. We rarely use more than 10 and usually have one meshap per
camera.You can improve your performance by using cameras that have built-in
bandwidth (adjustable frame rate) limiting. If you try to use cameras that
don't have built bandwidth limiting, and use more than one camera per meshnode,
the system will starve for bandwidth and you will get very poor results.
Also don't try to use low-speed CPU boards for this application- they will
crash.
 
Hardwarekey fix on www.soekris.com boards
ANSW:
The ultrakey generation is not effective and it should be changed.Ultrakey changes values on some embedded systems(SOEKRIS) without anything being swapped out.So the first time you boot a meshbox you just do ultrakey > /hj/mykey and then you replace the contentsof ultrakey by:
#!/bin/sh
cat /hj/mykey
Works great.

ANSW:
Many of the "my meshAP won't check in anymore" problems are the result of the hardware key no longer being what it used to be when the unit was first >registered at wiana. This happens because the hardware key is recalculated >on-the-fly every time the meshbox reboots, and if anything goes wrong during >that process (which we have occasionally seen even if none of the network >hardware or CF components are swapped out) your hardware key is suddenly >diferent. >However this problem is relatively easy to fix. Our Qnode embedded web>interface has a provision for hardware key maintenance which makes the CF >system independent (that is you can move it to any meshAP and it retains its >identity and key). However, you can create the same result by adding a file >by hand as follows:


>SSH into the meshAP and type this command:
>hardwarekey >/etc/HARDWAREKEY
Then, in
>/hj/hardwarekey,
> >replace the old script with the one below.
>-------------------------------------------
#!/bin/sh
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
if [ -f /etc/HARDWAREKEY ]
then
if [ "`cat /etc/HARDWAREKEY`" != "`cat /tmp/work/ultrakey.cache`"]
then
cat /etc/HARDWAREKEY >/tmp/work/ultrakey.cache
fi
cat /tmp/work/ultrakey.cache
else
a=`ifconfig grep HWaddr grep -v '^br' head -1`
a="$a`ide_info /dev/hda``head /proc/cpuinfo grep -v MHz`"
m=`echo "$a" md5sum tr -dc '0-9a-f'`
echo -n "$m"
echo -n "$m" >/etc/HARDWAREKEY
echo -n "$m" >/tmp/work/ultrakey.cache
fi

Once this is in place, if for some reason you want to change the hardware key, just edit /etc/HARDWAREKEY
IMPORTANT NOTE: If you reflash the system you will need to redo thisprocess, as the new version of the LW code will delete the /etc/HARDWAREKEY and modified /hj/hardwarekey files.
 
http://www.cuwireless.net is a far easier way to get involved with mesh networking Download their code I don't think you need to be a Linux expert to use it.
http://madwifi.sourceforge.net is the site for the Atheros 5ghz chipset. They have finally released the drivers for Ad-Hoc mode in 5ghz. Soon they will release 802.11n drivers. Ad-hoc mode is the core of mesh topology.
www.sveasoft.com are working on the AODV routing protocol for the $50 Linksyswrt54g routers.
George Soros made a $200 000 contribution to www.cuwireless.net
Soros want's to see the third world bridge the digital divide.
The 2.4ghz spectrum has been trashed by by www.wavestream.co.za so you can only use omni's in the 5Ghz band.
http://www.cwc.oulu.fi/~hernia/linkit.html
http://www.mitre.org/work/tech_transfer/mobilemesh/
http://moment.cs.ucsb.edu/aodv-ietf/
http://w3.antd.nist.gov/wctg/aodv_kernel/

The Icasa morons would not know what to do about it
since it would be pointless to get court orders to confiscate R600 AP from your rooftop. And by the way why has Orion Telecom not been arrested by the police. Read the article on mybraodband. Is it not a more flagrant violation of act 96 to provide a Telecoms service then for poor old Phinias Mapoena to lay a Fibe Optic cable across the road?
 
Last edited:
After reading all this my head hurts, think I will stick to AP towers. :D

I will look into the Mesh idea though, thanks for the loads of information
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X