<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wirelessafrica.meraka.org.za/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tom</id>
	<title>WirelessAfrica - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wirelessafrica.meraka.org.za/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tom"/>
	<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php/Special:Contributions/Tom"/>
	<updated>2026-04-30T13:49:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Setup&amp;diff=3797</id>
		<title>High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Setup&amp;diff=3797"/>
		<updated>2008-08-01T13:56:31Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway.&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: High Performance Node]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3796</id>
		<title>Category:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3796"/>
		<updated>2008-08-01T13:53:34Z</updated>

		<summary type="html">&lt;p&gt;Tom: Removing all content from page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Title:High_Performance_Node_-_Setup&amp;diff=3795</id>
		<title>Title:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Title:High_Performance_Node_-_Setup&amp;diff=3795"/>
		<updated>2008-08-01T13:51:29Z</updated>

		<summary type="html">&lt;p&gt;Tom: Removing all content from page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Setup&amp;diff=3794</id>
		<title>High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Setup&amp;diff=3794"/>
		<updated>2008-08-01T13:50:57Z</updated>

		<summary type="html">&lt;p&gt;Tom: New page: This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&amp;#039;s meant for someone with networking experience but almost no Unix ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway.&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Title:High_Performance_Node_-_Setup&amp;diff=3793</id>
		<title>Title:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Title:High_Performance_Node_-_Setup&amp;diff=3793"/>
		<updated>2008-08-01T13:50:28Z</updated>

		<summary type="html">&lt;p&gt;Tom: New page: This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&amp;#039;s meant for someone with networking experience but almost no Unix ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway.&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3792</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3792"/>
		<updated>2008-08-01T13:49:25Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Site Visits ==&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday July 24th - Friday July 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site.&lt;br /&gt;
&lt;br /&gt;
=== Ndlovu Clinic Visit ===&lt;br /&gt;
&lt;br /&gt;
Monday July 28th - Friday Aug 1st I was able to go to the Ndlovu Medical Clinic in Elansdoorn. There&#039;s a fairly sophisticated IT setup there, essentially a large Windows Active Directory setup with about 100 client PCs. Additionally, there&#039;s interest in using a wireless mesh to run telemedicine between the main clinic and some of the outlying Nutritional Unit sites. The telemedicine itself is currently tied up in political discussions, but the network is largely in place. It uses the Bokkie routers developed at Meraka, running both IPv4 and IPv6 on the mesh. I helped Henry, Ndlovu&#039;s main IT guy, to add another node to the mesh connecting the main clinic building, where most of the computer systems reside and the Internet uplink comes in, to their computer lab, a couple hundred meters away. Most of the nodes are currently off because they can&#039;t be used for telemedicine and if they&#039;re on they risk getting fried by lightning. But with just those two nodes everything worked largely as expected.&lt;br /&gt;
&lt;br /&gt;
We configured the main clinic&#039;s node to act as a default gateway for the network, hooking in to the main clinic network. All of the computers in the lab are now set up to use the node there as their DHCP server. Traffic can be routed out to the Internet, but there&#039;s one remaining issue: the mesh itself has no DNS support, and so the computer lab nodes need to have DNS servers manually configured. Johann has indicated that this would be fairly easy to fix, however, simply by configuring the clinic node to be the mesh&#039;s DNS server then pointing it to the DNS server of the main clinic network. Johann and Henry should be in contact to resolve this last issue (pun not intended ;)&lt;br /&gt;
&lt;br /&gt;
The main challenges in getting things set up at Ndlovu was not related to the mesh so much as the rest of the clinic&#039;s setup. As mentioned, it&#039;s entirely a Microsoft domain, and there was a Microsoft ISA 2004 firewall set up at the perimeter of the network. We added another one in between the mesh and the rest of the network, to limit access and also bandwidth-limit the computer lab so it doesn&#039;t take out the entire Internet uplink. This caused all manner of chaos on the internal network; at one point the entire Active Domain stopped working. We traced the problem to a &amp;quot;known issue&amp;quot; mentioned in an MSDN article; the solution was manually changing some registry key. This was a full day and a half&#039;s worth of headache, however. After that it was relatively smooth sailing, the only other issue was configuring the newly added firewall to route to the mesh network properly. This required some fiddling with routing tables on the Windows command line, no mean feat but doable. After that we were in good shape, save the DNS problem mentioned above.&lt;br /&gt;
&lt;br /&gt;
The node itself on the computer lab is mounted on the computer lab by means of a nice mast that the Ndlovu workmen welded us. It should offer no problems, but the Ethernet cable still needs to be routed inside the building and protected from the elements.&lt;br /&gt;
&lt;br /&gt;
As soon as they get permission to start doing telemedicine or have other needs for the mesh it should be quite easy to just turn on the other Bokkie routers and expand the mesh rapidly. Before this is done, however, the DNS issue should be resolved.&lt;br /&gt;
&lt;br /&gt;
For the sake of completeness, I&#039;ll also link here to the instructions I wrote for Henry, Ndlovu&#039;s IT guy, on how to work with the Bokkie routers. This is based on the instructions Johann gave me. [[High Performance Node - Setup]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3791</id>
		<title>Category:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3791"/>
		<updated>2008-08-01T13:47:55Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway.&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3790</id>
		<title>Category:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3790"/>
		<updated>2008-08-01T13:46:51Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway.&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3789</id>
		<title>Category:High Performance Node - Setup</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Category:High_Performance_Node_-_Setup&amp;diff=3789"/>
		<updated>2008-08-01T13:46:33Z</updated>

		<summary type="html">&lt;p&gt;Tom: New page: This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&amp;#039;s meant for someone with networking experience but almost no Unix ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is specifically for the Bokkie routers at Ndlovu, but the instructions could be adapted for other sites. It&#039;s meant for someone with networking experience but almost no Unix or Linux-specific knowledge.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
