wiki:HowTo/virtualMobility

Documentation | !virtualMobility

Virtual Mobility and Arbitrary Topologies

The ORBIT lab has several tools to support the creation of arbitrary topologies and mobility. The first is a series of interference generators, and the second is a system of virtual 'off-grid' nodes that can have their packets sent/received from an arbitrary node in the grid. This approach can be used to create a 'step-like' mobility.

The method described here is a third way. It is implemented as a modification to the madwifi driver. Basically what it does is allows incoming packets to be filtered by sending MAC address. These filtered packets can have an arbitrary RSSI assigned to them and an arbitrary percent of these incoming packets can be ignored in order to simulate a poor radio environment.

What this tool can do:

  • Simulate any arbitrary topology, including one-way links
  • Simulate any radio environment, including very noisy, low signal environments
  • Support mobile topologies, including any number of nodes moving in a virtual 3d space (left as an exercise for the reader :) )
  • Allows on-the-fly adjustment to any topology in real-time

A few things to remember:

  • Since this modification is at a very low layer in the madwifi driver (just after the HAL), it is completely transparent to all routing and packet shifting performed by both the kernel and userspace applications.
  • Packet skipping occurs above the HAL, so multiple hardware retries, etc have no effect on packet receive percentages.
  • When using this tool packets are still sent and received at the hardware layer, and thus you will still need to be sure you're not saturating your radio environment even if your nodes don't seem to be receiving packets.

Using the Filter

The format for the command looks like this:

iwpriv orbitfilter ath0 [MAC] [PERCENT_RECEIVED] [RSSI]

an example where 75% of packets for a radio with MAC address 00:60:b3:25:c0:27 are allowed through and the RSSI is set to 55.

node1-2:~# iwpriv ath1 orbitfilter 0x00 0x60 0xb3 0x25 0xc0 0x27 75 55

if you want to allow only 75% of the packets, but want to leave the RSSI as it was reported by the HAL:

node1-2:~# iwpriv ath1 orbitfilter 0x00 0x60 0xb3 0x25 0xc0 0x27 75 0xFF

to remove a filter completely, simply set the percent and RSSI to 0xFF.

node1-2:~# iwpriv ath1 orbitfilter 0x00 0x60 0xb3 0x25 0xc0 0x27 0xFF 0xFF

If you wish to set a global filter for all nodes that do not have a specific filter, simply use a MAC address with all bits set. The following example blocks packets from all nodes that do not have a specific filter.

node1-2:~# iwpriv ath1 orbitfilter 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0 0

Removing the global filter works the same way as removing a specific filter.

node1-2:~# iwpriv ath1 orbitfilter 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

If you wish to clear all filters, both specific and global, use this command.

node1-2:~# iwpriv ath1 orbitfilter_rst 1

Arbitrary Topologies

Arbitrary topologies are created most easily by setting a global filter for each radio that blocks all senders except those you're specifically allowing through.

nodeX-Y:~# iwpriv ath1 orbitfilter 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0 0

Then for each radio, you'll simply specify which senders you'd like to hear from. For example, if you want to allow ath0 on nodes 3-4 and 3-6 to hear each other you'd enter these commands (where the MAC address is the MAC address of the radio on the node you want to hear from):

node3-4:~# iwpriv ath0 orbitfilter 0x00 0xbf 0xcd 0x6D 0x24 0x18 100 0xFF
node3-6:~# iwpriv ath0 orbitfilter 0x00 0x56 0xcd 0x12 0xc4 0x8d 100 0xFF

Using 0xFF for the RSSI value leaves the RSSI value unchanged from what the hardware layer reported.

Virtual Mobility

Virtual mobility is acheived by simply adjusting the arbitrary topologies in real time. For example, if you wanted to mimic that two nodes started together and then moved further and further apart until they were out of range you would start with both nodes being configured like this:

iwpriv ath0 orbitfilter [MAC] 100 90

as time continued you would keep dropping the RSSI value (currently 90) until it reached about 15. At that point you would start to drop the percent of packets received. In the following example only 90% of packets are being received and the RSSI is 15.

iwpriv ath0 orbitfilter [MAC] 90 15

You would continue this trend until the percent of packets received was 0 and the RSSI was 0.

iwpriv ath0 orbitfilter [MAC] 0 0

Applying the Patch

This patch has been designed to be applied to baseline.ndz (as of Sept 6, 2006). Each of the modifications is marked in the source like this:

// start orbitmadwifi
some code here
// end orbitmadwifi

The tar file attached to this page is meant to be extracted in this directory:

node1-1:/usr/src/madwifi/trunk# tar -xvf orbitfilter.tgz

Next you'll need to make the changes and install them

node1-1:/usr/src/madwifi/trunk# make
node1-1:~# cp /usr/src/madwifi/trunk/ath_rate/sample/*.ko /lib/modules/2.6.12/net
node1-1:~# cp /usr/src/madwifi/trunk/net80211/*.ko /lib/modules/2.6.12/net
node1-1:~# cp /usr/src/madwifi/trunk/ath/*.ko /lib/modules/2.6.12/net
node1-1:~# cp /usr/src/madwifi/trunk/ath_hal/*.ko /lib/modules/2.6.12/net
node1-1:~# modprobe -r ath_pci
node1-1:~# modprobe ath_pci

As a special bonus for reading this far and installing this patch, you can also turn on and off beacons.

Turn beacons off:

iwpriv ath1 set_beacon 0

Turn beacons on:

iwpriv ath1 set_beacon 1

author: Chris Davies (chris@…)

Last modified 11 years ago Last modified on 09/07/06 11:48:12

Attachments (1)

Download all attachments as: .zip