Lab 1: Wireless Behavior - Association and Channels


In this assignment, we will try to provide some insights into the 802.11a/b/g standards' network association and channel behavior. You will also learn basic steps on configuring layer 2 and 3 addresses. This will form the basis for many 802.11 assignments to follow. This assignment tries to high-light how virtual networks are formed in an 802.11a/b/g wireless network with some emphasis on channel selection and their relation.

For this assignment you will be required to work with a setup of at least 2 laptops for part 1 and at least 3 for part 2, or a set of fixed nodes (such as desktops) placed at various distances, all with a 802.11 wireless network interface. Software provided along with this lab requires the popular Linux operating system (please make sure that the wireless cards have proper drivers installed) to work.

Node Setup

To run the required experiments, each node has to be setup with a IPv4 address. Below we will describe the steps required to get your wireless card working, and assigning an IPv4 address. We will proceed in a bottom-up fashion, from Layer 2 onwards to Layer 3.

Layer 2: Wireless Interface Card Setup

First, make sure that the required drivers for your wireless card are in place; detailed steps on this are beyond the scope of this document. However, it is not very tough to do so, and fortunately there are detailed instructions, available on the internet, on how to do this for almost every popular chipset.

The next step is to setup the card to the required mode. As per the 802.11a/b/g standards, cards can function in either the Infrastructure/Access Point or the Ad-Hoc/IBSS mode. As one can guess, in the access-point mode, the wireless cards cannot communicate with each other directly, but only via an access point. Hence, our experiments make use of the Ad-Hoc mode, where every node can communicate with every other node in range, directly.

All throughout this and future labs, we will make extensive use of the Linux Wireless Configuration tool, "iwconfig" , it may help to familiarize yourself with it's details. Please read the iwconfig man page ($man 8 iwconfig).

Use the following command to set the card to work in Ad-Hoc mode, and assign it an SSID We will use the SSID "wlab" for our experiments (you may change this, but just make sure to use the same SSID on all machines part of the experiment). NB: Some machines/drivers name the wireless cards with different names, please replace wlan0 with your cards name (use must read the drivers README for this information).
# iwconfig wlan0 mode Ad-Hoc essid "wlab"
Repeat this for all nodes you want to use in the experiment. Check the config on every node with the following commands. Make sure that the Mode is set to "Ad-Hoc" and ESSID to "wlab" (or whatever you had used).
# iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"wlab"
          Mode:Ad-Hoc  Frequency:2.412GHz  Cell: 00:00:00:00:00:00
          Bit Rate:0kb/s   Tx-Power:20 dBm   Sensitivity=0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0/0  Signal level:-95 dBm  Noise level:-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Layer 3: IPv4 Address

Assigning a IPv4 address to the card is the same for wireless/wired card, and will make use of the popular interface configuration tool "ifconfig". More information can be found from the man pages.

Pick a subnet from those allowed for private use as explained in RFC 1918 We will use, without loss of generality. Let us start by assigning the first node the address with net-mask

# ifconfig wlan0 net
Check the configuration with the following command.
# ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:02:6F:20:F9:A4
          inet addr:  Bcast:  Mask:
          RX packets:0 errors:41 dropped:0 overruns:0 frame:41
          TX packets:0 errors:2 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:200
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:10 Memory:c48b9000-c48c9000
You should immediately observe from the output of the command # iwconfig wlan0; that the Cell: field will now be filled with a 48-bit number displayed in hexadecimal. Something as follows.
wlan0     IEEE 802.11b  ESSID:"wlab"
          Mode:Ad-Hoc  Frequency:2.412GHz  Cell: AA:BB:CC:DD:EE:FF
          Bit Rate:0kb/s   Tx-Power:18 dBm   Sensitivity=0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:39/0  Signal level:-56 dBm  Noise level:-95 dBm
          Rx invalid nwid:358  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:83  Invalid misc:83   Missed beacon:0
This number is a randomly chosen one, which the "first" node with the SSID "wlab" will choose. All nodes which come up with the same SSID later, will converge to this cell-id (known as IBSS ID). This forms, the networks' ID. Similar paradigms are not seen in wired networks, since all nodes which are physically connected to some network hub/switch automatically form the same network. However, in wireless, all nodes in a given radio range need not be part of the same network. Hence this differentiation and identification.

Nodes which do not have the same IBSS (cell) ID will not be able to communicate, because the MAC layer discards the packets which are received but have a different IBSS ID.

Now you should be able to use the program ping to check connectivity with other nodes using ICMP messages.


Now that you are familiar with the usage of the above configuration tools, let us try to analyze how they various parameters effect the connectivity.

Significance of SSID

Previously, you set all nodes to use the same SSID (wlab), now let us see what happens in case we use different SSIDs. Now, try choosing different SSIDs (alphanumeric) and set them using the iwconfig tool on different nodes. Now observe the values of the IBSS ID (cell) field for each node. Nodes with different SSIDs will choose different IBSS IDs. Now, try to ping nodes on different cells, they should fail to communicate.

Find out how exactly the chosen SSID effects the "association" phase in 802.11a/b/g networks, and provide a brief description citing your sources. Do you notice anything interesting with the counter "Rx invalid nwid" displayed using # iwconfig wlan0?

Explicitly choosing a channel in 802.11a/b/g

Let us now try to understand channels and how they effect basic connectivity in 802.11a/b/g networks, in ad-hoc mode.

Choose any 3 nodes, say A.B and C. Assuming you are using 802.11 b or g (if you are using 11a, use 36, 56 and 161 instead of 1, 6 and 11), set Node A to channel 1 and ssid "NodeA", with the command # iwconfig wlan0 channel 1 ssid "NodeA". Next, set the Node B to channel 6 and essid "NodeB" using the command # iwconfig wlan0 channel 6 essid "NodeB" . This will force nodes A and B to stay in channel 1 and 6, and choose different IBSS IDs.

From the previous exercise you would have inferred that setting two machines to the same SSID will converge them to the same IBSS ID. Now, change the SSID on the Node B to "NodeA" with the command # iwconfig wlan0 essid "NodeA". However, you will observe that the nodes will still remain to use different IBSS IDs.

Try to explain the above behavior briefly. As always, please cite your exact sources.

Now, set Node B back to it's previously selected SSID with the command # iwconfig wlan0 essid "NodeB". On the third node, make note of what frequency the card is on (Frequency field from iwconfig output). Now, set the node to Node B's essid, i.e on Node C, execute the command iwconfig wlan0 essid "NodeB". You should soon see that Node C will now get the same Cell ID as that of Node B. What happened to the Frequency field on Node C? If it has changed, why, please explain? Also, try to set Node C to the SSID of Node A, and observe what happens, and briefly explain.


Version: $Revision 0.1 $. Last Modified: $Date 2005/11/22 16:07 $. Author: $Name- Chandrakanth Chereddi $.