杏吧原创

Rebel network

Why pay a fortune to get wired up to broadband when you could join an anarchic wireless network that does the job

HIGHGATE, north London, a short walk from Karl Marx鈥檚 grave. Here, in a hilltop apartment, self-employed programmer Jon Anderson is plotting a modern revolution. While big corporations fight to squeeze cash from punters who seem reluctant to pay for wireless internet access, Anderson wants to give the internet back to the people. His ambition: to provide dirt-cheap, wireless broadband internet access, wherever people need it. It鈥檚 an idea whose revolutionary potential would have made Marx proud.

Anderson鈥檚 plan involves two existing technologies. The first is a much-discussed but problematical idea known as mesh networking. This is a technique for creating self-organising clusters of computers that make their own connections between one another, spreading their coverage one node at a time across any terrain, with no central planning authority. It could be described as organised anarchy.

The second is the Wi-Fi standard for wireless local area networking, which allows any computer fitted with a cheap Wi-Fi card to link to a network, without being tied to fixed wires or even a fixed location. Combine the mesh networking and Wi-Fi, argues Anderson, and the result is a network with virtually no size limit, which can grow organically as and when required. His vision is for wireless networks to cover cities and towns worldwide, built by the people, for the people.

In a mesh network, every member 鈥 every node 鈥 acts as a go-between for the messages of its neighbours (see Figure). A new node has only to find one nearby node and start talking to it. That node will pass on any messages to the rest of the network and relay any replies back to the newcomer. Nodes can have more than one neighbour, and neighbours can come and go, but the golden rule 鈥 that every node acts as a relay for its neighbours 鈥 holds.

Rebel network

Increasing the size of the network is simply a matter of adding nodes at the edges; increasing its resilience, a matter of dropping more nodes into the mesh. There are no master nodes, just a network of equals. From each according to its connectivity, to each according to the routes it needs.

Mesh is a hot topic. Telecommunication companies like the idea of a cheap way to reach distant consumers without the cost of marshalling and directing all those connections. Companies such as Nokia in Finland and Radiant Networks in the UK (New 杏吧原创, 24 November 2001, p 22) are developing rooftop nodes to beam broadband. Researchers at the University of California in Los Angeles have scattered mesh-connected environmental sensors that map the seismic waves in their university buildings. Earlier this year, the US army experimented with a mesh network in armoured vehicles of the 4th Infantry Division, spreading its connectivity as quickly as its troops moved forward into Iraq.

But despite the excitement, rolled-out mesh networks have largely remained experimental 鈥 and expensive. Microsoft chief Bill Gates has said he expects mesh to become mainstream in 5 years; Intel predicts 3 years. But no sooner. Like Marx鈥檚 plans for the perfect society, the theory behind mesh is easy, implementing it is rather more difficult.

鈥淚f I鈥檇 known how difficult it was, perhaps I wouldn鈥檛 have tried,鈥 Anderson admits from his London bedsit.

Sorry about the mesh

His bedroom, scattered with Wi-Fi equipment sporting antennas of all shapes and sizes, is the main test bed for his system. The airwaves buzz with test traffic from six wireless networks, simulating congestion. He tweaks his software to deal with the problem in real time.

Two years ago, computing consultant Geoff Jukes approached Anderson with a challenge. Jukes had decided to give up London life for a village in Devon. But the telecommunications company BT had decided not to upgrade the rural telephone exchanges there to provide ADSL connections. Enticed by the idea of building a mesh replacement 鈥 with which he could expand his neighbourhood internet one cheap node at a time 鈥 he asked Anderson to help build a prototype.

Anderson knew about grassroots community networks, but nothing about the intricacies of mesh networks. Nevertheless, he agreed. 鈥淭hen I sat down and began to read the literature.鈥

There are more than 70 competing schemes for routing packets across meshes. Compare that with the three or four established systems on the wired internet. The traditional way to select the optimum algorithm for routing a packet of data is through computer simulation, but wireless meshes are notoriously hard to simulate.

Elizabeth Belding-Royer of the department of computer science at the University of California, Santa Barbara, is one of the creators of Ad hoc On Demand Distance Vector (AODV), a leader among the 70. 鈥淥ur experience,鈥 she says, 鈥渉as been that what we can do in the laboratory matches what we can do in simulations. But what we can do in the field doesn鈥檛 necessarily match with either of those results. Simple things like the height of wireless devices above the ground completely change the model.鈥

