How to optimize dns requests

Abdellatif ... kikookik at live.com
Fri Mar 15 15:25:15 UTC 2013


Hello;

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.

I have installed bind9 on my ubuntu machine. This is what i have in file : /etc/bind/named.conf.options


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 http://www.kb.cert.org/vuls/id/800113

        // 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 https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

It doesn't seem to use the cache, here is the call of dig mail.com :

; <<>> DiG 9.8.1-P1 <<>> mail.com
;; 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:
;mail.com.                      IN      A

;; ANSWER SECTION:
mail.com.               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
So what i have missed as option to activate the caching ?

Regards
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20130315/b100ab73/attachment.html>


More information about the bind-users mailing list