Linux: systemd-resolved Not Answering Multicast DNS

Abstract: Enable systemd-resolved to answer Multicast DNS queries by setting mdns=yes in resolved.conf and restarting the service.

Created: 2026-10-21 by
systemd-resolved does not answer Multicast DNS queries by default because the feature is disabled in its main configuration file. To enable mDNS support, you must edit the resolved.conf file and set the mdns=resolve option within the [Resolve] section. After saving the changes, restart the systemd-resolved service to apply the new settings immediately without needing a full system reboot.

Understanding systemd-resolved and Multicast DNS

When replacing traditional networking stacks like NetworkManager or avahi-daemon with a minimal setup relying on systemd-resolved, it is crucial to understand how name resolution is handled locally. Multicast DNS (mDNS) allows devices on a local network to discover each other using names ending in .local without a central DNS server. While systemd-resolved is powerful for managing standard DNS zones and stub resolvers, it treats mDNS as an optional capability rather than a core function.

The daemon includes built-in support for both resolving and answering mDNS queries, but this functionality is turned off out of the box to prevent conflicts with other services or unnecessary network traffic. If you have removed avahi-daemon and expect your system to respond to ping myhostname.local from other machines, you must explicitly configure systemd-resolved to take over this role. This approach simplifies the service landscape by removing redundant daemons, provided the configuration is correct.

Configuring the resolved.conf File

The primary configuration file for the resolver is located at /etc/systemd/resolved.conf. You will need root privileges to modify this file. Open the file using your preferred text editor, such as nano or vim.

sudo nano /etc/systemd/resolved.conf

Locate the [Resolve] section near the top of the file. You may see comments explaining various options, but the specific line for mDNS might be commented out or missing entirely. Add or modify the following line:

[Resolve]
mdns=resolve

The value resolve instructs the daemon to query the local link for mDNS records when a standard DNS lookup fails. If you also want your system to advertise its own hostname via mDNS so other devices can find it, you should use mdns=yes instead. The yes setting enables both resolving incoming queries and answering outgoing advertisements. For most cases where you simply want your machine to be discoverable, mdns=yes is the appropriate choice.

Distinguishing Between Resolve and Yes

It is important to distinguish between the two main modes available in the configuration. Setting mdns=resolve makes systemd-resolved act as a client that looks up .local addresses. It does not make the host itself respond to queries about its own name. Conversely, mdns=yes activates the server component, allowing the machine to announce its presence on the network. If your goal is to replace avahi-daemon completely, you likely need mdns=yes.

Applying Changes and Verifying Status

Once you have saved the configuration file, you must restart the systemd-resolved service for the changes to take effect. Unlike some configurations that require a reboot, this change is dynamic.

sudo systemctl restart systemd-resolved

After restarting, verify that the service has loaded the new configuration by checking its status. You can use the resolvectl command to inspect the current state of the resolver.

resolvectl status

Look for the mDNS column in the output. It should indicate that mDNS is enabled for the relevant network interfaces. If you are unsure which interface is active, check the output for the interface associated with your current network connection. Additionally, you can test if your system is responding to mDNS queries by running a ping command from another device on the same subnet:

ping -c 4 your-hostname.local

If the ping succeeds, the configuration is working correctly. If it fails, ensure that your firewall settings are not blocking UDP port 5353, which is used by mDNS traffic.

Troubleshooting Common Issues

Even with correct configuration, several factors can prevent mDNS from functioning as expected. First, verify that the network interface itself supports multicast. Some virtualized environments or restricted container setups may drop multicast packets unless explicitly configured otherwise.

Second, check for conflicts with other local name resolution services. Although you mentioned removing avahi-daemon, ensure that no residual configuration files remain in /etc/hosts or other resolver directories that might interfere. The systemd-resolved service uses a search domain list, and ensuring that .local is included in the Domains field in resolved.conf can sometimes help prioritize local lookups.

Finally, consider the scope of the mDNS queries. By default, mDNS operates only on the local link. If you are trying to resolve names across subnets, standard unicast DNS is required, as mDNS does not route beyond the immediate network segment. This limitation is inherent to the protocol and not a configuration error.

Frequently Asked Questions

Can I use mdns=yes and still use standard DNS servers?

Yes, enabling mDNS does not disable standard DNS resolution. The systemd-resolved daemon handles both protocols simultaneously. Standard DNS queries go to the servers listed in the DNS field, while mDNS queries are handled locally on the link. You can safely combine these settings without conflict.

Why is my hostname not appearing on the network after enabling mDNS?

Ensure that you set mdns=yes rather than just mdns=resolve. The resolve option only allows the system to look up other hosts, while yes enables the system to advertise its own hostname. Also, verify that the hostname itself is valid and does not contain special characters that might break mDNS registration.

Does systemd-resolved support mDNS for IPv6?

Yes, systemd-resolved supports Multicast DNS over IPv6 (mDNSv6). The configuration option mdns applies to both IPv4 and IPv6 interfaces automatically. As long as your network stack has IPv6 enabled and properly configured, the resolver will handle mDNS queries on both protocols.

What happens if I remove avahi-daemon but don't configure systemd-resolved?

If you remove avahi-daemon without configuring systemd-resolved for mDNS, your system will stop advertising its hostname and will no longer be able to resolve .local names from other devices. This results in a loss of local discovery capabilities, which may break applications that rely on zero-configuration networking.

How do I check which interfaces have mDNS enabled?

You can use the resolvectl mdns command to list all network interfaces and their mDNS status. This command provides a clear view of whether mDNS is enabled, disabled, or set to resolve mode for each specific interface, helping you troubleshoot connectivity issues on multi-homed systems.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More