a quick wireless mesh blinding table howto

Andrey Yurovsky andrey at cozybit.com
Tue Apr 3 22:37:08 EDT 2007


Hello.  Here is a short introduction to the blinding table, a useful
troubleshooting tool in the mesh wireless on the OLPC.  You can use
the blinding table (BT) to force mesh topologies that interest you,
for example forcing a node to route its traffic through another node
or nodes.

For the following instructions, ensure that you have the latest driver
and firmware (build 368 has these).  You can use ethtool to check:

# ethtool -i msh0
driver: libertas
version: COMM-USB8388-321.p0-dbg
firmware-version: 5.220.10.p5
bus-info:

The BT stores MAC addresses and can act as a blacklist or whitelist.
In a blacklist, the firmware will drop packets from any node whose MAC
address is in the BT.  As a whitelist, the firmware will drop packets
from any node that is not in the BT.  Here are some useful BT
commands:

1) to reset (clear) the BT:
# iwpriv msh0 bt_reset

2) to look at what's inside the BT:
# iwpriv msh0 bt_list $i
where $i is a number between 0 and 127 representing an entry.

3) the default mode is 'blacklist', to set 'whitelist', invert the BT:
# iwpriv msh0 bt_set_invert 1
and to set 'blacklist':
# iwpriv msh0 bt_set_invert 0

4) to check the mode:
# iwpriv msh0 bt_get_invert

When using the BT, ensure that nodes are added in both directions.  So
to blind olpc0 and olpc1 you must add olpc0's MAC to olpc1's table,
and olpc1's MAC to olpc0's table.

For this example I will use four laptops, with host names olpc0,
olpc1, olpc2, and olpc3 for the msh0 interface.  I'll set up a
topology that looks like this:

olpc0 <-> olpc1 <-> olpc2 <-> olpc3

First, reset the BT on each node and set whitelist (inverted) mode:

# iwpriv msh0 bt_reset
# iwpriv msh0 bt_set_invert 1

olpc0 should only talk to olpc1, log in and:

# iwpriv msh0 bt_add $olpc1_mac_address

olpc1 should talk to both olpc0 and olpc2:

# iwpriv msh0 bt_add $olpc0_mac_address
# iwpriv msh0 bt_add $olpc2_mac_address

Similarly, olpc2 should talk to both olpc1 and olpc3.  Finally, olpc3
should only talk to olpc2.

Once that is set up, log in to olpc0 and clear its forwarding table
(FWT).  Then ping olpc3, causing a route as drawn above to be created.
 You can then inspect each node's FWT to see the routing.

# iwpriv msh0 fwt_reset
# ping -c5 -I msh0 olpc3
# for i in `seq 0 127`; do iwpriv msh0 fwt_list $i; done

(choose a smaller number than 127 if you wish).  For most tests, I
suggest using the 'whitelist' (inverted) mode as it eliminates the
possibility of a nearby node that you forgot about joining the mesh
and routing packets while you were trying to force a particular
topology.

Have fun meshing,

-- 
Andrey Yurovsky
cozybit Inc.
p 415 974 6770 x14
f  415 974 6771
e  andrey at cozybit.com



More information about the Devel mailing list