Linux printing and network discovery expert providing live chat help

Joe B.

Reviewed for technical accuracy

Specialities: CUPS/IPP, Avahi & mDNS, systemd-resolved, cups-browsed, Ubuntu/Fedora/Arch

Fix Linux printer discovery — systemd-resolved vs Avahi, mDNS/DNS-SD, nss-mdns, CUPS & cups-browsed

Technician avatar Technician
Let’s get your network printers to show up again. A few details help me target the fix: Which distro (Ubuntu/Fedora/Arch/Debian)? Is systemd-resolved enabled? Do you run avahi-daemon with nss-mdns? And are you using pure IPP/Bonjour (DNS-SD/mDNS) discovery or cups-browsed on the client?
Customer
Fedora Workstation. After updates, Printers shows nothing. systemd-resolved is active. I do have Avahi installed, but I’m not sure about nss-mdns. Before, IPP printers (Bonjour/.local) appeared automatically.
Technician avatar Technician
Understood. On modern Linux, DNS-SD/mDNS (Bonjour/AirPrint) is what CUPS uses to discover printers. Most distros rely on Avahi for service discovery and nss-mdns to resolve .local hostnames. systemd-resolved can also handle mDNS, but CUPS’ DNS-SD support is designed to work with Avahi. If resolved and Avahi both try to manage mDNS, discovery can silently break (no IPP printers in the UI).
Customer
Makes sense. What should I check first to restore discovery?
Technician avatar Technician
Step 1 — Baseline for Avahi + CUPS
1) Ensure avahi-daemon is running and enabled. Install nss-mdns if missing.
2) In /etc/nsswitch.conf, the hosts line should include mdns or mdns4_minimal [NOTFOUND=return] before dns.
3) Verify CUPS is active: systemctl status cups. If you aggregate shared printers, enable cups-browsed.
4) Confirm firewall allows UDP 5353 (mDNS) on the interface (firewalld/ufw). Without it, discovery won’t cross the NIC.
Customer
Avahi is up. I didn’t have nss-mdns; I’ll add it. Do I need to disable mDNS in systemd-resolved?
Technician avatar Technician
Step 2 — Make resolved and Avahi play nicely
Option A (most reliable for CUPS): let Avahi handle DNS-SD/mDNS, keep systemd-resolved for normal DNS only.
• In /etc/systemd/resolved.conf or a drop-in /etc/systemd/resolved.conf.d/*.conf, set MulticastDNS=no (or remove any distro snippet that forces it on). Restart systemd-resolved.
• Ensure nsswitch.conf has mdns entries so Avahi can resolve .local.

Option B (advanced): run with MulticastDNS=yes in resolved and still use Avahi for service adverts, but avoid overlapping responders on the same interface. This is trickier and not necessary unless you have a specific need.
Customer
After disabling MulticastDNS in resolved and installing nss-mdns, do I need to tweak CUPS?
Technician avatar Technician
Step 3 — CUPS discovery settings
• If your server should advertise printers, enable sharing in CUPS (Web UI → Administration → Share printers or Browsing Yes in /etc/cups/cupsd.conf).
• On clients, cups-browsed can subscribe to mDNS/DNS-SD and auto-create local queues for the discovered IPP printers. Start and enable cups-browsed.service if you want that behavior.
• Restart cups.service after changes.
Customer
How can I test mDNS quickly to be sure it’s working before I re-add printers?
Technician avatar Technician
Step 4 — Verify mDNS/DNS-SD
• Use avahi-browse -rt _ipp._tcp or avahi-discover — you should see services from your printers (IPP/IPPS/AirPrint).
• Check resolvectl status to confirm MulticastDNS state per link (it should be no if Avahi is the sole responder), and verify the link is in the correct network zone for your firewall.
• From CUPS: lpinfo -v | grep -i ipp should list discovered IPP URIs when mDNS is healthy.
Customer
What about .local name resolution and VPNs or multiple NICs? Sometimes .local stops resolving.
Technician avatar Technician
Step 5 — .local resolution & multi-homing
• Ensure nss-mdns is in nsswitch.conf before dns.
• On VPNs, block or isolate UDP 5353 so remote mDNS doesn’t collide with local discovery. Keep mDNS only on LAN interfaces.
• If using NetworkManager, verify mDNS is enabled on the active connection profile. With systemd-networkd, set MulticastDNS=yes per link only if Avahi isn’t the responder.
• For mixed IPv4/IPv6, enable both in Avahi to avoid partial discovery.
Customer
After adjusting resolved and installing nss-mdns, avahi-browse sees my IPP printers. The GNOME Printers panel now lists them. Anything else before I call it fixed?
Technician avatar Technician
Final checks:
• Confirm only one mDNS responder is active (prefer Avahi) and firewall allows UDP 5353.
• If you run a print server, enable CUPS sharing (Browsing Yes) so clients discover it via DNS-SD.
• Optional: enable cups-browsed on clients for auto-created queues. Test with lpstat -e and print a test page via IPP.
Customer
Perfect — network discovery is back and printing works. Thanks for walking me through the Avahi/systemd-resolved setup!
Technician avatar Technician
Summary: When systemd-resolved breaks network print discovery, let Avahi own mDNS/DNS-SD (with nss-mdns), keep resolved for normal DNS, open UDP 5353, and ensure CUPS sharing/cups-browsed are configured. Need a distro-specific snippet or help with nsswitch.conf? Open the chat.

Quick answer: the accepted fix

Accepted fix when systemd-resolved breaks mDNS printer discovery: run avahi-daemon for DNS-SD/mDNS with nss-mdns; set MulticastDNS=no in resolved (or avoid overlapping responders); allow UDP 5353; restart CUPS and optionally enable cups-browsed to auto-create IPP queues.


Why discovery breaks: DNS-SD with Avahi, .local resolution, and CUPS

CUPS discovers printers via DNS-SD/mDNS (Bonjour). On most Linux systems, Avahi advertises and discovers these services, while nss-mdns resolves .local hostnames. If systemd-resolved also tries to handle mDNS, the two stacks can conflict and IPP devices vanish from dialogs. Standardizing on Avahi for service discovery restores IPP/IPPS printers reliably.

How to verify the Linux print stack is healthy

Check avahi-browse -rt _ipp._tcp for advertised printers, confirm lpinfo -v lists IPP URIs, and print a CUPS test page. On servers, enable Browsing Yes or sharing in the CUPS web UI so clients see your queues via DNS-SD. For client autoconfig, enable cups-browsed to subscribe to mDNS and create local queues.

Avahi & systemd-resolved — quick checklist

Bring back network printer discovery in minutes.

Install nss-mdns → enable avahi-daemon → set MulticastDNS=no in systemd-resolved (or avoid overlap) → open UDP 5353 → restart CUPS → optionally enable cups-browsed for auto-queues → verify with avahi-browse and lpinfo.

Disclaimer: This information is AI-generated and intended for general guidance only. For advice specific to your environment, please consult a verified expert on Whizz-Tech before making decisions.


Getting Started Is Easy

Ask for help, 24/7

Members enjoy round-the-clock access to experts in Linux printing, Avahi/mDNS, and CUPS configuration.

Expert will respond in minutes

We match you with an Expert who can fix DNS-SD/mDNS discovery, align Avahi and systemd-resolved, and restore IPP printing.

Save time & money

Avoid downtime and re-installs: a clean Avahi/CUPS setup brings back printers reliably.

FAQ

Why did printers disappear after a Linux update?

Updates may enable systemd-resolved mDNS or change nsswitch.conf, conflicting with Avahi. CUPS relies on DNS-SD via Avahi on most distros; when stacks overlap, discovery fails.

Do I need Avahi if systemd-resolved supports mDNS?

For CUPS printer discovery, keeping Avahi as the service discovery layer with nss-mdns is the most compatible route. Resolved can stay for standard DNS.

What firewall rule is required for printer discovery?

Allow UDP 5353 (mDNS) on the LAN interface so DNS-SD advertisements can be sent/received. Without it, IPP printers won’t appear.

Should I run cups-browsed?

cups-browsed subscribes to mDNS and can auto-create local queues for discovered printers — useful for fleets or multi-subnet environments.

Common Linux printer discovery problems and quick fixes
SymptomLikely causeQuick fix
No IPP printers appear mDNS conflict: resolved vs Avahi Let Avahi handle mDNS; set MulticastDNS=no in resolved; install nss-mdns
.local names don’t resolve Missing nss-mdns or bad nsswitch.conf Add mdns to hosts line; restart Avahi
Printers visible via avahi-browse, not in CUPS cups-browsed disabled Enable cups-browsed; restart CUPS
Discovery works only off-VPN mDNS blocked on VPN/multi-NIC Allow UDP 5353 on LAN; limit mDNS to local interfaces

Step-by-step (Linux desktop)

  1. Install nss-mdns; enable and start avahi-daemon.
  2. In /etc/nsswitch.conf, ensure mdns/mdns4_minimal [NOTFOUND=return] precedes dns on the hosts line.
  3. Set MulticastDNS=no in systemd-resolved (or avoid overlapping mDNS responders); restart it.
  4. Open UDP 5353 on the LAN zone; restart CUPS and optionally enable cups-browsed.

Notes for mixed environments

  1. Apple devices use Bonjour (mDNS/DNS-SD); once Avahi handles mDNS, Linux will discover AirPrint printers reliably.
  2. For Windows clients, sharing via IPP on CUPS works well; avoid WSD on the Linux side for consistency.

Sources

Matt Verified Icon
Matt ● replies in < 1 min
Technician Expert
⭐⭐⭐⭐⭐ Trusted by 27,000+ customers
Avatar
Alex · Expert's Assistant