You are not logged in.

#1 2021-04-09 20:34:58

mnussbaum
Member
Registered: 2017-03-09
Posts: 3

systemd-networkd connected, but no network connectivity

Hi there, I'm hoping for some help debugging a systemd-networkd issue. I have both systemd-networkd and wpa_supplicant running and apparently happy, but I don't have any internet connectivity, and I'm not sure why. I've enabled a "wpa_supplicant@wlan0.service" systemd unit that corresponds with an "/etc/wpa_supplicant/wpa_supplicant-wlan0.conf" config file. And I've added an "/etc/systemd/network/25-wireless.network" config file with:

[Match]
Name=wlan0

[Network]
DHCP=yes

And I've enabled the systemd-networkd systemd unit. When my device boots the wpa_supplicant@wlan0 service is in an active and successful state with the following logs:

Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
wlan0: Trying to associate with SSID '<my ssid>'
wlan0: Associated with 0c:80:63:91:3a:b2
wlan0: CTRL-EVENT-CONNECTED - Connection to 0c:80:63:91:3a:b2 completed [id=0 id_str=0]
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0

Similarly, systemd-networkd also appears to be running successfully with the following logs:

eth0: Link UP
wlan0: Link UP
wlan0: Gained carrier
wlan0: Connected WiFi access point: <my ssid> (0c:80:63:91:3a:b2)
wlan0: Gained IPv6LL

The output of "ip a" is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b8:27:eb:f4:51:52 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ba27:ebff:fea1:407/64 scope link
       valid_lft forever preferred_lft forever

And the output of "networkctl" is:

IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether no-carrier configuring
3 wlan0 wlan degraded unmanaged

I'm confused why the wlan0 connection is reported as degraded, and I'm wondering if the lack of an ipv4 address on the wlan0 interface in the "ip a" output is problematic, and if so how to resolve it. Thanks so much for your help!

*UPDATE*

It appears the manually running dhclient creates an ipv4 address for wlan0 and fixes network connectivity. Any idea why systemd-networkd's built-in DHCP client might be failing, or how I could debug it?

Last edited by mnussbaum (2021-04-09 21:07:33)

Offline

#2 2021-04-10 08:30:08

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: systemd-networkd connected, but no network connectivity

Let's see

networkctl status
journalctl -b -u systemd-networkd.service
journalctl -b -u wpa_supplicant-wlan0.service
journalctl -b -u systemd-resolved.service

EDIT: By the way, why is your device named wlan0? Did you disable predictable naming on purpose? Any chance that you also have iwd enabled?

Last edited by tucuxi (2021-04-10 16:41:54)

Offline

Board footer

Powered by FluxBB