Post by Sven KÃ¶hler
I want to replace nss-mdns with systemd-resolved. However, I am using
NetworkManager, not systemd-networkd. NetworkManager is configured to
pass all DNS-related information to systemd-resolved.
Unlike networkd, NetworkManager does currently not allow to configure
the per-link MulticastDNS setting. Also, resolved.conf doesn't allow to
change the default of the per-link MulticastDNS setting. Since the
default is "no", MulticastDNS is essentially disabled for all links.
Is NetworkManager expected to configure the per-link settings?
Are you thinking about adding a way to change the per-link defaults?
NM only knows about the DNS information it receives from upstream
servers or that's statically configured. It doesn't do anything with
mDNS because that's not something that's provided by your DHCP server
or IPv6 router.
But systemd-resolved provides a full-featured D-Bus interface (which is
actually how NM sends the info to resolved) which you can easily use to
poke the setting, in combination with NM "dispatcher" scripts that run
whenever a link goes up or down or changes. This is the entire point
of "dispatcher" scripts, to run custom events of your choice that NM
doesn't need specific options for.
Drop a small dispatcher script (see 'man NetworkManager' for details)
into /etc/NetworkManager/dispatcher.d which does something like:
if [ "$2" != "up" -a "$2" != "dhcp4-change" ]; then
dbus-send --system --print-reply --dest=org.freedesktop.resolve1 \
Yeah, that gets run every time the interface comes up, while it would
be better to just run that command when the interface is first known to
the kernel. You could do that with udev rules pretty easily too. But
doing it with NM dispatcher scripts allows you to control *which*
networks you want this enabled for, so that you can do it for your home
network but not a coffee shop (using the CONNECTION_UUID environment
Post by Sven KÃ¶hler
Running networkd just to configure the per-link settings seems
redundant, but how would I configure networkd, so that it gets along
systemd-devel mailing list