Summary: solaris resolver question

From: Martin Meadows <PZXKYS_at_atdva3.atd.gmeds.com>
Date: Fri Jun 29 2001 - 07:20:04 EDT
Thanks to the following folks for responses:
James Lick, Darren Dunham, Tim Chipman, Sergio Gelato, 
Casper Dik, Julian Simpson

Here's  the original question:

I need to know whether a solaris ping command is using
>a "full service resolver" or a "stub resolver" as defined by 
rfc1123. More importantly, what I need to know is ... when I 
ping a host ... and use a local nameserver for name resolution ...
does the resolver, used by ping, cache the ip address/host info
that is returned from the nameserver? Or does the ping resolver
go to the nameserver each time it is used?

The answer: solaris nscd caches responses from dns.


Here are some of the individual answers ... 

-----------------------------------------------------------------------------

	The Solaris resolver is not a full resolver.  It depends on the
external nameserver both to cache entries, and to recurse through DNS to
find the authoritative nameserver.

	However, Solaris also has nscd which is a generic name service
cacheing daemon which can cache nameservice information for any name
service including DNS.  By default, nscd will cache hosts responses from
DNS.  This can be disabled if so desired.

	Full service resolvers are very rare.  If this functionality is
desired, it can be provided by installing a caching only nameserver on the
local host, or through nscd.

-----------------------------------------------------------------------------


... I will draw your attention to a wonderful Solaris command called truss.
You should use it to observe what system calls ping is doing, and how it
handles name service resolution. Then you'll be able to tell for sure.

-----------------------------------------------------------------------------

It's all configurable in nscd.conf:

	- whether to cache hostnames
	- how long to cache names (negative of positive)
	

you can flush the cache using: "nscd -i hosts".

-----------------------------------------------------------------------------

in /etc/init.d/there should be an nscd script.

Just run ./nscd stop, and it won't cache name services.

-----------------------------------------------------------------------------


Turn off nscd (name server caching daemon) to make sure that it isn't
cached.

-----------------------------------------------------------------------------

All Solaris hostname resolutions goes through the the nsswitch layer;
this first redirects queries to "nscd", "nscd" will then redirect
queries as instructed in /etc/nsswitch.conf.  It may go out
to a local named (if configured) or a DNS server somewhere on the net.

Unless  configured differently, "nscd" will cache the results of the
query.  (configuration in /etc/nscd.conf)

-----------------------------------------------------------------------------
Received on Fri Jun 29 12:20:04 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:58 EDT