next up previous contents
Next: Private (Driver Specific) Driver Up: Configuring MadWifi using Wireless Previous: retry - Set Retry   Contents


Using wlanconfig

The current MadWifi driver supports multiple APs and concurrent AP/Station mode operation on the same device. The devices are restricted to using the same underlying hardware, thus are limited to coexisting on the same channel and using the same physical layer features. Each instance of an AP or station is called a Virtual AP (or VAP). Each VAP can be in either AP mode, station mode, ``special'' station mode, and monitor mode. Every VAP has an associated underlying base device, which is created when the driver is loaded.

Creating and destroying VAPs are done through the wlanconfig tool found in the MadWifi tools directory. Running the wlanconfig utility with no arguments returns a brief help line. The format of the wlanconfig command takes two forms:

wlanconfig VAP create wlandev Base Device wlanmode mode [bssid$\Vert$-bssid] [nosbeacon]
wlanconfig VAP destroy
Every Linux network device consists of a prefix followed by a number indicating the device number of the network device. For instance, the ethernet devices are named eth0, eth1, eth2, etc. Each VAP which is created is also registered as a Linux network device. The value VAP can be either a prefix name of the Linux network device, or it can be the entire device name. For instance, specifying VAP as ath lets the Linux kernel add the network device as the next device with the prefix ath. Thus, the Linux kernel appends the proper number to the end to form the full device name, e.g., ath1 if ath0 already exists. However, the full device name can also be specified. For instance, VAP can also be ath2. In this case, the network device ath2 is registered, regardless of whether ath1 exists.

The Base Device is the underlying wireless network device name created when the driver is loaded. The MadWifi driver creates wifi0, wifi1, etc. as the underlying devices. By specifying the Base Device, the VAP is created with the Base Device as the parent device.

The mode is the operating mode of the VAP. The operating mode of the VAP cannot be changed once it is created. In special cases, the operating mode of the VAP can be different from the operating mode of the underlying parent device. The first VAP which is created sets the operating mode of the underlying device. If the first VAP is deleted and a new VAP is created with a different operating mode than the original VAP, then the operating mode of the underlying device is changed to the new operating mode. The valid operating modes and their descriptions are given in Table [*].

Table: wlanconfig Operating Modes
Mode Description
Auto Auto select operating mode
Managed Station mode for infrastructure networks
Master AP mode
Monitor Passive monitor (promiscuous) mode


Only one station VAP can exist on a device. If the station VAP is the first VAP created, then no other VAPs are allowed to be created. If the first VAP created is in AP (Master) mode, then one station VAP is allowed to be created. In this case, other AP VAPs can also be created after the station VAP. When AP and station VAPs coexist, the nosbeacon flag must be used when creating the station. This flag disables the use of hardware beacon timers for station mode operation. This is necessary because concurrent AP and station operation implies the station should not modify the TSF clock for the APs.

Creating multiple VAPs typically implies that the MAC address of each VAP is different. However, if the -bssid flag is used, then the MAC address of the underlying wireless device is cloned for the VAP being created.

To destroy a VAP, the wlanconfig command is used with the destroy parameter. In this case, the full device name must be used, i.e. you must specify the entire name, not just the device prefix.

Example:If we wish to use the system as a station only, we would create a single station VAP once the driver is loaded. The following command creates a single station VAP named ath0 on device wifi0:
myprompt# wlanconfig ath create wlandev wifi0 wlanmode sta
Note that no other VAPs can be created since the we are assuming this is the first VAP created on wifi0. Since this is the first VAP created, we only need to specify ath, not ath0. However, the following command would also be correct:
myprompt# wlanconfig ath0 create wlandev wifi0 wlanmode sta
The MAC address of the station VAP is the same as the underlying device's MAC address since it is the first VAP created. Example:Now, we wish to create two AP VAPs on device wifi0. The first device will have a cloned MAC address taken from the underlying device. The second VAP will have a ``virtual'' MAC address formed from the underlying device's MAC address. The first VAP will be ath0 and the second device will be ath2.
myprompt# wlanconfig ath create wlandev wifi0 wlanmode ap
myprompt# wlanconfig ath2 create wlandev wifi0 wlanmode ap
Example:Now, we wish to create two AP VAPs on device wifi0. Both devices will have a the same MAC address cloned from the underlying device. The first VAP will be ath0 and the second VAP will be ath1.
myprompt# wlanconfig ath create wlandev wifi0 wlanmode ap -bssid
myprompt# wlanconfig ath create wlandev wifi0 wlanmode ap -bssid
Example:Now, we wish to create two AP VAPs and one station VAP. The AP VAPs will be ath0 and ath2 and the station VAP will be ath1.
myprompt# wlanconfig ath create wlandev wifi0 wlanmode ap
myprompt# wlanconfig ath create wlandev wifi0 wlanmode sta nosbeacon
myprompt# wlanconfig ath create wlandev wifi0 wlanmode ap
Example:Now, we wish to destroy a VAP (regardless of its operating mode). We assume that there is a VAP named ath0, and it's the one we wish to destroy.
myprompt# wlanconfig ath0 destroy


next up previous contents
Next: Private (Driver Specific) Driver Up: Configuring MadWifi using Wireless Previous: retry - Set Retry   Contents
root 2005-12-16