I recently had to sit down and figure this out. Here is my understanding.
The mdns4_minimal will ONLY do a search if the hostname ends in .local.
If the hostname does not end in .local then mdns4_minimal does not make
a search at all and so NOTFFOUND is false because it didn't look for the
name using mdns and so it will go to he dns lookup. If the name does end
in .local then mdns is used to look for the hostname and if that ends up
not finding anything then NOTFOUND is true and it doesn't bother to look
it up in dns.
It is actually the right answer according to RFC6762. The .local domain
is a special domain.
What I discovered that I was not aware of via RFC6762 the .local domain
is a special domain and not supposed to expand beyond the local area
network. That means it is not expected to extend beyond any routers.
Each local network has by default a .local domain consisting of the
hosts attached to that local network.
Here is the pertinent paragraph in RFC6762 (
https://tools.ietf.org/html/rfc6762 ):
This document specifies that the DNS top-level domain ".local." is a
special domain with special semantics, namely that any fully
qualified name ending in ".local." is link-local, and names within
this domain are meaningful only on the link where they originate.
This is analogous to IPv4 addresses in the 169.254/16 prefix or IPv6
addresses in the FE80::/10 prefix, which are link-local and
meaningful only on the link where they originate.
So, if your environment is RFC6762 compliant, that is your .local domain
is NOT managed by dns but is handled by mdns on each local network, the
default file is the right answer. In my company we are not RFC6762
compliant and our .local domain is managed by dns and are not limited to
the local network as proposed by RFC6762. So, I have to change my hosts
line to:
hosts: files dns
and not bother with mdns. I'd probably change the hosts line to the
above if we didn't use .local at all so no time is wasted doing an mdns
check before getting to dns. But you can look at RFC6762 to see what
issues this whole .local domain is trying to address.
Thanks
Chris K
On 3/14/2018 9:05 PM, Tim wrote:
Just looking at my nsswitch file (an abbreviated version below), as it
was configured by the installation (and not modified by me), surely
that NOTFOUND bit jammed in the middle should be further to the right?
(Especially in my case, since I have a local DNS server that resolves
all the LAN addresses.)
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org