Ok. So here is everything I had to do to build my access point on the DWL520 Rev A.
Now the DWL520+ Rev A Uses the Atheros AR5212 Chipset. Atheros is famous for FirmWare that supports both Master and Managed modes of wireless.
Now what to remember is that I already have installed the madwifi drivers and wireless tools to get my card working. You can get the latest MadWiFi drivers from
http://sourceforge.net/projects/madwifi/ and the latest wireless-tool from
http://www.hpl.hp.com/personal/Jean_...nux/Tools.html
Also another thing to remember is that the devices referred to in this howto are the names used on my system. Yours may be different. So use your device names as you do this on your system.
----------------------
First I brought down my interface with the ifconfig command:
LetsHaveAWar:~# ifconfig ath0 0.0.0.0 down
Next I checked to see what mode my Wireless interface was in by using the iwconfig utility. On my system the wireless device is refered to as "ath0".
This gave me the following result:
LetsHaveAWar:~# iwconfig ath0
ath0 IEEE 802.11g ESSID:
Mode: Managed Frequency: 0 GHz Access Point: 00:00:00:00:00:00
Bit Rate: 0 kb/s Tx-Power: 18 dBm Sensitivity=0/3
Retry: off RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid: 780 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0
Now if you see under "Mode:" it says "Managed". Now with a managed card we are not going to get very far in making an access point. So now lets destroy this interface and start over from new. This is where the Wireless-Tools come in...
Now what we do is "destroy" our wireless interface. Dont worry its essayer that it sounds.
essayer:~# wlanconfig ath0 destroy
LetsHaveAWar:~#
Now lets create a new device for our Wireless Access Point.
What we will do is acually "create" the interface into a different mode. Heres how that is done.
LetsHaveAWar:~# wlanconfig ath create wlandev wifi0 wlanmode ap
ath0
LetsHaveAWar:~#
Up above we see that we have created the wireless interface ath0. You see in that command where I put "wifi0" that is the actuall device that my wireless interface uses. ath0 is built on top of this. To find yours uses the ifconfig command at the command line.
Now if we look at "iwconfig ath0" again...
LetsHaveAWar:~# iwconfig ath0
ath0 IEEE 802.11g ESSID:
Mode: Master Frequency: 0 GHz Access Point: 00:00:00:00:00:00
Bit Rate: 0 kb/s Tx-Power: 18 dBm Sensitivity=0/3
Retry: off RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid: 780 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0
Now we are in Master mode. One step closer.
the next thing we are gonna want to do is install dhcpd if it is not yet installed. On my system I use "Debian Sarge 2.1RC4" with the "Linux GNU 2.6.8" kernel. So to install dhcpd I typed:
LetsHaveAWar:~# apt-get install dhcpd
LetsHaveAWar:~#
Along it goes installing. Done Yay. Now time to edit our configurations. In /etc you will find a file named "dhcpd.conf" I used pico to edit this file.
LetsHaveAWar:~# pico /etc/dhcpd.conf
I commented out all the lines in the example and made my own. I'll paste my configuration for you and explain a little about the settings.
# Setting for DHCPD to answer requests on Ath0
# Defaults for lease time on wireless network
# You can set these times to whatever you would like
default-lease-time 600;
max-lease-time 7200;
# Subnet Mask For Wireless Network
option subnet-mask 255.255.255.0;
# Broadcast Address For Wireless Network
option broadcast-address 192.168.2.255;
# Wireless Interfaces Address
# This is the actuall IP address of your Wireless AccessPoint
# You will need to remember this number to bring
# up your wireless network.
option routers 192.168.2.1;
# Name Server Address
# If you do not have your own DNS server installed on your
# system use the "DNS Servers" provided to you by
# Your ISP. Otherweis you set these to the values of your
# DNS Servers Ip Address.
option domain-name-servers 192.168.1.118, 192.168.2.213, 10.3.1.28, 192.168.0.118;
# Default Domain Name For Clients On Wireless Network
# This option is not required unless you have a
# Domain and the subnet is accessible to the rest
# of the "outside" network.
#option domain-name "ab.hsia.telus.net";
# Wireless network IP Range
# This is the working IP Range of your wireless network
# You shouldnt need more than 5 - 10 address's. A good
# Rule of thumb when it comes to setting your IP Range
# is to double the amount of address's that you need
# to establish your range.
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.10 192.168.2.15;
}
LetsHaveAWar:~#
In my configuration I decided to go with a subnet of 192.168.2.0 . So now lets set up Ip Forwarding for our new wireless network. This command would be...
LetsHaveAWar:~# sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
LestHaveAWar:~#
And just to make sure that that option is set to 1 (On) we type
LetsHaveAWar:~# cat /proc/sys/net/ipv4/ip_forward
1
LestHaveAWar:~#
Notice the returned "1" on its own line. That means "ON". So far So Good.
Now to enable NAT in iptables. Now this HowTo is assuming you do not have any firewall front ends or other firewalls running other than "iptables" For Directions on setting up nat POSTROUTING in any other you would have to consult the documentation for those specific firewalls.
So lets setup nat routing in iptables. Here are the commands that I used.
LestHaveAWar:~# iptables -I INPUT -p all -m state --state ESTABLISHED,RELATED -j ACCEPT
LetsHaveAWar:~# iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
LetsHaveAWar:~#
Again I will state that in my iptables I have just a basic set of rules and no other firewall front ends/systems running, and of course "eth0" refers to the wired card that is connected to the outside network.
So now what is left to do. We have the card setup in "MASTER" mode, We have "dhcpd" installed and configured, we have setup "Ip Forwarding", and we have taken care of the "nat routing" in "iptables". Oh yes. We have to give our network an ssid. The ssid is a defining word for your network. For this howto mine it is "MyNetwork" but you can set yours to whatever you like.
LetsHaveAWar:~# iwconfig ath0 essid MyNetwork
LetsHaveAWar:~#
So lets bring up our interface. Do you remember the "router address" we set in our dhcpd.conf. Cause you do need that Ip Address. For me it was 192.168.2.1 so in that case the command I used was.
LetsHaveAWar:~# ifconfig ath0 192.168.2.1 up
LetsHaveAWar:~#
Now lets make sure that we are running. Lets look at iwconfig again.
LetsHaveAWar:~# iwconfig ath0
ath0 IEEE 802.11g ESSID:"MyNetwork"
Mode: Master Frequency: 2.417 GHz Access Point: 00:0F:3D:AD:B8:52
Bit Rate: 0 kb/s Tx-Power: 18 dBm Sensitivity=0/3
Retry: off RTS thr: off Fragment thr: off
Encryption key: off
Power Management: off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid: 788 Rx invalid crypt: 0 Rx invalid frag: 0
Tx excessive retries: 0 Invalid misc: 0 Missed beacon: 0
LetsHaveAWar:~#
Now notice how we have ESSID as "MyNetwork", our mode is "Master" and we have something else that we didnt before... "Access Point: 00:0F:3D:AD:B8:52" Now one last step...
LetsHaveAWar:~# dhcpd ath0
Internet Software Consortium DHCP Server 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.
Please contribute if you find this software useful.
For info, please visit
http://www.isc.org/dhcp-contrib.html
Listening on LPF/ath0/00:0f:3d:ad:b8:52/192.168.2.0
Sending on LPF/ath0/00:0f:3d:ad:b8:52/192.168.2.0
LetsHaveAWar:~#
Done. Thats all there was too it. I would like to thank everyone that has helped me in getting my Wireless AccessPoint running and going. And of course encourage anyone else to spread some of their wisdom on this subject. Another way or a better way. Thanks to the guys here on LinuxQuestions and #Linux on the DALnet IRC Network irc.dal.net for all their help.