Down to the wire: Byzantium Development Sprint (September Edition)

04 October 2011

Friday evening the Byzantium development team met once again at HacDC to determine where all of us are in the engineering and development process and figure out what we have to do before we can put the alpha release online and announce open testing. Ben the Pyrate has been hard at work setting up the infrastructure and is constructing an automated build environment for the Porteus project (whose distro we're basing Byzantium on), and which we can leverage to make it easier to compile Byzantium Linux into a bootable .iso image. Right now the installation process is entirely manual, which is fine for testing and debugging but unsuitable for more than that. I've been busy working on the web control panel which will make it easy as well as fast for someone booting a mesh node up to get everything configured and running without needing a lot of knowledge about Linux.

The tricky thing about mesh networking (with any protocol we've tested) lies in making sure that each node is set up properly. During testing we ran into such frustrations as forgetting to put the wireless interface into ad-hoc mode (D'oh!), the cell ID not matching the rest of those in the mesh, and configuring the initial states of routing tables on the nodes correctly. The development sprint on Friday and Saturday was dedicated to identifying these problems, developing solutions, documenting them for future reference and repeatability, and assigning people to development tasks. We were joined on Friday night by a number of new people who are interested in the project and offered various forms of support, which we accepted gratefully. We even gained a few developers.

Now, on to the nitty-gritty.

IP routing, like antenna theory, seems as if it'll drive you utterly batty until you lose a certain amount of sanity and then you either give up in disgust or you suddenly understand it in a flash of insight that forever affects your psyche. It seems safe to say that none of us have reached that level of inspiration yet but we have gotten enough of a grasp on it to document the process to get everything running. When setting up a node, you of course have to configure the wireless interface for a certain ESSID and channel, and then put an IP address on it. This isn't a big deal. However, what it does mean is that the wireless interface as it stands at that time can only be used for routing traffic; clients (like cellphones or other laptops) can't associate with it. To do this, you have to add an IP alias, which as far as we're concerned means adding a virtual wireless card to the node that the clients associate with. This is trivial, and all of the magick happens in the kernel with no further intervention. So, if the wi-fi interface wlan0 is given the IP address, the virtual wi-fi interface wlan0:1 is given the IP address and all of the clients of that node can be assigned IP addresses through with DHCP. The IP address is the address that the other mesh routers use for exchanging routing information with one another. The clients are also pushed a default route through which they can reach IP addresses that aren't found in (through IP address of the virtual wireless NIC We set all of this up with manual commands and at the end of it had a nice little four node mesh happily running packets from laptop to laptop.

During that process I ran into some problems getting Windbringer into the mesh as a router using my everyday install of Arch Linux running kernel v3.0. Starting up tcpdump showed that the interface was sending ARP and routing update traffic from babeld but wasn't receiving anything. I'm not sure what was going on but the Intel 3945 wireless card wasn't joining the same cell as the rest of the laptops in the room because it couldn't pick any of them up. I could add some code to the network configuration software to force all Byzantium nodes onto the same cell ID but there are potential problems in so doing in the activist sphere because once the cell ID of a Byzantium mesh got out it would be trivial for a hostile party to detect the presence of a mesh by sniffing for that particular cell ID and then use that to assist in direction finding. I'm fairly certain the driver is to blame because I booted one of our Byzantium Linux USB keys (running kernel v2.6.38) and had no trouble joining Windbringer as either a node or a client. I have yet to test Windbringer's normal operating environment as a client only.

After all of the swearing and head scratching was over, Ben and I tore the mesh down and built it again, this time documenting every command on paper. He then set up a mesh-to-Internet gateway using a cellular card from Sprint and IPtables and our clients were able to access the global Net over the mesh network at HacDC. From the notes we took I've got enough information to rewrite the network configuration code so that you can either bootstrap a mesh or join an existing one in just a few minutes (counting the incredibly short boot time). I started rewriting the relevant portions of code but haven't checked it into our Git repository yet because it's not done, let alone debugged. Keep an eye on the commit messages Github sends to the mailing list and you'll know when it's ready.

Towards ContactCon!