Solved

BIND9 is not caching responses.

Posted on 2009-07-11
8
549 Views
Last Modified: 2013-12-06
I have a BIND9-based DNS server set up here at home.

I serves as the master for a couple of internal domains, and everything else is resolved via a forwarders directive in the config file.

The problem is that the server goes out the forwarders to get an ip address every single time a domain name is requested.

If i request www.google.co.uk 10 times in a row, it does 10 requests out to the forwarders. This seems to indicate that the server is not caching responses.

How can i make it cache responses so that subsequent requests for the same domain name dont require a request to the forwarders.
0
Comment
Question by:davepusey
  • 4
  • 3
8 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 24833507
Are You sure You are using the local bind9 as resolver (/etc/resolv.conf)
Have You configured caching nameserver in bind(zone ".") or just forwarders?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 24833508
Also, I suggest to use http://members.home.nl/p.a.rombouts/pdnsd/index.html as caching resolver instead of full fledged dns server.
0
 
LVL 2

Author Comment

by:davepusey
ID: 24834028
>> Are You sure You are using the local bind9 as resolver (/etc/resolv.conf)

Yes!

>> Have You configured caching nameserver in bind(zone ".") or just forwarders?

Please explain.

>> Also, I suggest to use http://members.home.nl/p.a.rombouts/pdnsd/index.html as caching resolver instead of full fledged dns server.

I still need the ability to host a few zones so I think BIND is still the best choice.
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 43

Expert Comment

by:ravenpl
ID: 24834077
> http://www.langfeldt.net/DNS-HOWTO/BIND-9/DNS-HOWTO-3.html
To have bind caching, it has to have hint zone "." configured.
Additionally You could use the glibc build-in dns caching with nscd service
service nscd status
0
 
LVL 2

Author Comment

by:davepusey
ID: 24834760
Yes the root zone is there... as included in the original installation...


// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

Open in new window

0
 
LVL 2

Author Comment

by:davepusey
ID: 24834766
I've been unable to find any type of cache file, or any config for it.

Perhaps this is what's missing?

Unfortunatly I don't know how to configure such a file.
0
 
LVL 10

Expert Comment

by:ampranti
ID: 25080064
May you paste here your named.conf.options  file?
0
 
LVL 2

Author Comment

by:davepusey
ID: 25080746
I've fixed it now by removing the forwarder directives, and adding the root hint zone.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to prevent loss of email when changing domain name servers? 3 25
awk sed variable in file 3 73
Cannot Change Local DNS 9 63
Windows DNS Server Caching 3 41
After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question