next_inactive up previous


Host AP by Example
How to Build an IEEE 802.11 Wireless Host Access Point

Feng Li, Mark Claypool,and Robert Kinicki
{lif,claypool,rek}@cs.wpi.edu
CS Department at Worcester Polytechnic Institute
Worcester, MA, 01609, USA

Introduction

Performance of IEEE 802.11 access points (APs) are becoming increasingly important since 802.11 is the predominant choice for high-speed wireless local area networks (WLANs), from those used in the home to those used in universities and corporations. Tuning an AP may be a key factor in improve the performance of a WLAN. However, most commercial access points are ``black boxes'' to academic researchers, with details on software and hardware implementations hidden from the external applications. Setting up a controllable access point can provide a valuable platform for wireless researchers that want to measure and modify WLAN APs under a real network environments.

This document describes how to build a basic IEEE 802.11 wireless AP from open source software and off-the-shelf wireless networking hardware. This ``homemade'' wireless AP provides WLAN functionality for wireless clients, while allowing instrumentation and even customization of the AP for detailed measurements and even tuning. All of the sources of information referred to in this document are from Internet sources. Links embedded in this document can be used for more detailed information.


Build the Host AP

The wireless host access point (HOST AP) is built on a basic Linux PC. Like most commercial APs, it is assumed to have a wired uplink connection to the Internet with a wireless connection (operating in infrastructure mode) for wireless clients. It then forwards packets from wired to wireless and vice versa, as appropriate.

Although many PC hardware configurations and Linux software distribution could undoubtably be used, details are provided below based on our specific AP setup.

Our AP has been tested with a SiS 900 100M fast Ethernet PCI adapter and prism GT-based wireless PCI adapter. The Linux distribution tested include SUSE (Novell) Linux release 9.0/9.1/9.2/10.0 where the kernel version can be either 2.4.x or 2.6.x. The wireless network interface card tested is Allnet ALL0271 54Mbit Wireless PCI adapter, which is built on the prism GT chipset. The following steps describe how to build a wireless HOST AP within SUSE Linux operating system.

The first two steps are similar to the first two steps for setting up a wireless sniffer. They are repeated here briefly to make this list complete, but details are omitted.

  1. Install the SUSE Linux system with the prism GT PCI card in the PC.

  2. Update the prism driver (prism54 kernel module) to the latest version.

  3. Create an interface configuration file for the wired adaptor.

    Before configuring the wireless adaptor, the interface configuration file that will be used to bring wired interface up needs to be modified. For SUSE Linux, the configuration tool yast2 can be used, or the configuration file can be manually modified under the default location /etc/sysconfig/network/ifcft-eth0 (assuming the wired Ethernet adaptor is eth0). There are few lines that need to be changed:

       BOOTPROTO='dhcp'
       STARTMODE='auto'
       USERCONTROL='no'
    

  4. Create an interface configuration file for the wireless adaptor.

    After the prism54 module is installed, modify the interface configure file that will be used to bring the interface up. For SUSE Linux, use either the configure tool yast2, or manually modify the configuration file under the default location /etc/sysconfig/network/ifcfg-eth1, assuming the wireless adaptor is eth1. There are few lines that need to be changed:

        BOOTPROTO='static'
        STARTMODE='auto'
        IPADDR='192.168.2.1'
        NETMASK='255.255.255.0'
        ONBOOT='no' 
        WIRELESS='yes'
        WIRELESS_MODE='Master' 
        WIRELESS_ESSID='WPI-Testing'
    

    Applying sudo ifup eth1 will bring the interface up in the master mode, allowing it to function as an access point.

  5. Configure DHCPD.

    The Dynamic Host Configuration Protocol enables individual computers on an IP network to extract their configurations from a DHCP server, reducing the cost of administering IP configuration manually. DHCPD is the server (daemon) used by Linux. The Host AP uses DHCPD to automatically configure IP addressing for the wireless clients that associate with it so that the clients do not need to be manually configured.

    DHCPD is easy to configure by modifying its configuration file /etc/dhcpd.conf. Instead of providing a step-by-step instruction guide, an example configuration file is given in this section with comments embedded to act as a guide. For a more in-depth guide to configuring DHCPD, refer to the DHCP mini-HOWTO

    	# Sample /etc/dhcpd.conf 
    	# Set DHCPD to answer requests on the wireless interface 
    	DHCPDARGS=eth1; 
    	
    	# Set some defaults for lease time and DNS update method 
    	ddns-update-style ad-hoc; 
    	default-lease-time 600; 
    	max-lease-time 7200; 
    
    	# Set the subnet mask for the wireless IP network 
    	option subnet-mask 255.255.255.0; 
    
    	# Set the router address, this will be 192.168.2.1, the address 
    	# of the wireless interface eth1 
    	option routers 192.168.2.1; 
    
    	# Set the default domain name for clients on this network. 
    	# i.e. the DNS domain assigned by the wireless administrator. 
    	option domain-name "fsl.cs.wpi.edu"; 
    
    	# Allocate a network range for dynamic IP addresses to 
            # hand out to clients. Again, this range will be among 
            # 192.168.2.x, depending upon the network allocated 
    	# by the wireless administrator. 
    	subnet 192.168.2.0 netmask 255.255.255.0 { 
        		range 192.168.2.2  192.168.2.20; 
    	}
    

    After saving the changes to /etc/dhcpd.conf, execute the command sudo service dhcpd start and verify it loads properly. If there are any failure messages, typically they will indicate a hint on where the syntax problem may be.

    If a firewall is enabled on the Linux box, it is necessary to modify the firewall settings to make DHCPD service available. For SUSE Linux, yast2 can be used to configure the firewall. It may be advisable to simply shut down the firewall during early stages of testing in order to eliminate it as one source of configuration problems.

  6. Share the connection.

    There are many ways to share the connection between the wired and wireless adaptors. One solution is to use iptables, and an example is provided here. The example configuration file below can be modified as appropriate, using the embedded comments as a guide. In this case, lines beginning with a "#" are comments.

    For our system, the iptable script is kept in /etc/rc.d/rc.local.

    	# Activate ip_forward
    	echo 1 > /proc/sys/net/ipv4/ip_forward
    	# Delete current iptable rules
    	/sbin/iptables -P INPUT ACCEPT
    	/sbin/iptables -F INPUT 
    	/sbin/iptables -P OUTPUT ACCEPT
    	/sbin/iptables -F OUTPUT 
    	/sbin/iptables -P FORWARD DROP
    	/sbin/iptables -F FORWARD 
    	/sbin/iptables -t nat -F
    	# Apply new rules
    	/sbin/iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
    	/sbin/iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
    	/sbin/iptables -A FORWARD -j LOG
    	/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    

    After saving the file to /etc/rc.d/rc.local, the command sudo /etc/rc.d/rc.local must be executed to enable the connection between the two adaptors.

After carefully following the above steps, the Host AP should be setup. Running ifconfig eth1 and iwconfig eth1 can help check its working status. The Host AP does not support WEP or WPA, but it is relatively easy to support WEP by modifying the wireless card configuration file /etc/sysconfig/network/if-eth1.cfg. Supporting WPA may be similarly easy, but has not been tested on our Host AP.

About this document ...

Host AP by Example
How to Build an IEEE 802.11 Wireless Host Access Point

This document was generated using the LaTeX2HTML translator Version 99.2beta8 (1.43)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -local_icon -dir html whostap

The translation was initiated by on 2005-12-15


next_inactive up previous
2005-12-15