Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Paths of DNS Queries
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Wed, 01 May 2019 15:48:08 +0200
  • Message-id: <qac82o$o8a$2@saturn.local.net>
Anton Aylward wrote:

On 2019-05-01 6:51 a.m., Carlos E. R. wrote:

The thing is, when an application makes a DNS query, what is the
logical path of
calls that it follows? There are just so many possibilities that
come to mind "A guide for the perplexed" with a decision chart
diagram, branching mindmap or something would be nice :-)

I guess the query is first answered or intercepted by nscd, then it
goes to the configured DNS. Ah, wait, first it goes to the host file,
which I think is cached by nscd.

Perhaps I didn't make myself clear.
When an application such as Firefox make a library call
"gethostbyname()" (or is that obsolete now?) what happens?

I may be wrong but I think the first thing that happens is that there
is a look-see to /etc/nsswitch.conf to see what should be invoked.
Mine says:
hosts: files dns
which, I take it, means check /etc/hosts first and then use the
configired DNS resolver if the address isn't found in the hosts file.

The resolver library first attempts to contact nscd, then it proceeds
with the above.

Two things occur to me at this point.
The first is that dnsmasq slurps up /etc/hosts anyway so the 'files'
entry is redundant.

By default dnsmasq is configured to do so, but nscd also reads
nsswitch.ch.

The second is I don't see how things get to dnsmasq.
Can someone help me here, please.

On my system (when I occasionally use dnsmasq), localhost:53. (by way
of resolv.conf).


--
Per Jessen, Zürich (16.6°C)
http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland.


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation