Changes between Version 1 and Version 2 of HowTo/bssidFix


Ignore:
Timestamp:
Aug 25, 2006, 11:33:18 PM (15 years ago)
Author:
cmdavies
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/bssidFix

    v1 v2  
    66When wifi network cards are placed in ad-hoc mode (iwconfig ath0 mode 'ad-hoc') they will automatically search for networks with the same essid (iwconfig ath0 essid 'blah'). They will adopt the bssid of the first node to turn on that has the specified essid.
    77
    8 Unfortunately, this algorithm and/or implementation is not very good and even relatively small networks nodes that have the same 'essid' will end up with different a 'bssid'. Since the wifi card drivers filter by bsssid, nodes that should be in the same ad-hoc network can't exchange packets.
     8Unfortunately, this algorithm and/or implementation is not very good and even relatively small networks, nodes that have the same 'essid' will end up with different a 'bssid'. Since the wifi card drivers filter by bsssid, nodes that should be in the same ad-hoc network can't exchange packets.
    99
    1010The solution to this problem can be found by modifying the madwifi drivers (for Atheros wifi cards only), so that the bssid a node generates is a hash of the essid instead of its MAC address. This ensures that nodes with indentical essid's end up with identical bssid's.
     
    1414== What to Change ==
    1515
    16 T
     16These instructions are designed to be applied to the baseline.ndz as of Aug 25,2006.
    1717
     181. ssh to one of the nodes (ssh root@node1-2)
     192. open /usr/src/madwifi/trunk/net80211/ieee80211_node.c in your favourite text editor
     203. goto line 427, you'll see some code that looks like this:
     21{{{
     22        if (ic->ic_flags & IEEE80211_F_DESBSSID)
     23            IEEE80211_ADDR_COPY(ni->ni_bssid, ic->ic_des_bssid);
     24        else
     25            ni->ni_bssid[0] |= 0x02;        /* local bit for IBSS */
     26}}}
     274. Right after these lines add the lines:
     28{{{
     29        int len = 0;
     30        while (ic->ic_des_essid[len] != 0) len++;
     31        int i;
     32        for (i=0;i<IEEE80211_ADDR_LEN;i++) {
     33            ni->ni_bssid[i] = ic->ic_des_essid[i % len];
     34        }
     35}}}
     365. Save the file
     376. cd /usr/src/madwifi/trunk
     387. make
     398. cp /usr/src/madwifi/trunk/net80211/*.ko /lib/modules/2.6.12/net
     409. modprobe -r ath_pci
     4110. modprobe ath_pci
    1842
     43You will probably want to save the image this modified node so that you can save running these steps each time you want to perform an experiment.
    1944
    20 orbitHandler is an alternative framework for controlling the ORBIT lab. It consists of a series of console commands that that operate on predefined sets of nodes. The major features include:
     45Save the image of the node:
     46{{{
     47joeuser@console.sb1:~$ saveNode 1,2
     48}}}
    2149
    22  * Precisely specify large, intricate node sets
    23  * Send specific commands to each node in the set
    24  * Distributed ftp equivalent
    25  * Entirely command line driven
    26  * No global grid operations