Multiple WiFi Cards in Linux?

| |

I am doing some research for Dr. Tang, a professor in the MSU Computer Science Department. He wants to find an optimal set of channels for a wireless mesh network for some networking metric. Some common metrics are Quality of Service (QoS), throughput, and latency. Of course any algorithms he wants to try out require testing in the simulation environment we use, called OpNet. OpNet is an unweildly beast, and I spend most of my time wrestling with it. The hard part is that for his research, Tang wants each node to have multiple radios. The simulator really doesn't like that.

Anyway, simulations are nice, but at some point, we have to build a real mesh network. So I looked around at what kind of multi-interface types of things there are, and I found 802.3ab. That's an ethernet protocol for binding two Ethernet cards together for higher throughput. It manages the issues that come up with having multiple Ethernet addresses for the same IP on one network.

802.3ab is a protocol though, and protocols are a pain in the butt. Thing is, wireless technology is remarkably different from wired technology. If you add a second wireless card to a computer, and you set both cards to the same channel, then the second card is useless no matter how much software you add. If the second card is working on a different channel, however, you have the potential to get a lot more network throughput.

A big difference between wired and wireless networks is that a wireless node can change the radio channel it's working on rather easily. The analogy for a wire node would be physically unplugging its cable from one switch and plugging it in to another switch.

So I thought to myself, after learning all these neat things about wireless networks, is "why not set all the ethernet address on a node the same?" This is certain disaster in a wired network. Two physical connections on a network with the same Ethernet address? Were talking the end of the world. That is of course assuming the world consists of that particular network working.

In a wireless network, however, two radios on a nodes are never on the same channel. Right at the beginning we made that problem go away. We know that two radios on the same channel is totally useless, so if they are on the same channel, someone configured the node wrong.

So you might ask "but that doesn't solve the problem, does it?" And the answer is no, that's not the whole solution. It's just a big part. The next part is to write a virtual ethernet device that has some simple responsibilities. Most importantly, it attaches to all the wireless devices you want pooled together. All traffic in and out of all the real devices goes throught the virtual device. It moves all incoming traffic right up the network stack. On data transmission, however, the virtual device needs to transmit on as few radios as it can to get a message to a destination (a target ethernet address). It would have to build some simple tables to associate addresses with devices, but that can be done passivily (no protocol).

The upshot is that with this one module (and some configuration scripts), you could add as many radios as you have free channels to talk on, and your network performance should continue to improve. All you have to do be clever about how you pick which channels each node uses...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Software issues

Interesting project here. I was thinking perhaps we could use what most people have already?
The idea here is to use a desktop with two or more wifi nics and a router connected via lan to a regular nic.
What I'm thinking is that with some coaxing, a vbox image of tinycore can be created to do this. Inside tinycore install would be freenet (oooh that is tricky on tinycore). I have no troubles throwing these things into a more intensive operating system, but it would be best for this thing to be as lightweight as possible.

I was thinking under these circumstances freenet would need to be tweaked to take advantage of these meshed wifi links; the idea being that the router is configured as a wifi gateway to the internet, either locally or by design with freenet, a few nodes away. I think this will have an advantage of improving download rates with the cost of increased network traffic.

I was considering an install running apache and php, this way freenode can dump zip file contents into the httpd folder rather than setup fproxy (which is a bit of a waste).

Freenode is missing over-seeding, as well as centralized accounts. They still have centralized servers; but if you have php on virtualized servers that can operate from any peer node, then you have a means to implement a mechanism for virtualizing those centralized servers in a corruption free manner given the right mechanisms to verify data.

Freenode also lacks the means to remotely execute binary files for massive cluster computing; I mean may as well make use of those idle cpu cycles whenever your computer is doing nothing but idling as a node on the network.

The idea here is if isp's were to pull the plug tomorrow, people could quickly and easily set up MAN's and potentially link them together, or may have satellite MAN's with internet connectivity (possible as well) or completely isolated MAN's. This might get a little tricky.

Worzie's picture

I run into this Howto and

I ran into this Howto and thought of your article just now. Not sure if this offers any assistance, but it looks too simple.

Here's a though...

Would configuring Linux to bridge multiple wireless adapters work? It would seem to me that the bridge code already runs some distributed algorithm to build routes through networks that are Minimum Spanning Trees, and the bridge would be effectivly bridge two wireless networks. I don't know what would happen if two links that were bridged saw the same IP address on both sides of the bridge. I'm guessing that the anti-make routing-loop code would make it so that only one channel could access any particular IP address. That makes it hard to take advantage of potential bandwidth. Hmm.

Worzie's picture

Brings me back

I recall back in the dial-up days wondering how one could use two modems to combine bandwidth. Not sure if that thought was spurred on by others actually doing this or if I was dreaming. I probably wrote it off to the latter.

Anyway your project definitely sounds interesting to me. Looking forward to hearing your progress.

No you were not dreaming, 2

No you were not dreaming, 2 modems at one time is fine if your isp's radius server allows concurrent logons. However, even back in the day, there were very few isp's that allowed that.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.