csfndz at live.com
Mon Mar 21 06:14:30 EDT 2011
Here is what I did using simulated WLAN with mac80211hwsim. Maybe
it serves as starting-point.
The problems I encountered I will comment in another mail, after
analyzing a bit more with the current head, because I was using
0.7.3 and git from Feb 16.
Before making hostapd the configuration has to be changed a bit,
beginning with the default. Copy defconfig to .config and modify
Do similar to make wpa_supplicant:
The config files to run the applications you find in the attached tgz-file.
The configuration changes with respect to the real hardware (on my
computer wlan0 is used by real WLAN, so instructions use wlan1 to 3).
Install vtun, if not present:
aptitude install vtun
Start vtun (to create and connect tap interfaces):
vtun -s -f vtund.server.conf
vtun -f vtund.client.conf conn1 127.0.0.1
ifconfig tap0 up
ifconfig tap1 up
Create and configure two bridges:
brctl addbr br0
brctl setfd br0 0
brctl addif tap0
ifconfig br0 192.168.168.101
ifconfig br0 up
brctl addbr br1
brctl setfd br1 0
brctl addif tap1
ifconfig br1 192.168.168.102
ifconfig br1 up
--> br0 and br1 should be connected now.
(The tap devices and vtun are needed because bridges cannot be connected directly.)
TODO: add test for bridges here
Start virtual wireless networking:
modprobe mac80211_hwsim radios=3
--> this will create 3 interfaces wlan[1:3]
(Starts with 1 if wlan0 is already used by PCI WLAN card.
adapt configuration and commands below if this is different.)
Mac addresses are 02:00:00:00:0x:00 with x = 0 to 2.
Make wireless traffic visible to sniffer:
ifconfig hwsim0 up
Adapt the following commands, to make sure you are using the newly built
versions of hostap and wpa_supplicant.
One will need some windows with shells to keep applications in foreground.
I use 5: two for the hostapds, one for the wpa_supplicant, one for wpa_cli,
one for a shell for iwconfig and test the connection.
Start the hostapd with config file for AP0 and AP1:
Verify if the APs are alive:
ifconfig wlan3 up
iwlist wlan3 scanning
--> two APs with ESSID "ft-psk" should appear on channel 1 and 2
~/hostap/wpa_supplicant/wpa_supplicant -Dnl80211 -iwlan3 -c wpasup.conf -d
--> should connect to one of the APs
Configure the STA interface:
ifconfig wlan3 192.168.168.103
ifconfig wlan3 up
TODO: add tests for overall connection here
Use sniffer with interface hwsim0 see all traffic on air.
Use sniffer with interface tap0 or tap1 see all traffic on "cable"
between the APs.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 804 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20110321/b5c5c763/attachment.obj
More information about the HostAP