Mailinglist Archive: opensuse (1420 mails)

< Previous Next >
Re: [opensuse] optimizing resolv.conf
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Sat, 04 Jan 2014 16:24:22 +0100
  • Message-id: <la993i$s0p$1@saturn.local.net>
Carlos E. R. wrote:

On 2014-01-04 12:27, Per Jessen wrote:
Carlos E. R. wrote:



Check nscd. It's used in openSUSE for name server caching. man
nscd for details.

No, it doesn't. It caches the hosts file.

Yes it does. See your own quote:

Nscd provides caching for accesses of the passwd(5),
group(5),
and hosts(5) databases through standard libc interfaces,
such as getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3),
gethostbyname(3), and others.
^^^^^^^^^^^^^^^

I understand it means that it uses that function, yes, but only the
hosts database is cached.

You are mistaken, I assure you. You can convince yourself with this
simple test:

In a console, run a tcpdump on your outgoing interface and port 53:

tcpdump -n -i eth0 port 53

Open a second window and

ping -c1 www.dns24.ch (or any other host).

Check tcpdump and you'll see the outgoing query.

Do another ping:

ping -c1 www.dns24.ch

Now notice no outgoing DNS traffic.

If you want to be certain 'nscd' is doing the caching, stop it, then
repeat the exercise and notice outgoing DNS traffic on every ping
command.


--
Per Jessen, Zürich (5.6°C)
http://www.hostsuisse.com/ - dedicated server rental in Switzerland.

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

< Previous Next >
This Thread