No DNS when using systemd-networkd


I’m using systemd-networkd and a dhcp configuration according to the wiki.

I also removed connman as described. I’m getting an IP-address from the DHCP server. But the DNS is not set in resolv.conf.
When I use udhcpc from the commandline everything is working fine. Any idea why the DNS is not set when using systemd-networkd?


Looks like systemd-resolv exports the legacy resolv.conf file only in /run/systemd/resolve/resolv.conf.
If you want to use /etc/resolv.conf created from systemd-resolv you would have to create a symlink to /run/systemd/resolve/resolv.conf.

To create it automatically you could create that ‘somewhere’ in OE during image build or you could execute something as the following on every boot or in a place run during first boot.

    [ -e /etc/resolv.conf ] || ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf


/run/systemd/resolve directory seems to be missing. I also don’t have the systemd-resolve.
Which recipe is providing systemd-resolve?

What image version are you using?

2.7b1 the console image. I’ve removed connman and added QT5.8 to this image. The rest should be the same as provided by Toradex.

I think you will need this commit in meta-angstrom. Then systemd-resolved and friends get built and deployed.

One way to do that is to update to 2.7b3.

Thanks Max. 2.7b3 works for me. I will update to this release.