Michael Biebl wrote: > b/ enabling mDNS functionality globally (i.e. having MulticastDNS=yes > as default in /etc/systemd/resolved.conf) does not mean it will work > out of the box. One has to enable it explicitly "per link" as well. > If you are using networkd, you can achieve that by setting > "MulticastDNS=yes" [1] (the default being no). NetworkManager has a > similar switch, and ifupdown has no equivalent config option. > > > It is thus incorrect to say, that by building resolved with "- > Ddefault-mdns=yes" it would work out of the box. It will always > require explicit configuration anyway.
It seems that at least NetworkManager defaults to enabling mdns if it's enabled in resolved. My experience has been that local hostname resolution does not work out of the box with Avahi if you have IPv6 connectivity. Installing systemd-resolved and disabling Avahi makes it work with no other changes under NetworkManager. The issue with Avahi is that it often unpredictably changes the hostname to something else at least once on boot (this is without systemd-resolved being installed). Similar to #771806, though I haven't seen the constant repeating renames described there.