Skip to main content
34 votes
Accepted

Can not resolve .local domains internal to my office LAN

host and nslookup perform DNS lookups, however most applications use glibc's Name Service Switch to decide how host names are looked up. Your /etc/nsswitch.conf might enable mDNS, which might cause ...
sebasth's user avatar
  • 15.8k
24 votes

How to configure systemd-resolved for mdns multicast dns on local network?

Changing the /etc/systemd/resolved.conf is just a part of the work. After your changed it you still need to resolve this puzzle: Multicast DNS will be enabled on a link only if the per-link and the ...
ozw1z5rd's user avatar
  • 349
13 votes

Can not resolve .local domains internal to my office LAN

The bigger problem here is: it is known DNS domain names ending in .local should not be used when setting up DNS infra-structures. .local use is reserved for zeroconf/avahi aka bonjour usage, which ...
Rui F Ribeiro's user avatar
11 votes
Accepted

How to enable mDNS for IPv6 on Ubuntu and Debian?

For enabling IPv6 for mDNS in avahi there is a need to change configurations, both in the client and server side for Linux VMs. The steps are: 1) Configure avahi for IPv6, if it is not already done (...
Rui F Ribeiro's user avatar
11 votes
Accepted

Ubuntu 20.04: Permanently disable a service start at boot

systemctl disable works most of the time but to be sure, use systemctl mask. What this does is to link the unit files to /dev/null which effectively causes any start operation or command to fail. You ...
Nasir Riley's user avatar
  • 12.3k
10 votes

How to configure systemd-resolved for mdns multicast dns on local network?

I spent a lot of time trying to get system-resolve working persistently after reboot, but couldn't get it to work to great frustration. The steps I took as per instructions and comments above: Set ...
nidkil's user avatar
  • 201
8 votes
Accepted

systemd-resolved as mDNS responder

The capability of using mDNS should be enabled in the /etc/systemd/resolved.conf file, in the [Resolve] section, by setting MulticastDNS=yes. Moreover, it should be enabled in the [Network] section of ...
ArenaLor's user avatar
  • 241
8 votes

How to configure systemd-resolved for mdns multicast dns on local network?

In order to enable mDNS on an interface, you need to set the MulticastDNS= option in the [Network] section of the .network file for the interface in the 10.0.0.0/16 network. This option defaults to ...
filbranden's user avatar
  • 22.6k
5 votes

Mac OS command to resolve hostnames like "getent" on Linux

(Building on user422009's answer) Add this to your ~/.bash_profile: getent() { [ "$1" == "hosts" ] && shift for x do echo $x $(dscacheutil -q host -a name $x | ...
seekoei's user avatar
  • 51
5 votes

Multicasting multiple mdns names

An alternative method, self-contained in a single systemd file, was posted in a bug tracking the lack of this feature. [Unit] Description=Publish %I as alias for %H.local via mdns Requires=avahi-...
tephyr's user avatar
  • 151
5 votes

How to enable mDNS for IPv6 on Ubuntu and Debian?

See http://0pointer.de/lennart/projects/nss-mdns/ In /etc/nsswitch.conf, mdns4_minimal enables mDNS resolution for IPV4 only, and for .local domain and link-local addresses (169.254.. in IPv4) only. ...
telcoM's user avatar
  • 114k
5 votes
Accepted

Unable to ping mDNS hostname

You need the libnss_mdns_minimal.so library installed (from the "libnss-mdns" package) and configured in /etc/nsswitch.conf so that the system would know to talk to Avahi-daemon for looking ...
grawity's user avatar
  • 15.4k
4 votes

Debian 11 failed to resolve .local names

For minimal server install it is enough use combo systemd-networkd + systemd-resolved. sudo nano /etc/systemd/resolved.conf Uncomment MulticastDNS=yes sudo nano /etc/systemd/network/10-lan.network I ...
Desconocido's user avatar
3 votes
Accepted

Why does getent default to .station if no TLD is specified?

getent hosts does what the hosts line of nsswitch.conf tells it to do. The strace indicates it's sending a unicast DNS query to 192.168.0.100. You have two hostname resolution services that could use ...
telcoM's user avatar
  • 114k
3 votes

How to configure systemd-resolved for mdns multicast dns on local network?

In addition to MulticastDNS=yes in your .network file, the same setting also needs to be set in resolved.conf. From resolved.conf doc: Multicast DNS will be enabled on a link only if the per-link ...
thom_nic's user avatar
  • 577
2 votes

How to configure systemd-resolved for mdns multicast dns on local network?

My way of dealing with mDNS (avahi) is this • sudo apt install ifupdown • sudo apt install avahi-utils idea from text in • cat /etc/network/interfaces • # ifupdown has been replaced by netplan(5) ...
user75786's user avatar
2 votes

Debugging mDNS with Avahi across Linux and macOS

For .local domains to work, the mDNS protocol ('multicast DNS') is applied. This protocol is specified in RFC6762. It serves to resolve hostnames without a central DNS server, and it works through ...
Kurt Pfeifle's user avatar
  • 1,571
2 votes
Accepted

Can't ping server that resolves using avahi-resolve

After running strace getent hosts unaha-closp.local on a machine which worked and the machine that didn't, it turns out the machine that didn't work never accessed avahi at all. I was missing the nss-...
Nate's user avatar
  • 154
2 votes
Accepted

How to connect to libvirt VMs by name, instead of IP address

Install libvirt-nss. For Fedora, run dnf install libvirt-nss. (For Debian: apt install libnss-libvirt). In /etc/nsswitch.conf, you want the hosts: line to include libvirt. There is an example in ...
sourcejedi's user avatar
  • 53.5k
2 votes

How do you enable mDNS in Linux?

You missed a step in the answer you linked (emphasis mine): You need the libnss_mdns_minimal.so library installed (from the "libnss-mdns" package) and configured in /etc/nsswitch.conf [...] ...
telcoM's user avatar
  • 114k
1 vote
Accepted

Issues with .local domains

"I know from research that .local domains are a considered a very bad idea."* No, that's not true. IF you were using a FQDN (Fully Qualified Domain Name) e.g. .com, .net, etc. it would be ...
Seamus's user avatar
  • 3,851
1 vote

mDNS on OpenBSD; resolving names in the ".local" domain using the standard resolver

You could check - https://github.com/openbsd/src/blob/013e174a3726f5dfc8d86cfb0c801d83d8f77ad6/lib/libc/asr/asr.c#L625 OpenBSD supports only 'file' and 'bind' options in the name resolver (resolv.conf)...
Mykhaylo Puzanov's user avatar
1 vote

avahi-resolve works but mdns

I was banging on the same problem with recent Debian kernel (Raspberry Pi OS). After reading through nss-mdns documentation and numerous instructions on the internet, I tried both mdns and ...
iva2k's user avatar
  • 111
1 vote
Accepted

Change priority of mdns4 hostname resolution

First of all, you can specify the name resolution priority (or rather, order) in /etc/nsswitch.conf. For example, on a Raspbian 11 (bullseye) Pi, the relevant section of the /etc/nsswitch.conf looks ...
Edward's user avatar
  • 2,674
1 vote

Domain names ending with .local not resolved

Update: I found the following issue: https://github.com/lathiat/nss-mdns/issues/75 My router / ISP provides a SOA for the .local domain. The unicast SOA heuristic prevents from mdns resolving. I added ...
Sven K.'s user avatar
  • 51
1 vote

Why does getent default to .station if no TLD is specified?

Due to the unrelated issue, I ended up checking /etc/resolv.conf, which is created by NetworkManager on all the distros I use as clients. According to @Kusalananda 's suggestion, it seems that the ...
Mek101's user avatar
  • 43
1 vote

mDNS Services are not reachable in fritzbox network

mDNS uses a local Link Multicast IP Adresse (IPv4: 224.0.0.251, IPv6: ff02::fb, UDP-Port 5353) with TTL fixed to 1, so not to be routed. You need a mDNS proxy annoucing the service and the target IP ...
Michael Baumert's user avatar
1 vote
Accepted

MDNS multi-cast DNS and resolv.conf file

A layer 2 network performance optimization/quirk is not supposed to affect resolv.conf. I would bet on some non-idempotent operation on some devops script of yours is adding/added the domain line in ...
Rui F Ribeiro's user avatar
1 vote

MDNS multi-cast DNS and resolv.conf file

No, bad MDNS packet checksums should not cause multiple domain lines in /etc/resolv.conf nor vice versa. The message UDP: bad checksum. From 73.2.33.11:5353 to 82.2.33.1:5353 ulen 69 would indicate ...
telcoM's user avatar
  • 114k
1 vote
Accepted

SSH is unable to resolve local domain names

For some reason I had the 32-bit version of ssh on my system. Installing the 64-bit version seems to have solved all of my problems. After looking through the strace of the command I noticed ssh had ...
Anni Lua's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible