hostapd and wpa_supplicant wired

Matthias Flittner matthias.flittner at kit.edu
Tue Jun 23 08:03:01 EDT 2015


Hi @ll,

I would like to set up a wifi testbed on only one host without a
wireless device. Therefore I created a bridge and assigned two tap
devices. After that I tried to set up a wired configuration of hostapd
and wpa_supplicant on this host. For this I used the following manual:
http://inl.info.ucl.ac.be/blogs/08-10-01-sample-configurations-hostapd-and-wpa-supplicant-make-it-work-wired-connection

Unfortunately it doesn't work.

It seems that hostapd is starting without a problem:
> $ sudo ./hostapd hostapd.conf -dd
> random: Trying to read entropy from /dev/random
> Configuration file: hostapd.conf
> Line 7: DEPRECATED: 'dump_file' configuration variable is not used anymore
> Opening raw packet socket for ifindex 22
> BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
> tap0: IEEE 802.11 Fetching hardware channel/rate support not supported.
> Completing interface initialization
> hostapd_setup_bss(hapd=0x1114d90 (tap0), first=1)
> tap0: Flushing old station entries
> tap0: Deauthenticate all stations
> Using interface tap0 with hwaddr d6:da:18:41:ce:fd and ssid ""
> TLS: Trusted root certificate(s) loaded
> tap0: interface state UNINITIALIZED->ENABLED
> tap0: AP-ENABLED 
> tap0: Setup of interface done.
> ctrl_iface not configured!
> random: Got 17/20 bytes from /dev/random
> random: Got 3/3 bytes from /dev/random


But wpa_supplicant isn't able to authenticate:

> $ sudo ./wpa_supplicant -itap1 -c./wpa_supplicant.conf -Dwired -dd -K
> wpa_supplicant v2.4
> random: Trying to read entropy from /dev/random
> Successfully initialized wpa_supplicant
> Initializing interface 'tap1' conf './wpa_supplicant.conf' driver 'wired' ctrl_interface 'N/A' bridge 'N/A'
> Configuration file './wpa_supplicant.conf' -> '/home/wlan/wpa_supplicant-2.4/wpa_supplicant/wpa_supplicant.conf'
> Reading configuration file '/home/wlan/wpa_supplicant-2.4/wpa_supplicant/wpa_supplicant.conf'
> ctrl_interface='/var/run/wpa_supplicant'
> ap_scan=0
> fast_reauth=1
> Line: 5 - start of a new network block
> ssid - hexdump_ascii(len=0):
> key_mgmt: 0x8
> eap methods - hexdump(len=16): 00 00 00 00 19 00 00 00 00 00 00 00 00 00 00 00
> phase2 - hexdump_ascii(len=13):
>      61 75 74 68 3d 4d 53 43 48 41 50 56 32            auth=MSCHAPV2   
> identity - hexdump_ascii(len=4):
>      74 65 73 74                                       test            
> password - hexdump_ascii(len=8):
>      70 61 73 73 77 6f 72 64                           password        
> ca_cert - hexdump_ascii(len=48):
>      2f 68 6f 6d 65 2f 73 74 61 63 6b 2f 77 6c 61 6e   /home/stack/wlan
>      2f 68 6f 73 74 61 70 64 2d 32 2e 34 2f 68 6f 73   /hostapd-2.4/hos
>      74 61 70 64 2f 63 61 2d 72 6f 6f 74 2e 70 65 6d   tapd/ca-root.pem
> Priority group 0
>    id=0 ssid=''
> wpa_driver_wired_init: Added multicast membership with packet socket
> Add interface tap1 to a new radio N/A
> tap1: Own MAC address: 6e:6e:2a:bd:02:1d
> tap1: RSN: flushing PMKID list in the driver
> tap1: Setting scan request: 0.100000 sec
> ENGINE: Loading dynamic engine
> ENGINE: Loading dynamic engine
> EAPOL: SUPP_PAE entering state DISCONNECTED
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: KEY_RX entering state NO_KEY_RECEIVE
> EAPOL: SUPP_BE entering state INITIALIZE
> EAP: EAP entering state DISABLED
> tap1: Added interface tap1
> tap1: State: DISCONNECTED -> DISCONNECTED
> EAPOL: External notification - EAP success=0
> EAPOL: External notification - EAP fail=0
> EAPOL: External notification - portControl=Auto
> tap1: Already associated with a configured network - generating associated event
> tap1: Event ASSOC (0) received
> tap1: Association info event
> tap1: State: DISCONNECTED -> ASSOCIATED
> tap1: Associated to a new BSS: BSSID=01:80:c2:00:00:03
> tap1: Select network based on association information
> tap1: Network configuration found for the current AP
> tap1: WPA: clearing AP WPA IE
> tap1: WPA: clearing AP RSN IE
> tap1: WPA: clearing own WPA/RSN IE
> tap1: Failed to get scan results
> EAPOL: External notification - EAP success=0
> EAPOL: External notification - EAP fail=0
> EAPOL: External notification - portControl=Auto
> tap1: Associated with 01:80:c2:00:00:03
> tap1: WPA: Association event - clear replay counter
> tap1: WPA: Clear old PTK
> EAPOL: External notification - portEnabled=0
> EAPOL: External notification - portValid=0
> EAPOL: External notification - portEnabled=1
> EAPOL: SUPP_PAE entering state CONNECTING
> EAPOL: SUPP_BE entering state IDLE
> EAP: EAP entering state INITIALIZE
> EAP: EAP entering state IDLE
> tap1: Cancelling scan request
> WMM AC: Missing IEs
> EAPOL: startWhen --> 0
> EAPOL: SUPP_PAE entering state CONNECTING
> EAPOL: txStart
> TX EAPOL: dst=01:80:c2:00:00:03
> TX EAPOL - hexdump(len=4): 01 01 00 00
> EAPOL: startWhen --> 0
> EAPOL: SUPP_PAE entering state CONNECTING
> EAPOL: txStart
> TX EAPOL: dst=01:80:c2:00:00:03
> TX EAPOL - hexdump(len=4): 01 01 00 00
> EAPOL: idleWhile --> 0
> EAP: EAP entering state FAILURE
> tap1: CTRL-EVENT-EAP-FAILURE EAP authentication failed
> EAPOL: SUPP_PAE entering state AUTHENTICATING
> EAPOL: SUPP_BE entering state FAIL
> EAPOL: SUPP_PAE entering state HELD
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: SUPP_BE entering state IDLE
> EAPOL authentication completed - result=FAILURE
> EAPOL: startWhen --> 0

Also in tcpdump / wireshark is nothing to see

I'd be glad to get a clue what is going wrong.

Thanks in advance!

Best regards,
        -FliTTi


More information about the HostAP mailing list