Everything from the terrain to the weather, to the presence of interfering equipment like microwave ovens, to the physics and direction of antennas 鈥 even the power characteristics of the battery 鈥 can affect how wireless networks perform. Worse, the routing protocols themselves can affect the properties of the network. Data transmission can be affected by interference from other nodes 鈥 even nearby nodes transmitting the same message.

And because there鈥檚 no central controller, nodes have to confer with each other about what routes they have learned: another potential source of congestion and interference. Too much talk and a network of equals gets bogged down in endless committee meetings. Bad guesswork, or insufficient reporting of changes in the network, means that no packets will get through, and the glorious network will march off on a 5-year plan to nowhere.

鈥淢esh networking is a very active area of academic research and there have been thousands of papers published, but almost no networks have been built,鈥 says Robert Morris, professor of computer science at the Massachusetts Institute of Technology in Cambridge. Morris is an author of the GRID protocol, which he is testing on a network of his own, built across the rooftops of MIT.

GRID鈥檚 design has changed several times in the course of its roll-out. Morris has even gone so far as to abandon the theoretical ideal of discovering a mesh route with the smallest number of hops. Now he tries to spot routes that have a history of fast throughput: a more practical measure. Morris believes hands-on research is essential for discovering what works in mesh. 鈥淭here鈥檚 not enough of an experimental approach in this field,鈥 he says.

Faced with so many choices, Anderson had no option but to be experimental. That meant getting out of his bedsit and building up the networks himself, in as many strange terrains and combinations as possible. He wanted to test how his network would respond when a node鈥檚 signal became too weak to be heard by the node it was communicating with. 鈥淭he process involved a lot of running to and fro from my house to check the results of different experiments,鈥 he says. 鈥淚t drove home how real-world this project is.鈥 Eventually, he developed a collection of improvised approaches that seemed to work.

In all cases, Anderson has chosen practicality over theoretical purity. He selected AODV but tweaked it to fit with his vision of reality. He buried the resultant routing scheme in a complete, self-contained software package and began giving it away for free. He also began building customised computers he calls MeshBoxes, which have built-in Wi-Fi cards and come pre-installed with his software. Anderson has sold MeshBoxes as far and wide as Kingsbridge, Devon, and Vivian, Louisiana (see 鈥淭he wild wireless frontier鈥).

Jukes and Anderson had revolutionary hopes for their MeshBoxes. Wiring up individual villages was just the start. They wanted to connect the villages, creating an even larger mesh. Instead of a few houses sharing one net connection, as in Vivian, this wider mesh would bypass most internet service providers completely. Put enough of the internet on a mesh network, and you would not need the wired net at all. The internet would break free 鈥 with nothing to lose but its cabling.

Bones of contention

But some mesh experts doubt wether you could build a large-scale mesh network out of Wi-Fi. Much of Wi-Fi鈥檚 success and cheapness derives from the way it imitates Ethernet, the conventional wired network. Ethernet has scaled up well. But what works for a wired network isn鈥檛 always the best solution for a large, wireless mesh.

Take the problem of contention. This is what happens when two nodes try to talk at the same time. Unchecked, they鈥檒l drown each other out and the network will jam. Contention regularly occurs on wired networks: when you have a set of machines connected in an Ethernet network, they all share the same wire. The inventor of Ethernet, Robert Metcalfe, solved this problem in 1976. When a computer talks on an Ethernet network it first listens out for others. If it hears another machine talking, both agree to shut up and restart only after waiting a random period of time. If they collide again, they stop and wait slightly longer. It turns out that this polite negotiation allows each computer an even chance of grabbing the microphone.

Wi-Fi uses the same approach. But it doesn鈥檛 work as well. On a wireless network, not everybody talks at the same volume. A loud node 鈥 one that is nearer the listener 鈥 can drown out a distant node, without even noticing that it is butting in. When the time comes to talk again, the quieter node will still be waiting, patiently backing off because of the previous collision.

