#411 Enabling mDNS resolution on Workstation by default
Closed: Fixed 2 months ago by catanzaro. Opened 4 months ago by lorbus.

Hi there,
on my Fedora machines, I usually configure the following:

Edit /etc/systemd/resolved.conf to resolve .local addresses:

[Resolve]
...
MulticastDNS=yes

Create /etc/NetworkManager/conf.d to enable mDNS resolution on network interfaces (I guess ideally this should only be set on "trusted" networks):

[connection]
connection.mdns=1

This has e.g. the benefit of enabling auto-discovery of IPP printers. It also helps in general when dealing with .local hosts.

That config also a prerequisite for auto-discovery of Pulse Zeroconf and Airplay audio sinks in Pipewire with the zeroconf-discover and raop-discover modules, which can be enabled with the following config:

Edit /etc/pipewire/pipewire.conf:

context.modules = [
    ...

    # Use zeroconf to detect and load module-raop-sink
    { name = libpipewire-module-raop-discover }

    # Use zeroconf to detect and load module-pulse-tunnel
    { name = libpipewire-module-zeroconf-discover }
]

I found some prior art related to this on the wiki from roughly a decade ago:
- https://fedoraproject.org/wiki/Desktop/Whiteboards/AvahiDefault
- https://fedoraproject.org/wiki/Features/AvahiDefaultOnDesktop

I'd like to re-start the discussion on this, in order to hopefully find a way to make Fedora Workstation more ergonomic by default. Any thoughts?


If you have a proposal of how to do it entirely with drop-ins, this is something that could be adopted in both Fedora Workstation and Fedora KDE, and people can easily opt-out by uninstalling a package.

Good point. Both the resolved and NM configs could be shipped as dropins.

The pipewire config change could also be done as a drop-on, but I wouldn't scope this in for now.

We have mDNS disabled in systemd-resolved because users report that it breaks avahi, and we know avahi actually works. I went looking for a bug reference for this, but all I found was this note which isn't sufficient to explain what was wrong with using MulticastDNS=yes. So this would need to be investigated.

Interesting. I haven't had any issues with this config and using avahi to resolve services. Not sure about using avahi to announce services in this case, though.

So mDNS resolution should be enabled via avahi. Results should be returned by nss-mdns4_minimal.

Is it really not working for you? What does your Hosts line look like in /etc/nsswitch.conf?

I don't think we're expecting to let systemd-resolved handle mDNS in the near future. Let's make sure avahi works.

Metadata Update from @ngompa:
- Issue tagged with: experience

3 months ago

I don't think there's any policy decision before the Working Group here. We expect mDNS resolution should already work out of the box via avahi, and any failures there should be considered bugs in avahi. Please reopen if I've misunderstood or if you need a decision from us.

Metadata Update from @catanzaro:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 months ago

Login to comment on this ticket.

Metadata