<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hello;<br><br>I want to optimize the call to remote dns server to resolve domain names
each time needed. What i want to do is that if the hostname is
requested for the first time than call the remote dns (for example
8.8.8.8) to resolve it, once called then recorded for later use in such
way when next time the seem domain name is requested for resolve than
the cached ip is grabbed without need to call remote dns to maximize
speed to optimize network traffic.<br><br>I have installed bind9 on my ubuntu machine. This is what i have in file : <b>/etc/bind/<span class="skimwords-unlinked">named.conf.options<br><br></span></b><br><pre class="bbcodeblock" dir="ltr" style="
margin: 0px;
margin-right: -99999px;
padding: 3px;
border: 1px inset;
width: 98%;
height: 498px;
text-align: left;
overflow: auto">options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See <span class="skimwords-unlinked">http://www.kb.cert.org/vuls/id/800113</span>
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forward only ;
forwarders {
208.67.220.220;
208.67.222.222;
8.8.8.8;
};
allow-query { clients ; } ;
// max-cache-size is in bytes : echo '2 * 1024^2' | bc
max-cache-size 2097152 ;
empty-zones-enable yes;
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See <span class="skimwords-unlinked">https://www.isc.org/bind-keys</span>
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};</pre><b><span class="skimwords-unlinked"><br></span></b><br>It doesn't seem to use the cache, here is the call of dig mail.com :<br><br><pre class="bbcodeblock" dir="ltr" style="
margin: 0px;
margin-right: -99999px;
padding: 3px;
border: 1px inset;
width: 98%;
height: 274px;
text-align: left;
overflow: auto">; <<>> DiG 9.8.1-P1 <<>> <span class="skimwords-unlinked">mail.com</span>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37152
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;<span class="skimwords-unlinked">mail.com</span>. IN A
;; ANSWER SECTION:
<span class="skimwords-unlinked">mail.com</span>. 17208 IN A 213.165.66.221
;; Query time: 233 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 12 20:47:33 2013
;; MSG SIZE rcvd: 42</pre><br>So what i have missed as option to activate the caching ?<br><br>Regards<br> </div></body>
</html>