And Wi-Fi contention doesn鈥檛 scale to the large meshes that Anderson and Jukes envisage. Not only can nodes drown out each other鈥檚 conversation but, when they are relaying your data to their neighbours, there鈥檚 a good chance that that conversation will drown you out too. With more than one hop within listening distance, researchers like Morris have discovered that bandwidth can be cut down by three-quarters.

Commercial advocates of mesh networks have concluded that Wi-Fi might never be a suitable infrastructure for high-traffic networks with lots of nodes. They have set about creating alternative solutions such as the new IEEE 802.16 standard, used by Nokia in its first commercial mesh hardware.

These meshes aren鈥檛 designed to be used by amateurs and enthusiasts to undermine the wired net. They require equipment that is around ten times as expensive as standard Wi-Fi kit. They are firmly aimed at the owners of the wired net: ISPs and telcos.

Anderson hasn鈥檛 got that kind of money 鈥 and neither have his users. They have learned to live with Wi-Fi鈥檚 failings. Anderson claims that contention is rarely a problem in practice, and is easily fixed either by shifting nodes around, or by buying a new one to interpose between them. Fellow Wi-Fi enthusiasts in Greece and Western Australia have suggested fixes that would allow networks to use the same Wi-Fi hardware with modified contention algorithms.

Anderson鈥檚 mesh may not be a model of theoretical purity, and Wi-Fi may not be the best mesh hardware in the world. But it鈥檚 out there. Thanks to Anderson鈥檚 open-source approach, he has thousands of users now, all giving him feedback on how to tweak the system further. And because of the ubiquity of Wi-Fi, not only can anyone implement these networks, but anyone can work on improving them too.

Perhaps the greatest impediment to a grassroots network like Anderson鈥檚 is no longer technical. It鈥檚 social.

Individual Wi-Fi nodes reach at most a few hundred metres in any direction, and work best when they have a line-of-sight connection. To create a mesh, you鈥檇 need at least one node in every neighbourhood, and that means a willing volunteer around every corner.

In Devon, in the under-served towns of Louisiana, or in the virgin territories of the developing world, mesh could be the best solution. Anderson鈥檚 ultra-cheap, early-bird hybrid may beat commercial wired broadband to the punch. But in the places most likely to contain eager geeks, such as Morris鈥檚 Boston and Anderson鈥檚 London suburb, a large-scale mesh network may well find itself competing unsuccessfully with cheap, wired broadband alternatives.

Anderson has not even managed to build a mesh network in his own neighbourhood. But then Marx鈥檚 revolution didn鈥檛 begin in Highgate either.

The wild wireless frontier

Deep in the Louisiana planes nestles the town of Vivian, a sleepy backwater with 4000 inhabitants. 鈥淲e鈥檙e a tight-knit community,鈥 says Susan Ainsworth, who runs the town鈥檚 only insurance agency.

The same could be said of Vivian鈥檚 internet connection. The town was too small to attract much interest from commercial broadband internet service providers. So Kenny Bain, the local pharmacist started his own ISP instead.

They couldn鈥檛 afford to dig up the streets to lay new cables, and the tree coverage was too heavy to beam the internet wirelessly from one central mast.

But Bain had read about Jon Anderson鈥檚 project to develop mesh networks. It seemed the perfect answer to his dilemma. He could build a wireless network one node at a time, and forge routes around the obstacles. He leased a commercial internet connection for $850 a month, hitched a 7-metre antenna to the top of his office, and began selling mini-PCs called MeshBoxes to his nearest neighbours. Thus the Vivian mesh was born.

鈥淚 don鈥檛 really understand how it works,鈥 confesses Susan鈥檚 husband Mark, who has erected a MeshBox aerial on top of their house. 鈥淏ut I see it like our municipal water system. We all connect to the same pipes, and all benefit from its reach.鈥 Every box Bain sells is another few metres of internet piping.

The MeshBoxes, which cost about $350, can sense other nearby boxes and act as a relay for those that are too far from the main antenna. The Ainsworth鈥檚 node, with its 1.5-metre roof-mounted antenna, is six blocks away from the main antenna 鈥 too far to reach directly, but just three hops away on the network.

Bain now has a waiting list of customers, and plenty more hops to go before he stretches the mesh network鈥檚 capacity.