Dave Pusey
asked on
BIND9 is not caching responses.
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, I suggest to use http://members.home.nl/p.a.rombouts/pdnsd/index.html as caching resolver instead of full fledged dns server.
ASKER
>> 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.
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.
> 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
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
ASKER
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";
};
ASKER
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.
Perhaps this is what's missing?
Unfortunatly I don't know how to configure such a file.
May you paste here your named.conf.options file?
ASKER
I've fixed it now by removing the forwarder directives, and adding the root hint zone.