How network manager is resolving localhost without /etc/hosts
Rashkae
ubuntu at tigershaunt.com
Sun Dec 27 19:58:43 UTC 2015
On 15-12-27 04:51 AM, Tom H wrote:
> On Fri, Dec 25, 2015 at 11:33 PM, Bruce Ferrell <bferrell at baywinds.org> wrote:
>
> This isn't an issue regarding the order of resolution of dns queries.
>
> "localhost." isn't going to be resolved by anything other than
> "files". It turns out that in the NM case, "localhost." is resolved
> without a hosts file unless NM's dns setting is "none".
>
This statement contradicts itself. There's nothing different about
looking up localhost than any other hostname. (other than the
assumption that it's always going to be 127.0.0.1)
The system, configured with a default lookup order, will first examine
hosts file to resolve, then, I guess, some network muticasting (that's
new to me, but whatever,), then dns.
A default configuration of Bind includes a local zone file with
localhost, in case a querry makes it to dns for whatever reason..
Apparently, NM's dns caching is doing something similar. But what
started this whole thread was the belief of the OP that NM dns was
overruling hosts file, which would only happen if something was wrong
with nsswitch.conf, or something very wrong with the hosts file.
More information about the ubuntu-users
mailing list