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
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.
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 220.127.116.11' (my ISP primary DNS, and listed as first forwarder in named.conf) then type different hostnames on the internet it responds immediately.
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,
Try adding the nameservers to /etc/resolv.conf
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,
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 (18.104.22.168) 56(84) bytes of data.
64 bytes from www.in.monster.com (22.214.171.124): icmp_seq=0 ttl=118 time=25.9 ms
64 bytes from www.in.monster.com (126.96.36.199): icmp_seq=1 ttl=118 time=24.7 ms
64 bytes from www.in.monster.com (188.8.131.52): icmp_seq=2 ttl=118 time=24.0 ms
Edit: Actually, I only have my server listed in /etc/resolv.conf
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 01:24 PM.|