How to optimize dns requests

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


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 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

        // 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 {
        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
        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 :

; <<>> DiG 9.8.1-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37152
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;                      IN      A

;; ANSWER SECTION:               17208   IN      A

;; Query time: 233 msec
;; WHEN: Tue Mar 12 20:47:33 2013
;; MSG SIZE  rcvd: 42
So what i have missed as option to activate the caching ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bind-users mailing list