This is how you would configure a new node to be added to the mesh.&lt;br /&gt;
Note, however, that many of the values here would have to change, and&lt;br /&gt;
they can&#039;t just be arbitrary! It depends on what other nodes this one is&lt;br /&gt;
going to point to, so that channels and IP addresses don&#039;t interfere.&lt;br /&gt;
We&#039;ll make an assumption about these values and then go from there; it&#039;s&lt;br /&gt;
a good idea to consult with Johann or at least take a hard look at the&lt;br /&gt;
physical layout of the nodes to make sure that channels aren&#039;t&lt;br /&gt;
interfering and you&#039;re using a proper IP range. I&#039;m attaching the&lt;br /&gt;
version of the layout I have, but as you know it&#039;s out of date.&lt;br /&gt;
&lt;br /&gt;
Lets assume this is node number 12. So all it&#039;s IP4 addresses are going&lt;br /&gt;
to end with 12.&lt;br /&gt;
&lt;br /&gt;
Config instructions:&lt;br /&gt;
&lt;br /&gt;
Plug into the Ethernet port of the node with your laptop and get a DHCP&lt;br /&gt;
lease. &lt;br /&gt;
&lt;br /&gt;
Look at your default gateway after you get a lease; this is the IP&lt;br /&gt;
address of the node. &lt;br /&gt;
&lt;br /&gt;
SSH to default gateway. Use this username and password:&lt;br /&gt;
&lt;br /&gt;
﻿username = coin&lt;br /&gt;
password = coin#123&lt;br /&gt;
&lt;br /&gt;
You can either use Putty on Windows or the following command on *nix&lt;br /&gt;
[note: the &amp;quot;$&amp;quot; indicates that you can run this as a normal user, it&lt;br /&gt;
represents a command prompt; you actually type the part coming&lt;br /&gt;
afterwards. This is a standard convention.]&lt;br /&gt;
&lt;br /&gt;
$ ssh coin@10.36.145.1&lt;br /&gt;
&lt;br /&gt;
where 10.36.145.1 is the IP address of the router; it will be different&lt;br /&gt;
on each one. Enter the password when prompted.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re logged into the node you should get a shell. Make yourself&lt;br /&gt;
the root user with the command:&lt;br /&gt;
&lt;br /&gt;
$ su&lt;br /&gt;
&lt;br /&gt;
It shouldn&#039;t ask you for a password. Now you&#039;re root, and you can&lt;br /&gt;
execute commands that start with a &amp;quot;#&amp;quot; (again, don&#039;t actually type the&lt;br /&gt;
&amp;quot;#&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
First, you need to mount the entire filesystem read/write (it&#039;s&lt;br /&gt;
read-only by default).&lt;br /&gt;
&lt;br /&gt;
# mount -u -w /&lt;br /&gt;
&lt;br /&gt;
Next, edit that crucial file:&lt;br /&gt;
&lt;br /&gt;
# vi /conf/default/etc/rc.conf.local&lt;br /&gt;
&lt;br /&gt;
This will bring up VI, in command mode, editing this file (which may not&lt;br /&gt;
exist yet). Press &amp;quot;i&amp;quot; to go into insert mode, then add:&lt;br /&gt;
&lt;br /&gt;
hostname=&amp;quot;Ndlovu&amp;quot;&lt;br /&gt;
olsrd4_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
ifconfig_ath0=&amp;quot;10.0.10.12/24 mode 11a channel 136 mediaopt adhoc ssid&lt;br /&gt;
ptabb bssid 22:b7:1a:b8:9c:7f&amp;quot;&lt;br /&gt;
ifconfig_ath1=&amp;quot;10.0.50.12/24 mode 11a channel 128 mediaopt adhoc ssid&lt;br /&gt;
ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that these values vary per-node! So change the hostname to&lt;br /&gt;
something reasonable, but make sure that the IP addresses and channels&lt;br /&gt;
are correct for the place you&#039;re putting the node. Note that each of&lt;br /&gt;
thoese something=&amp;quot;something else&amp;quot; lines is one line, but it in some&lt;br /&gt;
views it can wrap.&lt;br /&gt;
&lt;br /&gt;
Save and quit VI by going into command mode (hit ESC while in insert&lt;br /&gt;
mode), then typing &amp;quot;:wq&amp;quot; and pressing return. Once out of VI, reboot:&lt;br /&gt;
&lt;br /&gt;
# shutdown -r now&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do anything in olsrd4.conf, because&lt;br /&gt;
the /conf/default/rc.early script on the Ndlovu routers will generate&lt;br /&gt;
the olsrd4.conf file, with all it&#039;s HNA entries, if you enable &lt;br /&gt;
olsrd4 in rc.conf.local. After the reboot you can do:&lt;br /&gt;
&lt;br /&gt;
$ ps -ax | grep olsrd&lt;br /&gt;
&lt;br /&gt;
And look for lines that list &amp;quot;olsrd4&amp;quot; to ensure that olsrd4 is running&lt;br /&gt;
(i.e. OLSR is working for IPv4).&lt;br /&gt;
&lt;br /&gt;
Note that some of the non-deployed nodes may not have the right rc.early&lt;br /&gt;
script. If that&#039;s the the case, you can copy the /conf/default/rc.early&lt;br /&gt;
script from anyone the other routers, or the one from the tar file&lt;br /&gt;
attached to this email. To do that, you want to either use an SFTP&lt;br /&gt;
client on Windows to copy the rc.early file to /conf/default/rc.early&lt;br /&gt;
(after mounting the filesystem read-write as above!), or from a *nix&lt;br /&gt;
machine you can run:&lt;br /&gt;
&lt;br /&gt;
$ scp /path/on/local/computer/to/rc.early coin@10.36.145.1:&lt;br /&gt;
&lt;br /&gt;
Where 10.36.145.1 is again the IP of the node, your default gateway.&lt;br /&gt;
Then log into the box, run:&lt;br /&gt;
&lt;br /&gt;
$ ls&lt;br /&gt;
&lt;br /&gt;
To make sure that the file is there (in your current directory, which&lt;br /&gt;
should be /root). Then you can do this ﻿(note again that anything with a&lt;br /&gt;
&amp;quot;#&amp;quot; in front of it you need to first be root to do):&lt;br /&gt;
&lt;br /&gt;
# cp rc.early /conf/default/etc/rc.early&lt;br /&gt;
&lt;br /&gt;
Reboot, as above, and you should be good. Check again for olsrd4.&lt;br /&gt;
&lt;br /&gt;
Debugging:&lt;br /&gt;
&lt;br /&gt;
Login to router using SSH as above.&lt;br /&gt;
&lt;br /&gt;
Do a &amp;quot;list sta&amp;quot; to see if you can see the other nodes. Should be&lt;br /&gt;
something like this:&lt;br /&gt;
&lt;br /&gt;
# ifconfig ath0 list sta&lt;br /&gt;
&lt;br /&gt;
ADDR               AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG&lt;br /&gt;
00:80:48:50:9a:0b    0  136  18M   38    0  29660  61984 I    A&lt;br /&gt;
00:80:48:50:9e:c1    0  136  48M   43    0  26851   7568 I    A&lt;br /&gt;
&lt;br /&gt;
OR, ﻿if you want to fine tune the alignment, this is a continuous&lt;br /&gt;
printout of the above:&lt;br /&gt;
&lt;br /&gt;
# rssi -i ath0 &lt;br /&gt;
&lt;br /&gt;
Do a ping Ndlovu and other sites to test connectivity.&lt;br /&gt;
&lt;br /&gt;
$ ping 10.0.10.4&lt;br /&gt;
&lt;br /&gt;
Some general hints:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To inspect a node&#039;s routing table in FreeBSD:&lt;br /&gt;
&lt;br /&gt;
# netstat -r&lt;br /&gt;
&lt;br /&gt;
To make it more readable, print only IPv4 addresses:&lt;br /&gt;
&lt;br /&gt;
# netstat -r -f inet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change the default gateway of a node to 1.2.3.4:&lt;br /&gt;
&lt;br /&gt;
Temporarily:&lt;br /&gt;
&lt;br /&gt;
# route add default 1.2.3.4&lt;br /&gt;
&lt;br /&gt;
Permanently:&lt;br /&gt;
&lt;br /&gt;
Edit /conf/default/etc/rc.conf as root, and at the end of the file add&lt;br /&gt;
the line:&lt;br /&gt;
&lt;br /&gt;
defaultrouter=&amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a list of network interfaces and their IP addresses, etc:&lt;br /&gt;
&lt;br /&gt;
$ ifconfig&lt;br /&gt;
&lt;br /&gt;
On your routers, ones that start npe are Ethernet, ones that start ath&lt;br /&gt;
are wireless.&lt;br /&gt;
&lt;br /&gt;
To look at *all* traffic going through a particular interface:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0&lt;br /&gt;
&lt;br /&gt;
To make this more readable, search for only certain lines. To filter any&lt;br /&gt;
command&#039;s output to only lines that include a specific text, add&lt;br /&gt;
&lt;br /&gt;
 | grep &amp;quot;search&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to the end of it. For example:&lt;br /&gt;
&lt;br /&gt;
# tcpdump -i npe0 | grep &amp;quot;ICMP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dumps all traffic on the npe0 interface, but only shows lines that&lt;br /&gt;
include &amp;quot;ICMP&amp;quot; (eg Ping traffic). Note that the search is&lt;br /&gt;
case-sensitive! To make it not so, use `grep -i &amp;quot;search&amp;quot;` instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To simply view a file:&lt;br /&gt;
&lt;br /&gt;
$ less /path/to/file.txt&lt;br /&gt;
&lt;br /&gt;
To navigate use arrow keys, to exit this press &amp;quot;q&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To quit any general command, particularly continuous ones like ping or&lt;br /&gt;
tcpdump, press Control+C.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to use that beast of a program, VI: &lt;br /&gt;
&lt;br /&gt;
http://www.cs.colostate.edu/helpdocs/vi.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3788</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3788"/>
		<updated>2008-08-01T13:42:18Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Site Visits ==&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday July 24th - Friday July 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site.&lt;br /&gt;
&lt;br /&gt;
=== Ndlovu Clinic Visit ===&lt;br /&gt;
&lt;br /&gt;
Monday July 28th - Friday Aug 1st I was able to go to the Ndlovu Medical Clinic in Elansdoorn. There&#039;s a fairly sophisticated IT setup there, essentially a large Windows Active Directory setup with about 100 client PCs. Additionally, there&#039;s interest in using a wireless mesh to run telemedicine between the main clinic and some of the outlying Nutritional Unit sites. The telemedicine itself is currently tied up in political discussions, but the network is largely in place. It uses the Bokkie routers developed at Meraka, running both IPv4 and IPv6 on the mesh. I helped Henry, Ndlovu&#039;s main IT guy, to add another node to the mesh connecting the main clinic building, where most of the computer systems reside and the Internet uplink comes in, to their computer lab, a couple hundred meters away. Most of the nodes are currently off because they can&#039;t be used for telemedicine and if they&#039;re on they risk getting fried by lightning. But with just those two nodes everything worked largely as expected.&lt;br /&gt;
&lt;br /&gt;
We configured the main clinic&#039;s node to act as a default gateway for the network, hooking in to the main clinic network. All of the computers in the lab are now set up to use the node there as their DHCP server. Traffic can be routed out to the Internet, but there&#039;s one remaining issue: the mesh itself has no DNS support, and so the computer lab nodes need to have DNS servers manually configured. Johann has indicated that this would be fairly easy to fix, however, simply by configuring the clinic node to be the mesh&#039;s DNS server then pointing it to the DNS server of the main clinic network. Johann and Henry should be in contact to resolve this last issue (pun not intended ;)&lt;br /&gt;
&lt;br /&gt;
The main challenges in getting things set up at Ndlovu was not related to the mesh so much as the rest of the clinic&#039;s setup. As mentioned, it&#039;s entirely a Microsoft domain, and there was a Microsoft ISA 2004 firewall set up at the perimeter of the network. We added another one in between the mesh and the rest of the network, to limit access and also bandwidth-limit the computer lab so it doesn&#039;t take out the entire Internet uplink. This caused all manner of chaos on the internal network; at one point the entire Active Domain stopped working. We traced the problem to a &amp;quot;known issue&amp;quot; mentioned in an MSDN article; the solution was manually changing some registry key. This was a full day and a half&#039;s worth of headache, however. After that it was relatively smooth sailing, the only other issue was configuring the newly added firewall to route to the mesh network properly. This required some fiddling with routing tables on the Windows command line, no mean feat but doable. After that we were in good shape, save the DNS problem mentioned above.&lt;br /&gt;
&lt;br /&gt;
The node itself on the computer lab is mounted on the computer lab by means of a nice mast that the Ndlovu workmen welded us. It should offer no problems, but the Ethernet cable still needs to be routed inside the building and protected from the elements.&lt;br /&gt;
&lt;br /&gt;
As soon as they get permission to start doing telemedicine or have other needs for the mesh it should be quite easy to just turn on the other Bokkie routers and expand the mesh rapidly. Before this is done, however, the DNS issue should be resolved.&lt;br /&gt;
&lt;br /&gt;
For the sake of completeness&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3787</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3787"/>
		<updated>2008-08-01T13:41:19Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Site Visits ==&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday July 24th - Friday July 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site.&lt;br /&gt;
&lt;br /&gt;
=== Ndlovu Clinic Visit ===&lt;br /&gt;
&lt;br /&gt;
Monday July 28th - Friday Aug 1st I was able to go to the Ndlovu Medical Clinic in Elansdoorn. There&#039;s a fairly sophisticated IT setup there, essentially a large Windows Active Directory setup with about 100 client PCs. Additionally, there&#039;s interest in using a wireless mesh to run telemedicine between the main clinic and some of the outlying Nutritional Unit sites. The telemedicine itself is currently tied up in political discussions, but the network is largely in place. It uses the Bokkie routers developed at Meraka, running both IPv4 and IPv6 on the mesh. I helped Henry, Ndlovu&#039;s main IT guy, to add another node to the mesh connecting the main clinic building, where most of the computer systems reside and the Internet uplink comes in, to their computer lab, a couple hundred meters away. Most of the nodes are currently off because they can&#039;t be used for telemedicine and if they&#039;re on they risk getting fried by lightning. But with just those two nodes everything worked largely as expected.&lt;br /&gt;
&lt;br /&gt;
We configured the main clinic&#039;s node to act as a default gateway for the network, hooking in to the main clinic network. All of the computers in the lab are now set up to use the node there as their DHCP server. Traffic can be routed out to the Internet, but there&#039;s one remaining issue: the mesh itself has no DNS support, and so the computer lab nodes need to have DNS servers manually configured. Johann has indicated that this would be fairly easy to fix, however, simply by configuring the clinic node to be the mesh&#039;s DNS server then pointing it to the DNS server of the main clinic network. Johann and Henry should be in contact to resolve this last issue (pun not intended ;)&lt;br /&gt;
&lt;br /&gt;
The main challenges in getting things set up at Ndlovu was not related to the mesh so much as the rest of the clinic&#039;s setup. As mentioned, it&#039;s entirely a Microsoft domain, and there was a Microsoft ISA 2004 firewall set up at the perimeter of the network. We added another one in between the mesh and the rest of the network, to limit access and also bandwidth-limit the computer lab so it doesn&#039;t take out the entire Internet uplink. This caused all manner of chaos on the internal network; at one point the entire Active Domain stopped working. We traced the problem to a &amp;quot;known issue&amp;quot; mentioned in an MSDN article; the solution was manually changing some registry key. This was a full day and a half&#039;s worth of headache, however. After that it was relatively smooth sailing, the only other issue was configuring the newly added firewall to route to the mesh network properly. This required some fiddling with routing tables on the Windows command line, no mean feat but doable. After that we were in good shape, save the DNS problem mentioned above.&lt;br /&gt;
&lt;br /&gt;
The node itself on the computer lab is mounted on the computer lab by means of a nice mast that the Ndlovu workmen welded us. It should offer no problems, but the Ethernet cable still needs to be routed inside the building and protected from the elements.&lt;br /&gt;
&lt;br /&gt;
As soon as they get permission to start doing telemedicine or have other needs for the mesh it should be quite easy to just turn on the other Bokkie routers and expand the mesh rapidly. Before this is done, however, the DNS issue should be resolved.&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3786</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3786"/>
		<updated>2008-08-01T13:39:42Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Site Visits ====&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday July 24th - Friday July 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site.&lt;br /&gt;
&lt;br /&gt;
=== Ndlovu Clinic Visit ===&lt;br /&gt;
&lt;br /&gt;
Monday July 28th - Friday Aug 1st I was able to go to the Ndlovu Medical Clinic in Elansdoorn. There&#039;s a fairly sophisticated IT setup there, essentially a large Windows Active Directory setup with about 100 client PCs. Additionally, there&#039;s interest in using a wireless mesh to run telemedicine between the main clinic and some of the outlying Nutritional Unit sites. The telemedicine itself is currently tied up in political discussions, but the network is largely in place. It uses the Bokkie routers developed at Meraka, running both IPv4 and IPv6 on the mesh. I helped Henry, Ndlovu&#039;s main IT guy, to add another node to the mesh connecting the main clinic building, where most of the computer systems reside and the Internet uplink comes in, to their computer lab, a couple hundred meters away. Most of the nodes are currently off because they can&#039;t be used for telemedicine and if they&#039;re on they risk getting fried by lightning. But with just those two nodes everything worked largely as expected.&lt;br /&gt;
&lt;br /&gt;
We configured the main clinic&#039;s node to act as a default gateway for the network, hooking in to the main clinic network. All of the computers in the lab are now set up to use the node there as their DHCP server. Traffic can be routed out to the Internet, but there&#039;s one remaining issue: the mesh itself has no DNS support, and so the computer lab nodes need to have DNS servers manually configured. Johann has indicated that this would be fairly easy to fix, however, simply by configuring the clinic node to be the mesh&#039;s DNS server then pointing it to the DNS server of the main clinic network. Johann and Henry should be in contact to resolve this last issue (pun not intended ;)&lt;br /&gt;
&lt;br /&gt;
The main challenges in getting things set up at Ndlovu was not related to the mesh so much as the rest of the clinic&#039;s setup. As mentioned, it&#039;s entirely a Microsoft domain, and there was a Microsoft ISA 2004 firewall set up at the perimeter of the network. We added another one in between the mesh and the rest of the network, to limit access and also bandwidth-limit the computer lab so it doesn&#039;t take out the entire Internet uplink. This caused all manner of chaos on the internal network; at one point the entire Active Domain stopped working. We traced the problem to a &amp;quot;known issue&amp;quot; mentioned in an MSDN article; the solution was manually changing some registry key. This was a full day and a half&#039;s worth of headache, however. After that it was relatively smooth sailing, the only other issue was configuring the newly added firewall to route to the mesh network properly. This required some fiddling with routing tables on the Windows command line, no mean feat but doable. After that we were in good shape, save the DNS problem mentioned above.&lt;br /&gt;
&lt;br /&gt;
The node itself on the computer lab is mounted on the computer lab by means of a nice mast that the Ndlovu workmen welded us. It should offer no problems, but the Ethernet cable still needs to be routed inside the building and protected from the elements.&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3785</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3785"/>
		<updated>2008-08-01T13:19:36Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Site Visits ====&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday July 24th - Friday July 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site.&lt;br /&gt;
&lt;br /&gt;
=== Ndlovu Clinic Visit ===&lt;br /&gt;
&lt;br /&gt;
Monday July 28th - Friday Aug 1st I was able to go to the Ndlovu Medical Clinic in Elansdoorn. There&#039;s a fairly sophisticated IT setup there, essentially a large Windows Active Directory setup with about 100 client PCs. Additionally, there&#039;s interest in using a wireless mesh to run telemedicine between the main clinic and some of the outlying Nutritional Unit sites. The telemedicine itself is currently tied up in political discussions, but &lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3748</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3748"/>
		<updated>2008-07-27T12:12:18Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Peebles Valley Visit ===&lt;br /&gt;
&lt;br /&gt;
Thursday June 24th - Friday June 25th a large delegation from Meraka went to Peebles Valley to visit the mesh there. We toured the site, David showed everyone the basic setup and Harry, the director of the clinic there, gave us a quite interesting tour of the medical facilities as well. On Friday we spent some time doing a little network debugging, replacing one of the routers on a house there and plugging back in &amp;amp; resetting a router at the school. We also spoke with some local guys who are maybe interested in turning the wireless mesh into some kind of business, which is clearly crucial for the network to continue functioning; as it is, we can come out and fix things as often as we like, they&#039;ll always just fall apart again. I pitched the WISP-in-a-box system to one of the people who&#039;s interested in making the mesh a business, he seemed interested but I think without an actual product to demo it&#039;s tough to really understand whether it would be useful. This kind of entrepreneur is precisely our target audience, however, so this might be an excellent first test site. &lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3728</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3728"/>
		<updated>2008-07-23T14:00:04Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* AP-only Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px|Icon sources: http://villagetelco.org/, http://www.ubnt.com/products/ns2.php]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all nodes can be configured &lt;br /&gt;
** prepaid vouchers can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar, running OpenWRT with:&lt;br /&gt;
&lt;br /&gt;
* CoovaChilli&lt;br /&gt;
* Dashboard Client with:&lt;br /&gt;
** AP-only node configuration module&lt;br /&gt;
** CoovaChilli configuration module&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Determine appropriate tools for QoS [starting point: Zeroshell]&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP_Coova_phpMyPrepaid&amp;diff=3727</id>
		<title>WISP Coova phpMyPrepaid</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP_Coova_phpMyPrepaid&amp;diff=3727"/>
		<updated>2008-07-23T11:29:54Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Problems / Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: WISP in a box]]&lt;br /&gt;
