[Bug 94940] Re: mdns listed in nsswitch.conf causes excessive time for dns lookups
Aaron C. de Bruyn
aaron at heyaaron.com
Sun Feb 21 18:03:13 UTC 2016
With all due respect +thejranjan, it's not really Ubuntu's fault.
Microsoft recommended for years that companies use '.local' as their
internal domain suffix so as not to conflict with the existing DNS
namespace like .com, .net, .org, etc...
Unfortunately Microsoft just decided to recommend .local without
thinking it through or registering .local with any standards body.
Later on a standards body decided to use .local for Multicast DNS.
So you run into this problem when you connect your Ubuntu box (and I
believe Debian as well) to a Microsoft Windows network that *violates*
established standards.
The fix is easy enough--edit /etc/nsswitch.conf and remove multicast
DNS. That gives you access to your internal network which is configured
improperly. Unfortunately you might have trouble communicating with
multicast DNS services.
A work-around is to remove the '[NOTFOUND=return]' part of the mdns
config. That basically tells the system to try looking up from
multicast DNS and immediately fail if multicast DNS doesn't find
anything. If you remove it, you will still have delays looking up hosts
on your internal network, but you *will* get the best of both worlds--
multicast DNS resolution *and* resolution of your incorrectly-named
internal network.
So there's nothing really for Ubuntu to fix. It's up to you to fix your
internal network or make a change to your Ubuntu install so it can
communicate with your improperly configured internal network.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/94940
Title:
mdns listed in nsswitch.conf causes excessive time for dns lookups
Status in avahi package in Ubuntu:
Confirmed
Status in nss-mdns package in Ubuntu:
Confirmed
Status in nss-mdns package in Debian:
Fix Released
Bug description:
Binary package hint: avahi-daemon
I encountered this problem on a machine that is integrated into our
work network. I performed a dist-upgrade to Feisty on my desktop and
all went well. I've noticed recently that any dns based work seemed to
take a significantly longer time then normal.
My system is getting dns information on our company internal systems
from two dns servers. Previously, if I tried to establish an ssh
connection with another system I could generally expect the connection
in under 3 secs.
After the dist-upgrade the time went from under 3 seconds to
approximately 25 seconds. After searching around the system I found an
entry in /etc/nsswitch.conf that cause me a little concern. The line
in question is:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
I looked around a bit and it seems that the references to mdns are
really talking about communication with the Avahi mDNS/DNS-SD daemon.
Since this looks to be a part of a zeroconf configuration I wasn't
expecting too much in my current environment, as we really only have
three Mac's.
What concerned me is the idea that if we hit files with no answer
there is a delay while we hit the other options until we hit dns,
which is where the information I seek existed.
For an experiment I tried two separate tests. The first changed the
line to looks like:
hosts: files dns mdns4_minimal [NOTFOUND=return] mdns
The change should have improved the time, but I was still looking at
approximately 23 seconds to return a command prompt on the destination
machine.
Finally, I change the entry to simply:
hosts: files dns
After this change I was again receiving the destination command prompt
in under 3 seconds. I don't know if simply changing the file will
correct the problem long-term or not. Seems to help me, but might be
the way to go for most Ubuntu users.
ProblemType: Bug
Architecture: i386
Date: Thu Mar 22 18:10:54 2007
DistroRelease: Ubuntu 7.04
Uname: Linux samdesk 2.6.20-12-generic #2 SMP Wed Mar 21 20:55:46 UTC 2007 i686 GNU/Linux
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940/+subscriptions
More information about the foundations-bugs
mailing list