Re: Does mDNS play well in regular DNS env?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/04/2016 12:58 PM, Michael B Allen wrote:
> On Fri, Nov 4, 2016 at 2:36 PM, Rick Stevens <ricks@xxxxxxxxxxxxxx> wrote:
>> On 11/04/2016 11:09 AM, Tom Horsley wrote:
>>> On Fri, 4 Nov 2016 13:03:41 -0400
>>> Michael B Allen wrote:
>>>
>>>> Is mDNS supposed to coexist with DNS?
>>>
>>> I have no idea what is "supposed" to work, but I know
>>> I always have to get rid of the mdns [notfound=return]
>>> crap that is in my /etc/nsswitch.conf file by default
>>> in order to get "normal" dns lookups to work.
>>
>> Yeah, I've never figured out why they do that. The default action
>> for notfound is "continue". Why they abort further lookups by using
>> "return" is silly and (IMHO) broken.
> 
> Ok, so this nails it. If I remove [notfound=return] then there is a 3
> second delay for mdns to return but it does fallback to DNS. I have to
> completely remove mdns4_minimal [notfound=return] to just use DNS.
> 
> Of course my local network is a .local domain so it seems at least in
> my case mdns cannot really be used effectively.

By removing [notfound=return], things are behaving as I'd expect. If
you're not using Avahi (or Bonjours), there really isn't any valid
reason to use mDNS.

> I never understood these logical meta languages. Pam is another
> example. It's basically just an obscure way of writing code so it's
> not obvious to me why this isn't just scripted so that someone has the
> option of making them work together (call both mDNS and DNS async and
> then return first to respond).

Historically, host resolution has never been a multithreaded process
so it's never been done async (the API has no non-blocking versions
of the function calls). Even without mDNS, the resolver library tries
the first nameserver configured. If there's no answer to the query at
all (e.g. server is down), it tries the second, then the third (if
configured). The first answer received is used. If none of the servers
respond at all or if all of the queries come back "not found", then the
host isn't resolved. Note that you ARE talking over the Internet to get
resolutions so you're stuck with the TCP/IP protocol timeouts along
with the timeouts defined for the DNS service itself (60 seconds IIRC).
You can shorten those (the original timeouts were chosen to handle
slow links like dialup lines and such). Those are fairly rare now, but
the timeouts remain.

mDNS provides the Avahi protocol, which is the open source version of
Apple's Bonjours, which, in turn, is Apple's attempt at something like
Microslop's NetBIOS. The whole ".local" suffix is an attempt to wrap
non-Internet related things into Internet-appearing parlance so the same
libraries can be used. A good example of pushing a paradigm too far, if
you ask me (which you aren't, but....)

Where both mDNS and real DNS are active, if you parallelize the queries
as you suggesting and get different answers, which answer gets
credence? mDNS will almost always answer first since it's local to your
machine so DNS would never be consulted and you'd just get "not found"
out the wazoo. You could try setting

	publish-resolv-conf-dns-servers=yes

in /etc/avahi/avahi-daemon.conf to have DNS results published and this
may do what you want. We don't use mDNS here at the office, so my
experience with it is limited and I haven't played with a lot of the
various options.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-   To err is human.  To forgive, a large sum of money is needed.    -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux