Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 May 2005 05:07:29 -0600
From:      Ed Stover <estover@nativenerds.com>
To:        Xian <ian@codepad.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Slow DNS
Message-ID:  <42872D71.3050902@nativenerds.com>
In-Reply-To: <200505121205.17487.ian@codepad.net>
References:  <200505121205.17487.ian@codepad.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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;
        };
*/
-->



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42872D71.3050902>