Skip to contentSkip to conversation

Can't connect to 8021x network

DISCUSSION Yuri D'Elia 2 participants 2 messages Mar 22, 2021

lore
Share & tools
lore
#0 lore raw

Hi everyone.

Recently my organization upgraded our APs to some Cisco C9115AXI-E from some older 3500I (also Cisco).

iwd used to be able to connect, but not anymore. I can still connect through wpa_supplicant, so I suspect an issue with iwd.

Configuration for the 8021x network is unchanged and as follows:

[Security]
EAP-Method=PEAP
EAP-Identity=a(a)b.c
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=a(a)b.c
EAP-PEAP-Phase2-Password=xyz

When connecting with IWD_TLS_DEBUG=1 iwd -d, I normally see this just after association:

src/station.c:station_enter_state() Old State: autoconnect_quick, new state: connecting src/scan.c:scan_cancel() Trying to cancel scan id 1 for wdev 1b src/wiphy.c:wiphy_radio_work_done() Work item 1 done src/wiphy.c:wiphy_radio_work_next() Starting work item 2 src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_mac_power_down_cb() Setting generated address on
ifindex: 17 to: 22:2b:50:4b:ad:a2
src/wiphy.c:wiphy_reg_notify() Notification of command Wiphy Reg Change(113) src/wiphy.c:wiphy_update_reg_domain() New reg domain country code for phy0 is IT src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/wiphy.c:wiphy_reg_notify() Notification of command Wiphy Reg Change(113) src/wiphy.c:wiphy_update_reg_domain() New reg domain country code for phy0 is XX src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_mlme_notify() MLME notification New Station(19) src/station.c:station_netdev_event() Associating src/netdev.c:netdev_mlme_notify() MLME notification Authenticate(37) src/netdev.c:netdev_authenticate_event() src/netdev.c:netdev_unicast_notify() Unicast notification 129 src/netdev.c:netdev_control_port_frame_event() src/netdev.c:netdev_mlme_notify() MLME notification Associate(38) src/netdev.c:netdev_associate_event()
src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_mlme_notify() MLME notification Connect(46) src/netdev.c:netdev_connect_event()
src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_link_notify() event 16 on ifindex 17 src/netdev.c:netdev_mlme_notify() MLME notification Notify CQM(64) src/station.c:station_handshake_event() Handshaking src/netdev.c:netdev_mlme_notify() MLME notification Unknown(139) src/netdev.c:netdev_unicast_notify() Unicast notification 129 src/netdev.c:netdev_control_port_frame_event()
4-Way handshake failed for ifindex: 17, reason: 15

I tried on iwd 1.12 and on the current master branch with the same results.

By comparison, this is what I get with wpasupplicant:

wpa_supplicant[2755]: wlan0: Associated with 4c:a6:4d:54:09:4c wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started wpa_supplicant[2755]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0 wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25 wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PEER-CERT depth=1
subject='x' hash=beb8efe9b1a73c841b375a90e5fff8048848e3a2af66f6c4dd7b938d6fe8c5d8 wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PEER-CERT depth=0
subject='x' hash=d0950f9a0ce38786be39d826d2398c02a4d3302cb9bb21e755f6e15fbf7fd248 wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:a wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:b wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:c wpa_supplicant[2755]: EAP-MSCHAPV2: Authentication succeeded wpa_supplicant[2755]: EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed wpa_supplicant[2755]: wlan0: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
wpa_supplicant[2755]: wlan0: PMKSA-CACHE-ADDED 4c:a6:4d:54:09:4c 0 wpa_supplicant[2755]: wlan0: WPA: Key negotiation completed with 4c:a6:4d:54:09:4c [PTK=CCMP GTK=CCMP]
wpa_supplicant[2755]: wlan0: CTRL-EVENT-CONNECTED - Connection to 4c:a6:4d:54:09:4c completed [id=0 id_str=]

#1 lore raw

Hi Yuri,

Quoted 8 lines · Yuri D'Elia

Hi everyone.

Recently my organization upgraded our APs to some Cisco C9115AXI-E from some older 3500I (also Cisco).

iwd used to be able to connect, but not anymore. I can still connect through wpa_supplicant, so I suspect an issue with iwd.

Quoted 9 lines

Configuration for the 8021x network is unchanged and as follows:

[Security]
EAP-Method=PEAP
EAP-Identity=a(a)b.c
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=a(a)b.c
EAP-PEAP-Phase2-Password=xyz

Looks good. But you're not validating the certificate, which is probably not great for security...

Quoted 2 lines

When connecting with IWD_TLS_DEBUG=1 iwd -d, I normally see this just after association:

Hmm, I would have actually expected a lot more output with IWD_TLS_DEBUG being enabled, but maybe it is not getting far enough.

<snip>

Quoted 5 lines

src/station.c:station_handshake_event() Handshaking src/netdev.c:netdev_mlme_notify() MLME notification Unknown(139) src/netdev.c:netdev_unicast_notify() Unicast notification 129 src/netdev.c:netdev_control_port_frame_event()
4-Way handshake failed for ifindex: 17, reason: 15

So AP sends us the first packet, but we time out some time later. Can you do two things:

1. Add the following to /etc/iwd/main.conf
[EAPoL]
MaxHandshakeTime=15

See if the handshake proceeds further. The default timeout is 5 seconds, so if the AP or RADIUS server is extremely slow things might time out. However, this is probably unlikely.

2. Send us or me privately an iwmon pcap trace of the first packet that the AP sends. Maybe it has something unexpected. See [1].

Regards,
-Denis

[1] https://iwd.wiki.kernel.org/debugging