Local caching only DNS takes a long time to resolve
Hello everybody, this is my first post here - and I'm pretty much a linux newbie.
- Fedora core 2 Background More for proof of concept than anything else, I would like to set up DNS caching so it will serve the LAN (currently only 2 machines) in the hope that it may improve performance slightly. DNS configuration (/etc/resolv.conf) Code:
nameserver 127.0.0.1 Code:
// generated by named-bootconf.pl I run NSLOOKUP, type 'server' to verify it's checking 127.0.0.1 then type any hostname on the internet it takes at least 1.5 seconds to resolve, sometimes longer. If I type 'server 212.23.8.1' (my ISP primary DNS, and listed as first forwarder in named.conf) then type different hostnames on the internet it responds immediately. The Question What havn't I done, or what have I done wrong which makes using local DNS as caching only so sloooow. Many thanks in advance, Steve :) |
Greetings essdeeay,
Try adding the nameservers to /etc/resolv.conf For example... search mydomain.com nameserver 212.23.8.1 nameserver 212.23.8.6 nameserver 127.0.0.1 |
Thanks for the answer homey. I'm sure this would work, but what I'm trying to do is force the use of the local DNS server and let it forward to the ISPs servers - my thinking is, the local DNS cache will build up and it will be slightly faster resolving DNS for LAN machines.
I've played around with a few things... If local DNS can resolve, it responds in 2ms. If local DNS can't resolve, it goes to root and takes 600ms (which is not what I want). I would like it to go to ISP servers for a 30ms response time instead, hence the 2 forwarders specified in named.conf. However, it isn't doing this and this is the problem. So I guess my 2 questions are: a) What should the behaviour be? b) How do I put it right? Many thanks again, Steve :) |
I guess I don't know how you should proceed then but that's how I do it and the time seems ok to me.
PING monster.com (63.121.29.1) 56(84) bytes of data. 64 bytes from www.in.monster.com (63.121.29.1): icmp_seq=0 ttl=118 time=25.9 ms 64 bytes from www.in.monster.com (63.121.29.1): icmp_seq=1 ttl=118 time=24.7 ms 64 bytes from www.in.monster.com (63.121.29.1): icmp_seq=2 ttl=118 time=24.0 ms Edit: Actually, I only have my server listed in /etc/resolv.conf search mydomain.com nameserver 192.168.0.1 and the forwards are in the /etc/named.custom |
I'm wondering if the '.' zone should really be there? If you're forwarding all queries to your ISP that can't immediately be answered from your cache, then I don't see any reason why your name server would need to know how to find the root servers.
|
All times are GMT -5. The time now is 10:02 AM. |