wpa_supplicant on bonding slave

Brian J. Murrell brian
Fri Jan 30 17:50:21 PST 2009


Wow.  The subject makes it almost sound like this should be in the 
alt.bdsm newsgroup or something but it really is about wpa_supplicant on 
Linux, honest.  :-)

Anyway, I'm trying to set up a bonded interface with both a wired 
ethernet and wireless ethernet interfaces as slaves.  The wireless 
interface requires I authenticate with WPA, hence wpa_supplicant.

I have configured wpa_supplicant successfully when the interface is not a 
bonding slave and it works great.  But as soon as I try to move that 
configuration to the slave wireless interface for whatever reason the 
wireless fails to maintain a connection to the router.

For reference, here is my (going to get debian/ubuntu specific here, so 
please bear with me but I'm confident this would be the same should I 
bring up the interface manually with the same configuration) bond0 
definition in /etc/network/interfaces:

auto bond0
iface bond0 inet dhcp
  post-up ifenslave bond0 eth0 eth2
  post-up echo ?eth0? > /sys/class/net/bond0/bonding/primary
  pre-down ifenslave -d bond0 eth0 eth2
  wpa-ssid ilinx_wpa
  wpa-psk abc...
  wpa-iface eth2

where eth0 is the wired interface and eth2 is the wireless.

This successfully starts up wpa_supplicant as follows:

/sbin/wpa_supplicant -B -P /var/run/wpa_supplicant.eth2.pid -i eth2 -D 
wext -C /var/run/wpa_supplicant

and this bond0 works just fine when eth0 is being the "primary" interface.

But on to the wpa_supplicant part...

When I connect to the supplicant with wpa_cli this is what I see it doing 
(with debug level set to 2 -- anything higher seems to disable debug at 
all):

<1>Setting scan request: 0 sec 100000 usec
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:12:17:41:37:c8 (SSID='ilinx_wpa' freq=2437 MHz)
<1>Cancelling scan request
<1>RSN: using IEEE 802.11i/D9.0
<1>WPA: using GTK TKIP
<1>WPA: using PTK CCMP
<1>WPA: using KEY_MGMT WPA-PSK
<1>Setting authentication timeout: 10 sec 0 usec
<1>Associated to a new BSS: BSSID=00:12:17:41:37:c8
<2>Associated with 00:12:17:41:37:c8
<1>Setting authentication timeout: 10 sec 0 usec
<1>Cancelling scan request
<1>Setting scan request: 0 sec 100000 usec
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:12:17:41:37:c8 (SSID='ilinx_wpa' freq=2437 MHz)
<1>Cancelling scan request
<1>RSN: using IEEE 802.11i/D9.0
<1>WPA: using GTK TKIP
<1>WPA: using PTK CCMP
<1>WPA: using KEY_MGMT WPA-PSK
<1>Setting authentication timeout: 10 sec 0 usec
<1>Associated to a new BSS: BSSID=00:12:17:41:37:c8
<2>Associated with 00:12:17:41:37:c8
<1>Setting authentication timeout: 10 sec 0 usec
<1>Cancelling scan request
<1>Setting scan request: 0 sec 100000 usec
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:12:17:41:37:c8 (SSID='ilinx_wpa' freq=2437 MHz)
<1>Cancelling scan request
<1>RSN: using IEEE 802.11i/D9.0
<1>WPA: using GTK TKIP
<1>WPA: using PTK CCMP
<1>WPA: using KEY_MGMT WPA-PSK
<1>Setting authentication timeout: 10 sec 0 usec
<1>Associated to a new BSS: BSSID=00:12:17:41:37:c8
<2>Associated with 00:12:17:41:37:c8
<1>Setting authentication timeout: 10 sec 0 usec
<1>Cancelling scan request
<1>Setting scan request: 0 sec 100000 usec
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:12:17:41:37:c8 (SSID='ilinx_wpa' freq=2437 MHz)
<1>Cancelling scan request
<1>RSN: using IEEE 802.11i/D9.0
<1>WPA: using GTK TKIP
<1>WPA: using PTK CCMP
<1>WPA: using KEY_MGMT WPA-PSK
<1>Setting authentication timeout: 10 sec 0 usec
<1>Associated to a new BSS: BSSID=00:12:17:41:37:c8
<2>Associated with 00:12:17:41:37:c8
<1>Setting authentication timeout: 10 sec 0 usec
<1>Cancelling scan request
<1>Setting scan request: 0 sec 100000 usec
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
<2>Trying to associate with 00:12:17:41:37:c8 (SSID='ilinx_wpa' freq=2437 MHz)
<1>Cancelling scan request

and so and so on.  A "status" at a random time shows:

bssid=00:12:17:41:37:c8
ssid=ilinx_wpa
id=0
pairwise_cipher=CCMPbssid=00:12:17:41:37:c8
ssid=ilinx_wpa
id=0
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=ASSOCIATED

group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=ASSOCIATED

Which to my untrained eye looks like WPA negotiation succeeds but then
for whatever reason it gets disconnected/disassociated.  No idea why
though.

Any ideas as to how to figure this out?

Thanx,
b.




More information about the Hostap mailing list