I am using bind-9.3.6-4 in my CentOS 5. How can I allow bind to cache lookup queries so that if there are similar queries it should check from my cache instead doing a lookup from the DNS servers mentioned in the "forwarders"?
I am using bind-9.3.6-4 in my CentOS 5. How can I allow bind to cache lookup queries so that if there are similar queries it should check from my cache instead doing a lookup from the DNS servers mentioned in the "forwarders"?
An out of the box bind install via yum should be a caching.
There are three kinds of name servers - caching, resolving, and authoritative. Bind acts as all three out of the box, but you'll need to tell it what you want it to be authoritative for. You can use dig to query the server - the answer will have a decrementing counter in it that shows how long it will be before the cache expires. This is the TTL of the record and it should show the time left in the cache.
Here is sample output for a simple dig for google .com against a local name server.
The 291 shows that this server has 291 seconds left to go before it resolves again, showing that the SERVER in the bottom lines will give out the same answer until google.com has expired from the cache.
I think a look at the dig documentation would do you well - it will allow you to ask an appropriate followup question.