Mender Server on a local network using mDNS with a board using systemd-networkd


I thought I would share this in case anyone else comes up against this problem. We were trying out the mender server with a local domain, say test.mender.local and using mDNS within systemd (not avahi) and we found that although we could resolve the address using

systemd-resolve test.mender.local

you couldn’t ping the address. The networkd configuration required mDNS turning on, this was our /etc/systemd/network/ configuration file:



What I found was that I had to install the resolve NSS plugin libnss-resolve that is part of the systemd package. In Yocto we used:

IMAGE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'libnss-resolve', '', d)}"

And then customise the nsswitch.conf to use it, ie have the resolve keyword in the hosts section, something like

hosts:          files resolve [!UNAVAIL=return] dns myhostname

and now it will use the resolve plugin and hence systemd to resolve addresses before trying other methods. Hopefully you should now be able to ping your local domain address.

1 Like