AP FC8
From M1Research
(Difference between revisions)
Line 38: | Line 38: | ||
** bind, bind-chroot | ** bind, bind-chroot | ||
** bridge-utils | ** bridge-utils | ||
- | * download to <code>/usr/local/src</code> http://madwifi.org/ madwifi] driver and [http://hostap.epitest.fi/hostapd/ hostapd] source code: | + | * download to <code>/usr/local/src</code> [http://madwifi.org/ madwifi] driver and [http://hostap.epitest.fi/hostapd/ hostapd] source code: |
** <code>madwifi-0.9.4.tar.gz</code> | ** <code>madwifi-0.9.4.tar.gz</code> | ||
** <code>hostapd-0.6.3.tar.gz</code> | ** <code>hostapd-0.6.3.tar.gz</code> | ||
Line 58: | Line 58: | ||
make[1]: Leaving directory `/usr/local/src/madwifi-0.9.4/tools' | make[1]: Leaving directory `/usr/local/src/madwifi-0.9.4/tools' | ||
[root@dev-1 madwifi-0.9.4]# make install</pre> | [root@dev-1 madwifi-0.9.4]# make install</pre> | ||
+ | |||
+ | Remove old <b><code>ath5k</code></b> driver:<pre>[root@dev-1 madwifi-0.9.4]# rm -f -r -d /lib/modules/2.6.25.9-40.fc8/kernel/drivers/net/wireless/ath5k | ||
+ | [root@dev-1 madwifi-0.9.4]# depmod -a</pre> | ||
+ | |||
+ | Check <code>/etc/modprobe.conf</code> contains correct options for new driver and <code>wlan0</code> associated with <code>ath_pci</code> driver:<pre>alias eth0 e100 | ||
+ | alias eth0 eth1 | ||
+ | #alias wlan0 ath5k | ||
+ | alias wlan0 ath_pci | ||
+ | options ath_pci autocreate=ap | ||
+ | alias scsi_hostadapter libata | ||
+ | alias scsi_hostadapter1 ata_piix</pre> | ||
+ | |||
+ | ==Network configuration== | ||
+ | |||
+ | Setup ethernet adaptor <code>eth0</code> for WAN interface and bridge (eth1 + wlan0) for local network. | ||
+ | |||
+ | <code>/etc/sysconfig/network-scripts/ifcfg-br0</code><pre>DEVICE=br0 | ||
+ | TYPE=Bridge | ||
+ | BOOTPROTO=static | ||
+ | IPADDR=192.168.1.1 | ||
+ | NETMASK=255.255.255.0 | ||
+ | ONBOOT=yes | ||
+ | DELAY=0 | ||
+ | STP=off</pre> | ||
+ | |||
+ | <code>/etc/sysconfig/network-scripts/ifcfg-eth0</code><pre>DEVICE=eth0 | ||
+ | BOOTPROTO=static | ||
+ | BROADCAST=10.1.255.255 | ||
+ | IPADDR=10.1.5.190 | ||
+ | NETMASK=255.255.0.0 | ||
+ | NETWORK=10.1.0.0 | ||
+ | ONBOOT=yes</pre> | ||
+ | |||
+ | <code>/etc/sysconfig/network-scripts/ifcfg-eth1</code><pre>DEVICE=eth1 | ||
+ | TYPE=ETHER | ||
+ | BRIDGE=br0 | ||
+ | ONBOOT=yes</pre> | ||
+ | |||
+ | <code>/etc/sysconfig/network-scripts/ifcfg-wlan0</code><pre>DEVICE=wlan0 | ||
+ | BRIDGE=br0 | ||
+ | ONBOOT=yes | ||
+ | MODE=master | ||
+ | ESSID="home-home"</pre> | ||
+ | |||
+ | Please note that our AP network <b>ESSID</b> we setted to <i>home-home</i>. |
Revision as of 09:33, 12 July 2008
Contents |
WiFi Hardware
As we are going build WPA protected Access Point it's required authorization daemon supports our hardware. Authorization software based on hostapd. As seen from hostapd's home page it support chipsets/drivers:
- Host AP driver for Prism2/2.5/3
- madwifi (Atheros ar521x)
- Prism54.org (Prism GT/Duette/Indigo)
After some research on our local PC components market we choose D-link DWA-520 that is Atheros chipset based:
[root@dev-1 ~]# lspci -vvv --skipped-- 01:0b.0 Ethernet controller: Atheros Communications, Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01) Subsystem: D-Link System Inc Unknown device 3a73 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 23 Region 0: Memory at ff8f0000 (32-bit, non-prefetchable) [size=64K] Capabilities: [44] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=2 PME- Kernel driver in use: ath_pci Kernel modules: ath_pci --skipped--
and supported by madwifi drivers.
Generic Installation
Generic installation steps:
- install WiFi pci board
- install additional ethernet adapter (we want 2 adapters: 1st WAN, 2nd LOCAL LAN)
- install minimal Fedora Core 8 installation
- update all installed Fedora packeges
- install required packages for building madwifi drivers and hostapd:
- gcc
- openssl-devel
- kernel package development (in my case kernel-devel-2.6.25.9-40.fc8)
- dhcp
- bind, bind-chroot
- bridge-utils
- download to
/usr/local/src
madwifi driver and hostapd source code:-
madwifi-0.9.4.tar.gz
-
hostapd-0.6.3.tar.gz
-
Building/configuring driver
Unpack madwifi-0.9.4.tar.gz
to /usr/local/src
:
[root@dev-1 ~]# cd /usr/local/src [root@dev-1 src]# gzip -cd madwifi-0.9.4.tar.gz | tar xf -Goto source code directory, build and install:
[root@dev-1 src]# cd madwifi-0.9.4 [root@dev-1 madwifi-0.9.4]# make Checking requirements... ok. Checking kernel configuration... ok. make -C /lib/modules/2.6.25.9-40.fc8/build SUBDIRS=/usr/local/src/madwifi-0.9.4 modules make[1]: Entering directory `/usr/src/kernels/2.6.25.9-40.fc8-i686' CC [M] /usr/local/src/madwifi-0.9.4/ath/if_ath.o --skipped-- gcc -o ath_info -g -O2 -Wall ath_info.c make[1]: Leaving directory `/usr/local/src/madwifi-0.9.4/tools' [root@dev-1 madwifi-0.9.4]# make installRemove old
ath5k
driver:[root@dev-1 madwifi-0.9.4]# rm -f -r -d /lib/modules/2.6.25.9-40.fc8/kernel/drivers/net/wireless/ath5k [root@dev-1 madwifi-0.9.4]# depmod -aCheck
/etc/modprobe.conf
contains correct options for new driver and wlan0
associated with ath_pci
driver:alias eth0 e100 alias eth0 eth1 #alias wlan0 ath5k alias wlan0 ath_pci options ath_pci autocreate=ap alias scsi_hostadapter libata alias scsi_hostadapter1 ata_piix
Network configuration
Setup ethernet adaptor eth0
for WAN interface and bridge (eth1 + wlan0) for local network.
/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0 TYPE=Bridge BOOTPROTO=static IPADDR=192.168.1.1 NETMASK=255.255.255.0 ONBOOT=yes DELAY=0 STP=off
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 BOOTPROTO=static BROADCAST=10.1.255.255 IPADDR=10.1.5.190 NETMASK=255.255.0.0 NETWORK=10.1.0.0 ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 TYPE=ETHER BRIDGE=br0 ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-wlan0
DEVICE=wlan0 BRIDGE=br0 ONBOOT=yes MODE=master ESSID="home-home"
Please note that our AP network ESSID we setted to home-home.