Slow DNS

Ed Stover estover at nativenerds.com
Sun May 15 04:06:09 PDT 2005


Xian wrote:
> I have just set up a router and would like DNS caching on it. I have tried to 
> set it up an it kind of works, just computer using it as their nameserver 
> take ages on DNS queries, up to 4-5 seconds.
> 
> To set up the DNS caching I added the ip of another DNS server 
> to /etc/resolv.conf and added namd_enable="YES" to /etc/rc.conf.
> I also tweaked the following lines in /var/named/etc/namedb/named.conf: 
> listen-on       { "any"; };
> forwarders {
>        192.168.0.1;
> };
> query-source address * port 53;
> 
> Any ideas on how to make it run better? The DNS server at 192.168.0.1 answers 
> DNS queries in a few milliseconds.
> 
Put an entry for your upstream DNS/DNSes as well... That will speed
things up.
<--quote
// In addition to the "forwarders" clause, you can force your name
// server to never initiate queries of its own, but always ask its
// forwarders only, by enabling the following line:
//
//      forward only;

// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below.  This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.
/*
        forwarders {
                127.0.0.1;
        };
*/
-->


More information about the freebsd-questions mailing list