-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does nss-mdns query the default DNS before avahi? #79
Comments
Apparently the slow name resolution was caused by my router setting itself as the default DNS and timing out: https://unix.stackexchange.com/questions/647832/why-does-getent-default-to-station-if-no-tld-is-specified Still, why does the mdns option on |
According to README.md, it is clearly documented mdns does SOA query to local. DNS domain, checking whether it is handled by DNS server. If your DNS server just timeouts, resolution time might be quite long. Consider using just |
I changed my
Unfortunately I can't do that, I'm using a Vodafone Power Station and I don't have access to it's |
Oh, I can see similar results only when names are not found. It is strange. Okay, even mdns*_minimal queries local DNS. Can you change configured DNS to your own server? Unless provider has reliable one, can you update DHCP offered DNS server to something not broken? As a workaround, you should be still able to override DNS server in network manager only for your machine. |
It queries localhost DNS to check, whether there exists |
You should be able to disable the SOA checking if you switch to the non-minimal library and configure mdns.allow. See https://github.com/lathiat/nss-mdns#etcmdnsallow and search for the word "heuristic". Let me know how it works. |
I created a
And changed my
But
I already tried rebooting |
Thanks for doing the strace. Are you able to observe the binary reading mdns.allow and successfully reading the contents? If it does so, then no unicast DNS should happen. |
On my manjaro machine, it reads
|
I'm observing the very same behavior, Ubuntu 20.04.3, updated fully. No matter if I use systemd-resolved or not, with avahi daemon running or not it seems that the udp 5353 queries for any .local do not work at all.... I did some tcpdumps and no avail. |
Ah, yes, reproduced that. That query to DNS is in fact AAAA query, which is NOT handled by mdns4. When I replaced mdns4 with just mdns, it does not reach to DNS at all.
Now the question is, whether mdns4_minimal is a good default configuration in this case. It seems wrong to me. |
Trying to solve my local network's server name can take up to 14 seconds on all my local devices.
The avahi daemon cache is enabled on my Arch, Manjaro and Linux Mint clients, as well as in my Void-Linux musl server.
The text was updated successfully, but these errors were encountered: