hoping for some help debugging a systemd-networkd issue.
I have both systemd-networkd and wpa_supplicant.
I’ve enabled a “[email protected]” systemd unit that corresponds with an “/etc/wpa_supplicant/wpa_supplicant-wlan0.conf” config file. And I’ve added an “/etc/systemd/network/01-wlan0.network” config file with:
[Match]
Name=wlan0
SSID="foo"
[Network]
DHCP=yes
[DHCPv4]
ClientIdentifier=mac
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
For some reason when wlan0 doesnt gain ipv4 via systemd-networkd. However. if I run 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?