Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-16-2008, 04:11 AM   #1
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 536

Rep: Reputation: 79
How to enable DNS caching?

Hello There,

I'm using a Readhat as gateway and I've notice that there are a lot a DNS request that are send many times for the same domain which is hammering the DNS server and create slowness.

So I was thinking to enable DNS caching in nscd
In the Man page I've found the following:
enable-cache hosts yes
positive-time-to-live hosts 3600
negative-time-to-live hosts 20
suggested-size hosts 211
check-files hosts yes

Will this do the job?

Best regards,
Old 10-16-2008, 10:17 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,553
Blog Entries: 15

Rep: Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494
ncsd isn't really for "DNS" cache so much as for "hosts" cache if I read its man page correctly.

What are you using for a naming service? You say "DNS" so I'm guessing it is either BIND or TinyDNS. If it is the former you can adjust caching by modifying named.conf.

You need to provide more details so folks can help you.

If you're running BIND you should see a "named" daemon running with "ps -ef |grep named". Note that you'll usually see a syslog entry referring to named as well but that isn't the named daemon itself.)

One thing you need to be careful about as regards cache is insuring you're not opening it up to people outside your organization - cache poisoning is a common problem.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Slow DNS after enabling dns caching kuangchen Debian 0 04-12-2008 01:18 PM
Should I enable write caching on my raid array? abefroman Linux - Hardware 1 09-26-2005 05:38 PM
DNS is not caching Mike Healan Mandriva 4 12-24-2004 09:53 PM
DNS still slow after installing caching DNS mooreted Linux - Networking 16 01-01-2004 01:18 AM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 02:54 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration