Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I do not seem to have a nscd service on my Cent 6.3 server. I am not running BIND on it, but I am curious about the DNS client caching. How does this happen on a standard minimal install of Cent 6.3 when the NSCD daemon is not present?

share|improve this question
1  
What makes you think your box is doing any cacheing at all? –  MadHatter Apr 17 '13 at 13:00
    
It's very possible that it isn't. I guess that is what I am trying to determine. Is there any mechanism for DNS client caching outside of NSCD? –  user160910 Apr 17 '13 at 13:11
    
Well, almost all versions of BIND cache, unless you work hard to tell them not to. So if you were running BIND locally, that might well cache; if you weren't, your upstream nameserver (see /etc/resolv.conf) almost certainly will. –  MadHatter Apr 17 '13 at 13:17
    
I am only concerned with DNS client in this case. –  user160910 Apr 17 '13 at 13:22

1 Answer 1

Server:

You can test if a DNS resolver is caching DNS results by looking at the timing output of "dig".

dig ohdns.org | grep sec
  ;; Query time: 146 msec

If you see a small number, close to 0msec, then your nameserver in /etc/resolv.conf is caching results. I would expect the name server you have listed in /etc/resolv.conf to cache results that you query.

Client:

DNS caching does not happen by default in CentOS. You would have to enable nscd, bind, unbound, dnsmasque or some other DNS caching mechanism.

You did not mention the background of this request. If this is application specific, that can also be a factor. For example, Firefox will cache DNS results as well. Some server applications can also cache DNS results, such as Java. Java and DNS cache are a fun and complex topic.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.