&lt;br /&gt;
=Overview on ISP requirements/specifications=&lt;br /&gt;
&lt;br /&gt;
This section attempts to formulate a basic set of specifications for an ISP (billing / services / etc), and assumptions taken regarding these specs during technical implementation described in the next section.  Some of the information here is also based on that gathered by Henk Kotze.&lt;br /&gt;
&lt;br /&gt;
==High level definition of use cases==&lt;br /&gt;
&lt;br /&gt;
From ISP manager&#039;s point of view:&lt;br /&gt;
* Web based user interface, for now scripts sufficient;&lt;br /&gt;
* ISP manager gets all info and set up radius, etc....&lt;br /&gt;
* Linksys should be preconfigured by ISP manager&lt;br /&gt;
&lt;br /&gt;
From Client&#039;s point of view:&lt;br /&gt;
* Contact ISP (physically go to person / telephone / ?)&lt;br /&gt;
* Buy equipment (wireless/wired NIC) and prepaid time from ISP manager?&lt;br /&gt;
* Assume that client is in range of hotspot (for now)&lt;br /&gt;
* Client installs equipment (probably part of package from ISP)&lt;br /&gt;
* switch on&lt;br /&gt;
* connect PC / laptop to network&lt;br /&gt;
* opens browser with own PC (assume client has PC...)&lt;br /&gt;
* Enter username , password (web portal?)&lt;br /&gt;
* One should be able to go to internet&lt;br /&gt;
* When limit is reached, cut off&lt;br /&gt;
&lt;br /&gt;
==Billing Model==&lt;br /&gt;
&lt;br /&gt;
* Prepaid&lt;br /&gt;
** Credit Card-related payment (which also includes paypal.com,etc.) is not suitable.  With the prepaid billing system, users can pay directly and get a ticket with login details.  Implementation at the moment is based on this model.&lt;br /&gt;
* Contracts / Subscriptions&lt;br /&gt;
** ?&lt;br /&gt;
&lt;br /&gt;
* Usage plan&lt;br /&gt;
** Time-based usage&lt;br /&gt;
*** Users get disconnected after a set period of time for which they have paid.&lt;br /&gt;
*** Different plans available (e.g, 10 min / 15 min/ 30 min / 1 hr / 2+ hrs / etc)&lt;br /&gt;
** Bandwidth-based usage &lt;br /&gt;
***(total of upload and download)&lt;br /&gt;
*** Different plans available (e.g, 5MB / 10 MB / 20MB / 50MB / 100MB / 1GB/ 2GB /etc)&lt;br /&gt;
&lt;br /&gt;
==User interface / Captive Portal==&lt;br /&gt;
&lt;br /&gt;
* When a user tries to access an external website (a site that requires paid access), he/she is re-directed to login page where the user should enter details provided on the ticket.  The user should also be able to check how much bandwidth / time remaining at any time before/after/while surfing.  It would be nice for the user to be able access this information through the captive portal.&lt;br /&gt;
* Additional thoughts: In the case of ISPs located within a community network, it would be nice for the captive portal to somehow bond with the local community web portal (Perhaps important updates/announcements from community members/leaders on the login portal, etc ?)&lt;br /&gt;
&lt;br /&gt;
==ISP interface==&lt;br /&gt;
&lt;br /&gt;
* ISP should easily be able to manage users (add/edit/reset password/ban/etc)&lt;br /&gt;
* ISP should also be able to monitor usage of users (individual / general usage trend/tracking of all users)&lt;br /&gt;
* ISP should also be able manage / diagnose network problems (push configs to nodes, track problematic nodes, etc)&lt;br /&gt;
** Some information available on [http://wirelessafrica.meraka.org.za/wiki/index.php/Tom%27s_research Tom&#039;s research page] regarding this.&lt;br /&gt;
&lt;br /&gt;
=Technical information on work done=&lt;br /&gt;
&lt;br /&gt;
This section contains documentation on work done regarding testing of an implementation that would make it as easy as possible for a would-be entrepreneur in a wireless mesh network to deploy an ISP service.  The entrepreneur should be able to manage, monitor and charge users with ease.  &lt;br /&gt;
&lt;br /&gt;
==Setup Ingredients==&lt;br /&gt;
The tools used to setup this testbed:&lt;br /&gt;
* Coova [http://wirelessafrica.meraka.org.za/wiki/index.php/The_WISP-in-a-box_project#Coova WISP-in-a-box Wireless Africa wiki], [http://coova.org URL]&lt;br /&gt;
* phpMyPrepaid [http://wirelessafrica.meraka.org.za/wiki/index.php/The_WISP-in-a-box_project#phpMyPrepaid Wireless Africa wiki], [http://sourceforge.net/projects/phpmyprepaid/ URL]&lt;br /&gt;
* [http://www.freeradius.org FreeRADIUS]&lt;br /&gt;
* [http://www.mysql.com MySQL]&lt;br /&gt;
* Ubuntu Hardy Server - This is the distro that was used for the gateway server.  In future, it is intended to have this setup (when finalized) integrated into [http://wiki.inveneo.org/index.php/Main_Page#Inveneo_Hub_Server_Linux_1.x_-_Documentation Inveneo Hub Server Linux].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
Syntax reference&lt;br /&gt;
&lt;br /&gt;
=chapter 1=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bold&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;italics&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
normal text&lt;br /&gt;
&lt;br /&gt;
 a line code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
longer code snippet&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==chapter 1.1==&lt;br /&gt;
&lt;br /&gt;
===subchapter===&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setup Recipe==&lt;br /&gt;
&amp;lt;!-- Previous diagram: http://wirelessafrica.meraka.org.za/wiki/images/thumb/d/d2/Updated-WISPiab-ISP.PNG/800px-Updated-WISPiab-ISP.PNG --&amp;gt;&lt;br /&gt;
[[Image:Updated-WISPiab-ISP.PNG|thumb|left| Diagram of initial WISPiab-billing setup using Coova, myPhpPrepaid.]]&lt;br /&gt;
&lt;br /&gt;
At the moment the intention of this setup is to mainly test billing support, and is more of a wifi-hotspot setup.  It will later on be modified to adapt to a wireless mesh network environment.   The gateway server has an external network interface (e.g, eth0) that is connected to the Internet, and an internal network interface (e.g, eth3), connected to the Coova Linksys Router (internal network).  In this case the external network interface gets its IP address automatically (DHCP).  The internal network interface is assigned a static ip address (e.g, 192.168.5.1), therefore the Coova WAN interface is also set to static (e.g, 192.168.5.4).  All instructions below are provided with the assumption that this is a fresh install of Ubuntu.  Performing these steps on an existing installation does not guarantee proper functionality.&lt;br /&gt;
&lt;br /&gt;
Though I (George) am the main contributor to this section at the moment, this is still work in progress, and is new work for me, so all information stated here may be not be of the highest accuracy.  However, I &lt;br /&gt;
will try my best to keep the information here as accurate as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Coova===&lt;br /&gt;
* Setup coova on Linksys router - [http://coova.org/wiki/index.php/Installation_Help Howto guide on Coova website]&lt;br /&gt;
* Configure Coova WAN settings. (the following points are with assumption that the gateway server settings described here are being used)&lt;br /&gt;
** On Coova administration web portal : &#039;&#039;Network&#039;&#039;-&amp;gt;&#039;&#039;WAN&#039;&#039;.&lt;br /&gt;
** Under &#039;&#039;WAN Configuration&#039;&#039;, &#039;&#039;set Connection Type&#039;&#039; to &#039;&#039;Static IP&#039;&#039;.&lt;br /&gt;
** Under &#039;&#039;IP Settings&#039;&#039;, set &#039;&#039;IP address&#039;&#039;, &#039;&#039;Netmask&#039;&#039; and &#039;&#039;Default Gateway&#039;&#039; settings (e.g, 192.168.5.4, 255.255.255.0, 192.168.5.1 in this example).&lt;br /&gt;
** Under &#039;&#039;DNS Servers&#039;&#039;, add Gateway server internal network interface IP address (e.g 192.168.5.1).&lt;br /&gt;
** Leave the &#039;&#039;Dyanmic DNS&#039;&#039; Settings as is. Save changes.&lt;br /&gt;
* Configure Coova Wireless Network. &#039;&#039;Click on Network&#039;&#039;-&amp;gt;&#039;&#039;Wireless&#039;&#039;.&lt;br /&gt;
** Under &#039;&#039;Wireless Configuration&#039;&#039;, ensure &#039;&#039;Wireless Network&#039;&#039; is set to &#039;&#039;Enabled&#039;&#039; and &#039;&#039;Mode&#039;&#039; is set to &#039;&#039;Access Point&#039;&#039;.  Configure Wireless Network to however it suits you. Save changes.&lt;br /&gt;
** For the purposes of testing in this case, Wireless Network is not encrypted, with minimal access configuration (&#039;&#039;ESSID&#039;&#039; - wifibox, &#039;&#039;ESSID Broadcast&#039;&#039; - Show, &#039;&#039;Channel&#039;&#039; - Auto, &#039;&#039;Encryption Type&#039;&#039; - Disabled).&lt;br /&gt;
* Setup coova to act as a Chillispot-type hotspot, with auto-configuration disabled.  (Setup may be tested later on with WifiDog instead of Chillispot).&lt;br /&gt;
** Click on the &#039;&#039;Hotspot&#039;&#039; tab. Under &#039;&#039;HotSpot Configurations&#039;&#039;&lt;br /&gt;
*** Set &#039;&#039;Hotspot type&#039;&#039; to &#039;&#039;ChilliSpot UAM&#039;&#039;&lt;br /&gt;
*** Set &#039;&#039;Hotspot Mode&#039;&#039; to &#039;&#039;Wireless Only&#039;&#039;&lt;br /&gt;
*** Choose if you prefer to &#039;&#039;Deny&#039;&#039; or &#039;&#039;Allow&#039;&#039; &#039;&#039;LAN access&#039;&#039; through the hotspot.&lt;br /&gt;
** Under &#039;&#039;ChilliSpot Configurations&#039;&#039;&lt;br /&gt;
*** Set &#039;&#039;Auto Configuration&#039;&#039; to &#039;&#039;Disabled&#039;&#039;&lt;br /&gt;
*** Fill in &#039;&#039;UAM Hostname&#039;&#039;, &#039;&#039;UAM Secret&#039;&#039;, &#039;&#039;NAS Identifer&#039;&#039; information. Save changes. In this case:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
UAM Hostname   : 192.168.5.1&lt;br /&gt;
UAM Secret     : yoursecret&lt;br /&gt;
NAS Identifier : wifibox&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Click on Access &#039;&#039;Lists&#039;&#039; under the &#039;&#039;HotSpot&#039;&#039; tab.&lt;br /&gt;
*** &#039;&#039;Walled-Garden Hosts&#039;&#039;...&lt;br /&gt;
*** &#039;&#039;Walled-Garden Domains&#039;&#039;... Save Changes.&lt;br /&gt;
** Leave &#039;&#039;Hotspot&#039;&#039;-&amp;gt;&#039;&#039;DHCP&#039;&#039; settings as is.&lt;br /&gt;
** Click on &#039;&#039;RADIUS&#039;&#039; under the &#039;&#039;HotSpot&#039;&#039; tab. Fill in the details under &#039;&#039;RADIUS Configurations&#039;&#039;. In this case: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Primary RADIUS Server   :  192.168.5.1&lt;br /&gt;
Secondary RADIUS Server :  192.168.5.1&lt;br /&gt;
RADIUS Auth Port        :  1812&lt;br /&gt;
RADIUS Acct Port        :  1813&lt;br /&gt;
Shared secret           :  yoursecret&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** For testing in this case, we leave MAC Address Authentication as Disabled.&lt;br /&gt;
** Under the &#039;&#039;Optional RADIUS Configurations&#039;&#039; :&lt;br /&gt;
*** Set &#039;&#039;RADIUS Admin Username&#039;&#039; to phpmyprepaid.&lt;br /&gt;
*** Set &#039;&#039;RADIUS Admin Password&#039;&#039; to a password of your choice.&lt;br /&gt;
*** Leave the rest of the settings in this section as is. Save Changes.&lt;br /&gt;
*** Note that the RADIUS Admin Username and Password and Shared secret settings are to be inserted into FreeRADIUS configuration on Gateway server.&lt;br /&gt;
** Click on &#039;&#039;Advanced&#039;&#039; under the &#039;&#039;HotSpot&#039;&#039; tab. Fill in the details under &#039;&#039;Advanced ChilliSpot Configurations&#039;&#039;. In this scenario: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Internal UAM Port             : 3990&lt;br /&gt;
HotSpot Services Provider     : yourhotspot&lt;br /&gt;
HotSpot Services Provider URL : http://192.168.5.1/cgi-bin/hotspotlogin.cgi&lt;br /&gt;
UAM URL Format                : http://192.168.5.1/cgi-bin/hotspotlogin.cgi (I&#039;m not too sure but this value should not really matter if the full URL has been filled in for the hotspot provider url)&lt;br /&gt;
UAM HomePage (splash page)    : http://10.1.0.1:3990/www/coova.html&lt;br /&gt;
Local Content Directory       : /etc/chilli/www&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Gateway server===&lt;br /&gt;
* Install Ubuntu Server (Hardy), with minimum MySQL, FreeRADIUS, Apache webserver.  DO NOT Install the DNS Server.  This is because I have decided to use dnsmasq instead, as I found it much easier to setup for any user who is not familiar with bind9. Bind9 is the default DNS server that is included with Ubuntu distributions.&lt;br /&gt;
* Install Webmin.  Webmin is a great tool with a web-based frontend to administer many important settings under Linux (Startup/Shutdown Scripts, DNS, DHCP, Firewall, NAT; also supports plugins for other tools).  (an apparently better alternative is ispconfig, but I&#039;ve not tested this tool yet.)&lt;br /&gt;
* Setup up network configuration for both network interfaces. &amp;lt;nowiki&amp;gt; [Todo: Should check out &amp;lt;/nowiki&amp;gt;[http://freshmeat.net/projects/dnsmwbm/ the dnsmasq webmin module.]&amp;lt;nowiki&amp;gt;.]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
** Configure NAT using iptables (can be done using the Webmin interface).&lt;br /&gt;
*** Click on &#039;&#039;Networking -&amp;gt; Linux Firewall&#039;&#039; on the left panel of the Webmin interface.&lt;br /&gt;
*** On the Linux Firewall page, at the top left, there is a list box next to the &#039;&#039;Showing IPtable:&#039;&#039; button.  Click on this list box and ensure &#039;&#039;Network address translation (nat)&#039;&#039; is selected.&lt;br /&gt;
*** Click on &#039;&#039;Showing IPtable:&#039;&#039; The page will reload with NAT iptable configuration.&lt;br /&gt;
*** Under the section &#039;&#039;Packets after routing (POSTROUTING)&#039;&#039;, click on the &#039;&#039;Add Rule&#039;&#039; button.  The page reloads with the Add Rule page.&lt;br /&gt;
*** In the &#039;&#039;Chain and action details&#039;&#039; section, you may fill the &#039;&#039;Rule comment&#039;&#039; section with a description of your choice (e.g., Internet access for intranet).  Choose &#039;&#039;Masquerade&#039;&#039; option in the &#039;&#039;Action to take&#039;&#039; field.  Leave other fields as is.&lt;br /&gt;
*** In the &#039;&#039;Condition details&#039;&#039;, select outgoing interface to the external interface (&#039;&#039;eth0&#039;&#039; for the purpose of this document.)  Leave other details as is.&lt;br /&gt;
*** Click &#039;the &#039;Create&#039;&#039; button.&lt;br /&gt;
*** This page will reload the general Linux Firewall page.  You should see a rule under  the postrouting section to the following effect: &amp;lt;pre&amp;gt;Action: Masquerade;                        Condition:If output interface is eth0&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Click on &#039;&#039;Apply Configuration&#039;&#039;.&lt;br /&gt;
*** Next to the &#039;&#039;Activate at boot&#039;&#039; button, select the &#039;&#039;Yes&#039;&#039; option. Then click &#039;Activate at boot&#039;&#039;.&lt;br /&gt;
** Enable IP forwarding. (In this case we are using IPv4. For IPv6, replace &amp;quot;ipv4&amp;quot; in all the settings below with &amp;quot;ipv6&amp;quot;.&lt;br /&gt;
*** Open terminal and type the following command in terminal: &amp;lt;pre&amp;gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward &amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Open the file &#039;&#039;/etc/sysctl.conf&#039;&#039; with superuser privileges. &amp;lt;pre&amp;gt;sudo nano /etc/sysctl.conf&amp;lt;/pre&amp;gt;  If nano is not installed, you can type &amp;lt;pre&amp;gt;sudo apt-get install nano&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** Look for the the term &#039;&#039;net.ipv4.ip_forward&#039;&#039; in this file.  If it is commented uncomment it. Edit this line as necessary to ensure that it looks like &amp;lt;pre&amp;gt; net.ipv4.ip_forward=1&amp;lt;/pre&amp;gt;&lt;br /&gt;
** Install and setup  &#039;&#039;dnsmasq&#039;&#039; and &#039;&#039;ipmasq&#039;&#039; by typing from terminal&lt;br /&gt;
*** &amp;lt;pre&amp;gt;sudo apt-get install dnsmasq ipmasq&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** &amp;lt;pre&amp;gt;sudo /etc/init.d/dnsmasq restart&amp;lt;/pre&amp;gt;&lt;br /&gt;
*** &amp;lt;pre&amp;gt;dpkg-reconfigure ipmasq&amp;lt;/pre&amp;gt;  This will load a window that requests some configuration steps.  Select Yes to the first screen (recompute firewall).  Select &#039;&#039;OK&#039;&#039; to the second screen.  Select &#039;&#039;After network services have been started&#039;&#039; on the next screen (when should ipmasq be started) and press &#039;&#039;OK&#039;&#039;.  Reboot.&lt;br /&gt;
** Setup FreeRADIUS and MySQL.  Note: I have had a lot of hassle trying to smoothly set up FreeRADIUS.  A lot of issues can be expected during this part of the setup.&lt;br /&gt;
*** Ensure that the FreeRADIUS MySQL plugin is installed: &amp;lt;pre&amp;gt;apt-get install freeradius-mysql&amp;lt;/pre&amp;gt;&lt;br /&gt;
More to follow within the next few days.&lt;br /&gt;
&lt;br /&gt;
==Problems / Errors==&lt;br /&gt;
&lt;br /&gt;
===Coova===&lt;br /&gt;
&lt;br /&gt;
====Spoofed source packets====&lt;br /&gt;
&lt;br /&gt;
* Coova (1.0-beta7): chilli started in debug mode (chilli -fd)&lt;br /&gt;
* When client attempting to access any URL, coova debug message - &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chilli.c: 2566: 0 (Debug) Client MAC=XX-XX-XX-XX-XX-XX assigned IP a.b.c.d&lt;br /&gt;
chilli.c: 2747: 0 (Debug) Received packet with spoofed source!&lt;br /&gt;
chilli.c: 2747: 0 (Debug) Received packet with spoofed source!&lt;br /&gt;
..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Reason: Sometimes if the chilli daemon stops, the connected client A, which up until now had the IP address a.b.c.d, may renew its IP address and receive a new address w.x.y.z from LAN DHCP service (instead of coova-chilli&#039;s DHCP service).  If the chilli daemon is restarted again, it might not renew client A&#039;s IP address to a.b.c.d (or an address in the range of a.b.c.X).  The above debug indicates that the chilli daemon thinks it has assigned the relevant IP address, but is confused when it receives packets with a different IP source.&lt;br /&gt;
* Solution: Stop chilli daemon, release client&#039;s IP address, restart chilli daemon, re-connect client and it should renew its IP address correctly.&lt;br /&gt;
&lt;br /&gt;
====Leaky bucket====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chilli.c: 2939: 0 (Debug) Successful UAM login from username=user123 IP=x.x.x.x&lt;br /&gt;
chilli.c: 2942: 0 (Debug) Received login from UAM&lt;br /&gt;
&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 0, bucketdown: 0, up: 656, down: 0&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 656, bucketdown: 0, up: 0, down: 1500&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 656, bucketdown: 1500, up: 0, down: 1500&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 656, bucketdown: 3000, up: 0, down: 1171&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 656, bucketdown: 4171, up: 66, down: 0&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 722, bucketdown: 4171, up: 66, down: 0&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 788, bucketdown: 4171, up: 66, down: 0&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 854, bucketdown: 4171, up: 698, down: 0&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 1552, bucketdown: 4171, up: 0, down: 52&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 1552, bucketdown: 4223, up: 0, down: 1500&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 1552, bucketdown: 5723, up: 0, down: 1500&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 1552, bucketdown: 7223, up: 0, down: 1500&lt;br /&gt;
chilli.c: 110: 0 (Debug) Leaky bucket timediff: 0, bucketup: 1552, bucketdown: 8723, up: 66, down: 0&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Errors received when coova-chilli running in debug mode&lt;br /&gt;
* Web browsing seems fine, but can this affect binary file downloads? ..Downloaded a 5MB quicktime video, which did not seem affected..&lt;br /&gt;
&lt;br /&gt;
===phpMyPrepaid===&lt;br /&gt;
&lt;br /&gt;
====Monitoring bandwidth usage====&lt;br /&gt;
&lt;br /&gt;
* phpMyPrepaid does not seem to be accurately measuring bandwidth usage. After downloading a 5MB file, phpMyPrepaid reports usage of 0.92 Mo (phpMyPrepaid addresses in octets)...&lt;br /&gt;
* Reason: phpMyPrepaid configuration has the RADIUS Download/Upload database values switched.&lt;br /&gt;
* Solution:  Fix this value in config.inc.php in the include directory of the phpMyPrepaid www folder.&lt;br /&gt;
&lt;br /&gt;
====Unknown attribute &amp;quot;Max-All-Session&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
* When logging in from client using time-based account created using phpMyPrepaid, freeradius server gives the following error and rejects this user:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
radius_xlat:  &#039;SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = &#039;odiznn&#039;           ORDER BY id&#039;&lt;br /&gt;
rlm_sql (sql): Reserving sql socket id: 0&lt;br /&gt;
rlm_sql_mysql: query:  SELECT id, UserName, Attribute, Value, op           FROM radcheck           WHERE Username = &#039;odiznn&#039;           ORDER BY id&lt;br /&gt;
rlm_sql: Failed to create the pair: Unknown attribute &amp;quot;Max-All-Session&amp;quot;&lt;br /&gt;
rlm_sql (sql): Error getting data from database&lt;br /&gt;
rlm_sql (sql): SQL query error; rejecting user&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Only seems to happen with this type of account..&lt;br /&gt;
* Reason: Attribute &#039;&#039;Max-All-Session&#039;&#039; needs to defined an sql module in radiusd.conf (the freeradius configuration file).&lt;br /&gt;
* Solution: See [http://wiki.freeradius.org/Rlm_sqlcounter http://wiki.freeradius.org/Rlm_sqlcounter].  Add the sql module as described on this page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Installation Problems: PHP not executing====&lt;br /&gt;
&lt;br /&gt;
phpMyPrepaid uses shorthand PHP tags: &amp;lt;? instead of &amp;lt;?php. Shorthand open tags need to be enabled in the php.ini file (/etc/php5/apache2/php.ini on Ubuntu).&lt;br /&gt;
&lt;br /&gt;
=Review on tools/ingredients tested=&lt;br /&gt;
&lt;br /&gt;
* daloRadius&lt;br /&gt;
** Very nice css-interface, and neat layout.&lt;br /&gt;
** Easy to setup.&lt;br /&gt;
** User is expected to have an understanding of basic FreeRADIUS-related attributes, in order to create user accounts, etc.&lt;br /&gt;
** Since the users of this are expected to be non-technical, phpMyPrepaid is considered to be a better option in this regard.&lt;br /&gt;
&lt;br /&gt;
* phpMyPrepaid&lt;br /&gt;
** Not an aesthetic interface.  Needs skinning.&lt;br /&gt;
** A bit more complicated to setup, compared to daloRadius.&lt;br /&gt;
** More inituitive to the non-technical user, compared to daloRadius.&lt;br /&gt;
** Though setup is complicated, this can be rectified having phpMyPrepaid pre-installed. Skinning can also be resolved.&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3726</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3726"/>
		<updated>2008-07-23T10:58:33Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Task Breakdown */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px|Icon sources: http://villagetelco.org/, http://www.ubnt.com/products/ns2.php]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all nodes can be configured &lt;br /&gt;
** prepaid vouchers can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Determine appropriate tools for QoS [starting point: Zeroshell]&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3725</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3725"/>
		<updated>2008-07-23T10:20:39Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px|Icon sources: http://villagetelco.org/, http://www.ubnt.com/products/ns2.php]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all nodes can be configured &lt;br /&gt;
** prepaid vouchers can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3724</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3724"/>
		<updated>2008-07-23T10:20:21Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px|Icon sources:http://villagetelco.org/, http://www.ubnt.com/products/ns2.php]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all nodes can be configured &lt;br /&gt;
** prepaid vouchers can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3720</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3720"/>
		<updated>2008-07-23T09:11:01Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3719</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3719"/>
		<updated>2008-07-23T09:10:36Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
** A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
*** the node&#039;s IP and MAC addresses &lt;br /&gt;
*** the node&#039;s current status (simple up or down) &lt;br /&gt;
*** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
*** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
** Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
*** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
*** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
** Ability to test network throughput, either through:&lt;br /&gt;
*** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
*** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3718</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3718"/>
		<updated>2008-07-23T08:01:06Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3717</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3717"/>
		<updated>2008-07-23T08:00:40Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3716</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3716"/>
		<updated>2008-07-23T08:00:10Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:Wisp in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3715</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3715"/>
		<updated>2008-07-23T07:59:43Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;br /&gt;
&lt;br /&gt;
[[Category:Wisp-in-a-box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3714</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3714"/>
		<updated>2008-07-23T07:58:44Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3713</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3713"/>
		<updated>2008-07-23T07:58:20Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3712</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3712"/>
		<updated>2008-07-23T07:58:08Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3711</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3711"/>
		<updated>2008-07-23T07:57:53Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3710</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3710"/>
		<updated>2008-07-23T07:57:38Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Grafic-telco_(Modified).png|thumb|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Grafic-telco_(Modified).png&amp;diff=3709</id>
		<title>File:Grafic-telco (Modified).png</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Grafic-telco_(Modified).png&amp;diff=3709"/>
		<updated>2008-07-23T07:55:41Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Grafic_(Modified).png&amp;diff=3708</id>
		<title>File:Grafic (Modified).png</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Grafic_(Modified).png&amp;diff=3708"/>
		<updated>2008-07-23T07:55:17Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3707</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3707"/>
		<updated>2008-07-23T07:51:34Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
&lt;br /&gt;
The basic setup looks like the digram to the right. For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system.&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3706</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3706"/>
		<updated>2008-07-23T07:50:24Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Our Approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup looks like this:&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system. So the setup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3705</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3705"/>
		<updated>2008-07-23T07:49:02Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document remains very much a draft, but is the evolving specification for the WISP-in-a-box project&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, upstream connection QoS software, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access&lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server&lt;br /&gt;
** run intra-mesh QoS software&lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup looks like this:&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, that can reside on top of the base WISP-in-a-box system. So the setup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Dashboard Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh-Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin&lt;br /&gt;
** This will not only allow us to configure the server, but also execute arbitrary commands on all the mesh nodes using Webmin&#039;s cluster functionality. We will strip down a version of Webmin to run on the client nodes and use Webmin&#039;s cluster modules on the server to communicate with them.&lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
** We need to also design in some way of dumping the user usage data that FreeRADIUS stores so that Michael Jenkins can do usage studies on it. The local user needs to be able to easily dump this data and send it back to the CSIR for study.&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
** how many hops and/or what route the node currently has to the gateway&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Backbone Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** Other features? Open to discussion.&lt;br /&gt;
* QoS Network Configuration – new custom dashboard component for adjusting QoS settings both:&lt;br /&gt;
** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
* AP-only node configuration – new custom dashboard component that configures node that are only AP&#039;s, not part of the mesh. Configures:&lt;br /&gt;
** SSID of AP&lt;br /&gt;
** Channel of AP&lt;br /&gt;
** Any kind of WPA authentication a user might want to run on the AP&lt;br /&gt;
&lt;br /&gt;
Possible other voice-related modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here, however borrowing from Zeroshell it may be possible to simply use netfilter/iptables &amp;amp; l7-filter. Using an existing tool here would be very nice, as this is a complex task.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard.&lt;br /&gt;
* Stripped-down Webmin server component so we can run remote Webmin commands on the node through the server&#039;s Webmin installation.&lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. It would be useful if the interface could be designed such that it would run on any device regardless of that device&#039;s platform. This may be easy to do with existing abstractions in OpenWRT, but an alternative method would be for this interface to change the configuration of the local node via the update API, which is guaranteed to be fully abstracted, and let the update client for that device take care of making the actual changes.&lt;br /&gt;
&lt;br /&gt;
=== AP-only Nodes ===&lt;br /&gt;
The mesh nodes will use their radios exclusively for the mesh backhaul. Clients can be attached directly to the Ethernet ports of these nodes, however it may be useful to have wireless client access as well. In this case, a second device can be attached to the mesh node to act as an access point. These devices can also be Linksys WRTs or similar. They will be bridged to the DHCP server of the captive portal running on the mesh node, and so need no special functionality.&lt;br /&gt;
&lt;br /&gt;
* If central configuration isn&#039;t desirable then any device that can operate as a pure AP without a DHCP server will do (the Linksys stock firmware, for instance).&lt;br /&gt;
* If configuration via the dashboard is desired, then the nodes will run OpenWRT and a barebones dashboard client that allows for configuration of the AP&#039;s SSID, etc.&lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is as follows (refer to above for details on what individual software piece entail):&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
## Further examination of ROBIN to see which parts of it can be modified for our purposes&lt;br /&gt;
## Adaptation of Webmin&#039;s cluster tools for use on the mesh&lt;br /&gt;
## Update API design &amp;amp; specification&lt;br /&gt;
## Dashboard framework design and implementation&lt;br /&gt;
## Mesh update client framework design and implementation&lt;br /&gt;
## Dashboard module implementation&lt;br /&gt;
### Network Monitoring&lt;br /&gt;
### Network Configuration – basics (Channel, SSID, etc)&lt;br /&gt;
### Network Configuration – QoS settings&lt;br /&gt;
### Network Configuration – AP-only settings&lt;br /&gt;
### Adapt phpMyPrepaid&#039;s CoovaChilli configuration to send out updates via standardized API rather than only changing local configuration file.&lt;br /&gt;
## Co-development with dashboard modules: mesh client update modules for each dashboard component, designed initially for the WRT but as portable as possible (for most modules portability should be trivial, as the software on the node the update client is configuring will be the same).&lt;br /&gt;
## CSS skinning for all dashboard components (including pre-existing ones such as Webmin and phpMyPrepaid).&lt;br /&gt;
&lt;br /&gt;
Notes: These need to be done relatively sequentially, however once the dashboard and mesh client frameworks are in place different modules can be developed in parallel.&lt;br /&gt;
&lt;br /&gt;
# Minimal interface development for starter devices (at least the WRT, Mesh Potato, and Ubiquity nodes): Inveneo&lt;br /&gt;
# Porting of mesh client to Ubiquity and Mesh Potato (most modules should be identical, but basic network configuration settings may be device-specific): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3703</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3703"/>
		<updated>2008-07-17T12:19:05Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:Wisp-network-diagram.png|300px|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup is diagrammed to the right.&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Village-telco-wisp-diagram.png|300px|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3702</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3702"/>
		<updated>2008-07-17T12:18:49Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:Wisp-network-diagram.png|350px|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup is diagrammed to the right.&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Village-telco-wisp-diagram.png|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3701</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3701"/>
		<updated>2008-07-17T12:18:38Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:Wisp-network-diagram.png|200px|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup is diagrammed to the right.&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Village-telco-wisp-diagram.png|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3700</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3700"/>
		<updated>2008-07-17T12:16:07Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:Wisp-network-diagram.png|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup looks like this:&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Village-telco-wisp-diagram.png|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3699</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3699"/>
		<updated>2008-07-17T12:15:33Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Component Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup looks like this:&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Village-telco-wisp-diagram.png|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Village-telco-wisp-diagram.png&amp;diff=3698</id>
		<title>File:Village-telco-wisp-diagram.png</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Village-telco-wisp-diagram.png&amp;diff=3698"/>
		<updated>2008-07-17T12:14:53Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Wisp-network-diagram.png&amp;diff=3697</id>
		<title>File:Wisp-network-diagram.png</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Wisp-network-diagram.png&amp;diff=3697"/>
		<updated>2008-07-17T12:14:03Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3696</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3696"/>
		<updated>2008-07-17T12:11:44Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
* A central dashboard, running on the gateway server, from which: &lt;br /&gt;
** the network can be monitored and all node can be configured &lt;br /&gt;
** pre-paid vouches can be administered &lt;br /&gt;
** software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
** all functionality will work without upstream Internet access &lt;br /&gt;
* Mesh nodes which: &lt;br /&gt;
** receive configuration updates from the central dashboard &lt;br /&gt;
** run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
** route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Component Diagram ===&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 1: WISP-in-a-box basic components&#039;&#039;]]The basic setup looks like this:&lt;br /&gt;
&lt;br /&gt;
For the Village Telco project, many components are the same. There is some additional functionality that&#039;s desired, however, so the steup might look more like:&lt;br /&gt;
&lt;br /&gt;
[[Image:|thumb|&#039;&#039;Illustration 2: Village Telco network, built on top of WISP-in-a-box mesh&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
This document is going to mainly focus on specifying the needs of the mesh &amp;amp; networking side of things, with an eye towards exactly how voice-related services will be integrated (but not an elaborate discussion of the technologies themselves).&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Other tools to borrow from include Zeroshell for network QoS configuration. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
*** Change QoS settings both:&lt;br /&gt;
**** On the server, for outgoing traffic going to the upstream connection&lt;br /&gt;
**** On the various nodes in the mesh, for intra-mesh network bandwidth management.&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style, with the potential for branding built in.&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal&lt;br /&gt;
* Intra-mesh QoS software, configurable from the dashboard. Uncertain as to what tools exactly to use here.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3695</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3695"/>
		<updated>2008-07-17T11:48:02Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Single-configuration of Mesh Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system. See below for a discussion of how &lt;br /&gt;
&lt;br /&gt;
* Alternatively, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuration files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update:&#039;&#039;&#039; The need to support configuration changes across multiple devices (e.g. Ubiquity Nanostations and Mesh Potatoes) makes the flashing system untenable. Rather, sending out update messages that are received by a client running on the mesh node seems to be a better option. This is basically how ROBIN works. See below.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3694</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3694"/>
		<updated>2008-07-17T11:29:36Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Positioning of the billing system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update 2&#039;&#039;&#039;: We will write a CoovaChilli configuration page as a component of our dashboard. It&#039;s configuration will be pushed out to all nodes just like the standard network configuration. One remaining open question: the access controller (i.e. CoovaChilli) may need to monitor traffic going inside the mesh. As long as the destination is not behind the same CoovaChilli instance as the original host then this is no problem. But if they are both behind the same CoovaChilli instance (i.e. connected to the same mesh node), it may be more difficult. Doable, but it may take some configuration, I&#039;m just not sure. This also brings up the question of how two end hosts on the network can communicate if they&#039;re both behind separate NAT&#039;s (in the form of CoovaChilli DHCP servers). Probably some kind of coordination via the server will be necessary to rendezvous (this is how Skype works), but it may limit the services we can offer.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* There has been the suggestion of simply designing our own web interface that directly modifies the config files of every node. I am a little concerned about how robust and modular this solution would be. If we want to change a component, we need to redesign the web interface, and if a component&#039;s config file changes (say, between versions, and we want to upgrade to get some new feature or patch a security hole) then the web interface could potentially break. Furthermore, the task of this is a bit tedious, although certainly not impossible. In sticking with the design goal of reusing existing tools (not reinventing the wheel), I think we may be better off with a solution that doesn&#039;t require us to develop as heavily for a specific task like this unless we absolutely need to.&lt;br /&gt;
&lt;br /&gt;
* Alternatively, Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system (which they must have, but I&#039;m unfamiliar with). &lt;br /&gt;
&lt;br /&gt;
* Lastly, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuation files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3693</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3693"/>
		<updated>2008-07-17T07:51:19Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* How ROBIN updates work, what we can reuse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* There has been the suggestion of simply designing our own web interface that directly modifies the config files of every node. I am a little concerned about how robust and modular this solution would be. If we want to change a component, we need to redesign the web interface, and if a component&#039;s config file changes (say, between versions, and we want to upgrade to get some new feature or patch a security hole) then the web interface could potentially break. Furthermore, the task of this is a bit tedious, although certainly not impossible. In sticking with the design goal of reusing existing tools (not reinventing the wheel), I think we may be better off with a solution that doesn&#039;t require us to develop as heavily for a specific task like this unless we absolutely need to.&lt;br /&gt;
&lt;br /&gt;
* Alternatively, Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system (which they must have, but I&#039;m unfamiliar with). &lt;br /&gt;
&lt;br /&gt;
* Lastly, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuation files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires (in the form of a URI parameter sent to a PHP script), and in return receives an update file (that same PHP script returns the update file, so for the client all it needs to do is call `wget dashboard.com?information-the-dashboard-wants` and it receives an update file). This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman for /etc/config/batman, update-mesh for /etc/config/mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them themselves, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3682</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3682"/>
		<updated>2008-07-15T12:26:11Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* Other thoughts &amp;amp; issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues: Past Concerns, Future Considerations==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* There has been the suggestion of simply designing our own web interface that directly modifies the config files of every node. I am a little concerned about how robust and modular this solution would be. If we want to change a component, we need to redesign the web interface, and if a component&#039;s config file changes (say, between versions, and we want to upgrade to get some new feature or patch a security hole) then the web interface could potentially break. Furthermore, the task of this is a bit tedious, although certainly not impossible. In sticking with the design goal of reusing existing tools (not reinventing the wheel), I think we may be better off with a solution that doesn&#039;t require us to develop as heavily for a specific task like this unless we absolutely need to.&lt;br /&gt;
&lt;br /&gt;
* Alternatively, Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system (which they must have, but I&#039;m unfamiliar with). &lt;br /&gt;
&lt;br /&gt;
* Lastly, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuation files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires, and in return receives an update file. This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman, update-mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3681</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3681"/>
		<updated>2008-07-15T12:08:10Z</updated>

		<summary type="html">&lt;p&gt;Tom: /* How ROBIN updates work, what we can reuse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* There has been the suggestion of simply designing our own web interface that directly modifies the config files of every node. I am a little concerned about how robust and modular this solution would be. If we want to change a component, we need to redesign the web interface, and if a component&#039;s config file changes (say, between versions, and we want to upgrade to get some new feature or patch a security hole) then the web interface could potentially break. Furthermore, the task of this is a bit tedious, although certainly not impossible. In sticking with the design goal of reusing existing tools (not reinventing the wheel), I think we may be better off with a solution that doesn&#039;t require us to develop as heavily for a specific task like this unless we absolutely need to.&lt;br /&gt;
&lt;br /&gt;
* Alternatively, Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system (which they must have, but I&#039;m unfamiliar with). &lt;br /&gt;
&lt;br /&gt;
* Lastly, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuation files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires, and in return receives an update file. This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section (e.g. update-batman, update-mesh, etc). These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
Many other pieces of ROBIN are other software components (e.g. BATMAN, CoovaChilli) that we would want to install separately and have run independently anyway. We still want to be able to configure them, which ROBIN does through the above-mentioned system of update-* scripts. We aren&#039;t particularly interested in them, however, because we assume that they will be installed already on a system that we&#039;re writing the client for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3680</id>
		<title>Tom&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Tom%27s_research&amp;diff=3680"/>
		<updated>2008-07-15T11:26:43Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a brief document outlining current thinking on the WISP-in-a-box project that I (Tom) have been working on. It is meant to eventually be merged into the rest of the WISPiab articles, but for the time being it&#039;s here so new thinking can be easily seen and commented upon.&lt;br /&gt;
&lt;br /&gt;
==Use Cases==&lt;br /&gt;
&lt;br /&gt;
Our basic mesh setup consists of mesh nodes that provide a wireless backhaul to a central server and gateway and end-user access in the form of ethernet connections to the mesh node. We aren&#039;t explicitly concerned with running access points; if that functionality is desired then separate devices will need to be attached to the mesh nodes to act as wireless bridges. Each mesh node will have its own captive portal, supporting multiple clients, and communicate with a central AAA server.&lt;br /&gt;
&lt;br /&gt;
==Design Goals==&lt;br /&gt;
&lt;br /&gt;
The mantra here is reusing existing solutions on low-cost hardware. We don&#039;t want to reinvent the wheel, and we need to do everything as cheaply as possible. The cost decisions mainly influence [hardware choice]. The goal of software reuse means we want to do as little development in-house as possible, instead relying on synthesizing a single product from various existing components. At the end of the day we may need to do some of our own development, but the decisions I&#039;m suggesting in this document are made with the intent of minimizing that kind of work.&lt;br /&gt;
&lt;br /&gt;
==Hardware Choice==&lt;br /&gt;
&lt;br /&gt;
The platform for the mesh nodes will be the Linksys WRT. On the basis of cost and availability, there&#039;s really no better platform. These needs trump the technical ones that the Broadcom chipsets fail to meet. There are some consequences of this choice, however, in terms of what software can be run on the mesh nodes. More on this in later section on the mesh software.&lt;br /&gt;
&lt;br /&gt;
==Network Component Layout==&lt;br /&gt;
&lt;br /&gt;
See [[WISP-in-a-box Way Forward]]&lt;br /&gt;
&lt;br /&gt;
==Other thoughts &amp;amp; issues==&lt;br /&gt;
&lt;br /&gt;
====Positioning of the billing system====&lt;br /&gt;
&lt;br /&gt;
There is some question as to where the captive portal should sit. We&#039;ve thus far assumed it would reside on the nodes themselves, in the form of CoovaAP. CoovaAP is no good for this purpose, however, because in order for it to run a captive portal it automatically takes over the wireless interface to run as an access point (so it can&#039;t be used for the mesh backhaul). Just using the CoovaChilli component, however, and swapping around it&#039;s normal outgoing / incoming interfaces, might work. The idea would be to run BATMAN on the wireless interface, tell CoovaChilli that the wireless interface is its outgoing interface, and then somehow bridge the LAN ports together and run a DHCP server only on them, not on the wireless. This seems easy enough, but as far as I can tell has never really been done, so this is a good point for experimentation.&lt;br /&gt;
&lt;br /&gt;
An alternate strategy would be to have the captive portal reside on the server/gateway. This wouldn&#039;t allow for control of traffic inside the mesh, but that&#039;s probably all right (local traffic isn&#039;t what&#039;s going to be billed). This has the distinct advantage of only having *one* instance in the entire network, so configuration changes made to it don&#039;t need to be pushed out to all mesh nodes. The problem with this method is that it needs to be implemented at Layer 3, because clients won&#039;t be on the same Ethernet segment as the captive portal (they&#039;ll be multiple wireless hops away). CoovaChilli is a Layer 2 captive portal solution, and furthermore it *needs* to be the DHCP server for its clients (there may be ways to hack it to not require this, but at least in its stock form). Layer 3 captive portals exist, and this may be worth looking into as well. If we can find one that works with RADIUS, we can just plug it in to our existing FreeRADIUS / phpMyPrepaid billing architecture.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Update&#039;&#039;&#039;: I&#039;ve gotten CoovaChilli running on a WRT running Kamikaze, configured such that the wireless is used as the default gateway (right now its in client mode tied to another AP, but could be used in ad-hoc mode for a mesh too) and the LAN hands out DHCP leases. Radius configuration is a bit tedious, so it&#039;s not quite functioning fully yet, but it seems to work no problem. This is a good thing, because it means we can run just CoovaChilli on all the mesh nodes without it affecting the wireless interface, and alongside any other software that runs on Kamikaze. There is one open problem here, however: CoovaChilli itself doesn&#039;t come with a web interface. It&#039;s interface is built in to the rest of the interface for the CoovaAP firmware. There are a few possibilities to handle this (write our own interface, rip the existing one out of the CoovaAP firmware) but none are totally desirable.&lt;br /&gt;
&lt;br /&gt;
====Single-configuration of Mesh Nodes====&lt;br /&gt;
&lt;br /&gt;
One of the major goals of this project is to have a single interface from which we can make changes to all of the mesh nodes. There are several approaches to this that I can see:&lt;br /&gt;
&lt;br /&gt;
* There has been the suggestion of simply designing our own web interface that directly modifies the config files of every node. I am a little concerned about how robust and modular this solution would be. If we want to change a component, we need to redesign the web interface, and if a component&#039;s config file changes (say, between versions, and we want to upgrade to get some new feature or patch a security hole) then the web interface could potentially break. Furthermore, the task of this is a bit tedious, although certainly not impossible. In sticking with the design goal of reusing existing tools (not reinventing the wheel), I think we may be better off with a solution that doesn&#039;t require us to develop as heavily for a specific task like this unless we absolutely need to.&lt;br /&gt;
&lt;br /&gt;
* Alternatively, Orangemesh provides this functionality through ROBIN, but for the reasons mentioned above it doesn&#039;t really suit our purposes. We could try to modify it or otherwise use their update system (which they must have, but I&#039;m unfamiliar with). &lt;br /&gt;
&lt;br /&gt;
* Lastly, I have a nascent idea that rather than updating the mesh nodes by simply modifying their configuation files, we could design a small utility that would run on the mesh node connected to the server. This mesh node would have everything we needed on it (e.g. OpenWRT, BATMAN, possibly CoovaChilli, etc.). After it was satisfactorily configured, using existing interfaces hopefully, this utility would essentially make an image of the entire node, and then upload this image to every other node in turn using private-key based SSH file transfers. Each node, upon receiving such an image, would write it to disk and reboot. This is certainly a little slower than directly modifying configuration files, but I think it has the possibility to be a simpler, more robust, and much more modular solution (one could even add whole packages or so to the master node and then have those changes propagate throughout the network). The feasibility of this approach isn&#039;t certain, but I think its worth further investigation.&lt;br /&gt;
&lt;br /&gt;
=====How a flash-based configuration solution might work=====&lt;br /&gt;
&lt;br /&gt;
A discussion with David Johnson made it seem like this is possible. Some specifics: The master node (node connected to server) gets configured. Once it looks good, the flash distribution utility is run. It commits all changes and writes an image file based on the master node&#039;s disk. The master node then goes through the list of every node it knows about (i.e. the rest of the mesh) and using a private SSH key initiates a script on each of those nodes. That script goes and fetches the image from the master node. When it gets it, it does some basic sanity checks (checksum, etc.) on the image, then sends a message to the master node saying it&#039;s ready. When the master node has gotten a message from every node in its list saying that that node is ready it sends out another command, telling each node to execute the change. If it doesn&#039;t get a message from every node, it informs the user which ones are missing, indicating some human intervention is needed at those nodes. Every node, upon receiving the execute command, waits twice the maximum transmission time or so, then writes the change to disc and reboots. Furthermore (and this is borrowed from the FreeBSD guys) it keeps the old image around (it should have enough RAM to do so) and upon reboot has a watchdog timer running. If it can&#039;t find the mesh after a few minutes, it will revert to the old image and reboot again. This is probably the trickiest part, but the entire system seems fairly simple. It&#039;ll take a little while for the entire process to go through, but many configuration changes can be lumped into one update, so for normal operation this should be fine. A further feature that was discussed is the possibility of all nodes, at some set time (say midnight each night), switching to a certain &amp;quot;update&amp;quot; SSID and channel and checking the master node for a more recent firmware version than what it currently has. Most nodes will be running the current firmware and immediately switch back to their normal SSID and channel, resulting in little downtime. And &amp;quot;lost&amp;quot; nodes, however, will download the correct firmware, thereby &amp;quot;rejoining the herd&amp;quot; so to speak.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How ROBIN updates work, what we can reuse====&lt;br /&gt;
&lt;br /&gt;
ROBIN nodes periodically (via cron) run a script that contacts the dashboard (in ROBIN parlance, &amp;quot;update server&amp;quot;) and sends it all of the information the dashboard requires, and in return receives an update file. This update file is comprised of sections, each corresponding to a configuration file. The /sbin/update script sends and receives this information, writes a cleaned version of it to file, and then calls /etc/init.d/settings, which expects the file to be there already, parses it by splitting it up into its various sections, and calls a different update script for each section. These scripts are in /usr/sbin/.&lt;br /&gt;
&lt;br /&gt;
This aspect of ROBIN we might be able to make use of, if we wanted to take these scripts and adapt them slightly. The system is somewhat modular in that only config sections that get sent out in updates and written to config files, which is good for us. The format of the configuration updates is extremely simple, which is good as well. ROBIN seems to have a lot of other, yet-unexplored (by me) aspects, however. I don&#039;t yet know how crucial they are for the system to function, but compared to a basic OpenWRT Kamikaze install there are quite a few files specific to ROBIN spread out over the system. This is very bad for portability; we want to make it easy to implement clients for use on various hardware platforms (even initially we need to support 3: Linksys WRT, Ubiquity NanoStation and the yet-to-be-designed Mesh Potato). This would suggest we should have a simple, single program or script that handles all interaction with the dashboard and configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WISP in a box]]&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3679</id>
		<title>WISP-in-a-box Way Forward</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=WISP-in-a-box_Way_Forward&amp;diff=3679"/>
		<updated>2008-07-15T08:55:13Z</updated>

		<summary type="html">&lt;p&gt;Tom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a draft of the spec for the WISP-in-a-box development. It is fairly up-to-date but may not be the latest version.&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
[[Image:Grafic.png|thumb|300px|Diagram of Network Components]]&lt;br /&gt;
The entire WISP-in-a-box system consists of: &lt;br /&gt;
&lt;br /&gt;
A central dashboard, running on the gateway server, from which: &lt;br /&gt;
* the network can be monitored and all node can be configured &lt;br /&gt;
* pre-paid vouches can be administered &lt;br /&gt;
* software running on the server (web &amp;amp; mail services, etc) can be administered &lt;br /&gt;
* all functionality will work without upstream Internet access &lt;br /&gt;
Mesh nodes which: &lt;br /&gt;
* receive configuration updates from the central dashboard &lt;br /&gt;
* run a captive portal that interacts with clients and authenticates against the gateway server &lt;br /&gt;
* route themselves intelligently using BATMAN&lt;br /&gt;
&lt;br /&gt;
=== Dashboard &amp;amp; Server ===&lt;br /&gt;
==== Existing Projects ====&lt;br /&gt;
The OrangeMesh and Open-Mesh dashboards provide almost exactly the functionality we require. However, they have a number of problems: &lt;br /&gt;
&lt;br /&gt;
* Both dashboards require the nodes to be running ROBIN firmware to receive configuration updates. ROBIN, as it is now, only runs on Atheros-based devices, not Broadcom devices (like the Linksys WRT). Some semi-serious hacking will be required to add support for Broadcom devices into ROBIN, since right now it assumes the use of the Atheros-only MadWifi drivers.&lt;br /&gt;
* With an eye towards localization &amp;amp; modularity, the OrangeMesh sources aren&#039;t quite what we&#039;d like them to be.&lt;br /&gt;
&lt;br /&gt;
Because of these limitations, we may not want to use the OrangeMesh/Open-Mesh dashboard. We still want to imitate the same basic style of system, however, while adding some functionality to meet the additional needs of our dashboard (e.g. ability to administer vouchers and server services, things that the OrangeMesh/Open-Mesh dashboards don&#039;t cover).&lt;br /&gt;
&lt;br /&gt;
==== Our Approach ====&lt;br /&gt;
We will start essentially from scratch on the dashboard, with the OrangeMesh dashboard as an example to work off of and borrow heavily from.&lt;br /&gt;
&lt;br /&gt;
The dashboard we will design will be highly modular, with a high-level menu in which the user can select a module to work with. A module might be an existing software component or a new one we&#039;ve written. In the case of Network Status and Network Configuration, we can use the Orangemesh/Openmesh/ROBIN setup as a reference, and where appropriate can adapt their code to suit our needs. Essential modules include:&lt;br /&gt;
&lt;br /&gt;
* Server Administration -- brings up Webmin &lt;br /&gt;
* Vouchers -- brings up phpMyPrepaid, our data billing control system&lt;br /&gt;
** phpMyPrepaid additionally controls the CoovaChilli instances running on all routers, including the ability to restrict or permit free access to the rest of the mesh network&lt;br /&gt;
* Network Status -- new custom dashboard component with following features:&lt;br /&gt;
&lt;br /&gt;
* A semi-detailed list of all the nodes in the mesh, including: &lt;br /&gt;
** the node&#039;s IP and MAC addresses &lt;br /&gt;
** the node&#039;s current status (simple up or down) &lt;br /&gt;
** when they were last heard from (when an update from that node was last received)&lt;br /&gt;
* Basic network usage statistics, data taken from RADIUS:&lt;br /&gt;
** Total bandwidth going out of the gateway in the last X amount of time&lt;br /&gt;
** Heaviest users of the network to monitor abuse (further information on individual users is available already in phpMyPrepaid)&lt;br /&gt;
* Ability to test network throughput, either through:&lt;br /&gt;
** Simple interface to run iperf between any two nodes, or:&lt;br /&gt;
** Visual display of metrics &amp;amp; signal strengths of every link, data reported from clients&#039; BATMAN daemons and network tools&lt;br /&gt;
&lt;br /&gt;
* Network Configuration -- new custom dashboard component with following features (note this is designed to be minimal for ease of use):&lt;br /&gt;
** Change SSID of mesh backhaul&lt;br /&gt;
** Change channel of mesh backhaul&lt;br /&gt;
** “Advanced” features:&lt;br /&gt;
*** push command to all nodes via SSH&lt;br /&gt;
** Other features? Open to discussion. Potentially:&lt;br /&gt;
*** Change basic firewall features of each node (particularly, can clients access each others&#039; computers when connected to the same CoovaChilli instance)&lt;br /&gt;
&lt;br /&gt;
Possible other modules include Asterisk and A2billing pages.&lt;br /&gt;
&lt;br /&gt;
The dashboard will send out all configuration updates using a standardized API; any mesh node in the network will have to run a client implementing this API that receives configuration messages from the dashboard and makes the necessary changes to files on its system. The API will be just as modular as the dashboard, so if a user wants to only implement certain features (say, add billing to an existing network) she would only need to implement a client for the platform her nodes are running (or, ideally, there will already be a client for that platform). Through the dashboard the user could then disable the unwanted modules. The dashboard will only send out updates for the components that are enabled, and the client will only modify configuration files for the components it receives. &lt;br /&gt;
&lt;br /&gt;
All of the components of the larger dashboard will be skinned in a unified CSS style. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[basic mockup of web interface]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mesh Nodes ===&lt;br /&gt;
The mesh nodes themselves will run OpenWRT. Node software includes:&lt;br /&gt;
&lt;br /&gt;
* Batman for routing&lt;br /&gt;
* CoovaChilli as a local captive portal.&lt;br /&gt;
* A client daemon modeled on the ROBIN scripts that receives updates from the dashboard and sends any necessary information back to the dashboard. The client daemon will have to be co-developed with the dashboard. &lt;br /&gt;
* In addition to configuration through the dashboard, we will include a minimal web interface for configuring each individual node. This interface will run on the nodes, and can be a stripped-down version of X-WRT&#039;s webif^2 or FFLuCI. &lt;br /&gt;
&lt;br /&gt;
=== Task Breakdown ===&lt;br /&gt;
Once the specification is agreed upon work can begin. At that time further task breakdowns may be useful, but at a high level the expectation currently is:&lt;br /&gt;
&lt;br /&gt;
# Dashboard &amp;amp; first client development: Meraka&lt;br /&gt;
# Minimal interface development: Inveneo&lt;br /&gt;
# Potential further client development for other systems (such as those used in Village Telco): Inveneo&lt;/div&gt;</summary>
		<author><name>Tom</name></author>
	</entry>
</feed>