Monday, December 21, 2009

Beating the Multi-Hop Routing problem (or not)

Most of those familiar with wireless meshing are familiar with the multi-hop wireless problem. For those unfamiliar with the space, the problem is simple: A radio has a fixed maximum bandwidth (for 802.11g it's roughly 22Mbps of half-duplex real throughput). Any time a device needs to receive and forward data over the same radio, it must share this bandwidth between sending and receiving, meaning that after four or five radio hops there is precious little bandwidth left. (for the first hop, the bandwidth hit is roughly 50%, I haven't tested what happens after that, but one would expect the proportional degradation per hop gets less severe as the signal thins out) At any rate, the multi-hop problem is a major issue in a region-scale wireless network with sparse or distributed network resources, and since FabFi is going to be HUUUUGE, I set about some experiments to see how one might beat it.

The bandwidth halving over multiple hops is fundamentally a physics/hardware problem. A single radio cannot send and receive at the same time, and no two radios can talk on the same channel at the same time. Two radios can, however, talk at the same time on non-overlapping channels--theoretically--begging the question, if every device had two radios, would we be cool?

Sadly, not so much...

A little bench testing with four routers yields the following (I believe these numbers are full-duplex, so x2 accordingly for what you would expect the numbers to be...)
  • setup 1: Single-hop cabled , 24.3 Mbps
  • setup 2: Multi-hop cabled, 24.2 Mbps
  • setup 3: Single-hop wireless, (ch11) 11.4 Mbps
  • setup 4: Multi-hop Radio-cable-radio (close quarters, directed, ch 1., 11) 5.82 Mbps
  • setup 4b: Multi-hop Radio-cable-radio (close quarters, ch 1., 11) 5.81 Mbps
  • setup 5: Multi-hop Radio-cable. (ch 11) 11.5 Mbps
  • setup 6: multi-hop Radio-cable-radio (30', ch 1, 11) 10.8 Mbps
(same physical setup as above, but with different channel selections)
  • setup 6b: multi-hop Radio-cable-radio (30', ch 1, 6) 15.4 Mbps
  • setup 6c: multi-hop Radio-cable-radio (30', ch 1, 5) 12.2 Mbps
  • setup 6d: multi-hop Radio-cable-radio (30', ch 13, 9) 11.2 Mbps
  • setup 6e: multi-hop Radio-cable-radio (30', ch 1, 4) 6.54 Mbps
  • setup 6f: multi-hop Radio-cable-radio (30', ch 1, 3) 5.39 Mbps
  • setup 6g: multi-hop Radio-cable-radio (30', ch 1, 2) 6.98 Mbps

Background, for reference:
From the above, it is clear that a multi-radio 2.4GHz device is unlikely to have the desired effect of radio-radio hopping without bandwidth degradation unless the physical radios are fairly far apart. It is, however feasible to achieve bandwidth preserving multi-hop routing over the radio with two wireless devices separated over a wired LAN, suggesting that there might be a benefit to modifying the OLSR protocol and channel selection algorithms to take advantage of this situation when it arises in the wild.

As an aside, the above also suggests that in a crowded RF environment, spreading devices across all 13 wifi channels, using ch 1, 5, 9, and 13 is nearly as bandwidth-preserving than the traditional 1, 6, 11 configuration. Channels closer than four apart interfere with each other almost completely, even at a modest distance from each other.

3 comments:

xsdg said...

The only difference between setups 4B and 6 is the distance between the two tx/rx pairs (aka the distance of the cable run)?

xsdg said...

Also, what happens if you modify setup 4 so that the two inner routers are both doing TX, rather than one TX and one RX?

Judging from where the ethernet cable is, it looks like setup 4 is as follows, where the parens represent the directed antenna attachments.

src_tx   rep_rx)   rep_tx(   dst_rx
                  \______/

The setup I'm curious about is:
rep_rx   src_tx)   rep_tx(   dst_rx
   \____________/
So that the directed signals are being sent away from each other

Finally, what happens if you replicate setup 4, but set the distance between TX/RX pairs to 10 feet? How does that compare to a setup like setup 4B, but with the radio distances as well as the cable run set to 10 feet? Presumably, you'd also want a setup-3 baseline for 10ft.

The Wrench said...

You are correct about difference between 4b and 6 only being the distance between the two pairs (connected by a ethernet cable). Those two setups illustrate the crux of the point.

I think your alternate 4b is functionally the same. In both configurations the signals would be sent both towards and away from each other (the iperf test is fully bi-directional, I believe). Though you do raise the issue if how close can you be and still isolate the signals. This is definitely an area for more investigation (that and determining if there is a shielding setup that would allow them to get super close)

Post a Comment