LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2004, 05:00 PM   #1
vasillalov
LQ Newbie
 
Registered: Jul 2004
Posts: 16

Rep: Reputation: 0
DNS losing cache


Hi all,
I am running the latest version of bind for Fedora Core 2.
The DNS server is authoritive for 2 domains. Everything is working fine with this part. Host resolutions and reverse DNS works excellent.

However, my DNS server keeps losing its cache. I also have it running as a caching DNS. What is really aggravating is the fact that I loose the DNS cache over couple of hours, which is rediculous....

How do I make my DNS preserve the cached information for longer?

Thanks for your input!
 
Old 07-16-2004, 02:17 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
as i know u cant do anything about cache time. cache time is assinged by the out nameserver of that domain.


[root@teknik root]# cat /var/named/localhost.zone
....
....
1D IN NS @
1D IN A 127.0.0.1

1D means 1 day. this record can live in other nameserver's cache for 1 day.
 
Old 07-16-2004, 02:21 AM   #3
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
hmmm. u can use your ISP namserver. u can forward dns queries to your ISP nameserver. so your nameserver wont search anything, also it still can cache.

read the man of named.conf and the keyword is forward .

i hope i would help u
 
Old 07-16-2004, 10:32 AM   #4
vasillalov
LQ Newbie
 
Registered: Jul 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Nono,
fellas, I am not talking about the domain cache that I am hosting.
I have an authoritative DNS for couple of domains BUT this works fine.

The same machine is also a caching DNS server for my local LAN. So I have told each computer to consult with my internal DNS when resolving domain names. That way I should not wait for my ISP name server to respond.

So lets say I type in www.google.com in my laptop's Mozilla. First time the response will very slow as my DNS needs to discover the actual IP address. The second time I type www.google.com it is instantaneous as my DNS has cached the IP that I am requesting.

My problem is that my DNS looses its cache and has to rediscover or relearn the IP address of google or any other site almost 4-5 times a day!

And this is not only on one of the computers but on all 5 machines that I have at home. I have told each machine on the LAN to consult with my DNS for name resolution!

Hope that clears it little bit!
 
Old 07-17-2004, 02:32 AM   #5
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
i think i couldnt explain about forwarding clearly.
your clients will use your nameserver. but your nameserver wont resolve ip of domains. but i will keep caching them.

forward first ;
forwarders { ISP_nameserver_ip };

if your nameserver wont know the ip. it will ask your ISP nameserver to learn the ip. so it wouldnt search ip itself. so performans can be increased.
i dont know how to change the cache time. cos the zone files decide this time. for example www.google.com .. your nameserver find and asks google.com's nameserver about records. it also learns how long www.google.com record will live in your nameserver cache. u cant decide how long www.goole.com record can live in cache. cache time is assinged by zone files.
 
Old 07-17-2004, 09:15 AM   #6
vasillalov
LQ Newbie
 
Registered: Jul 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by maxut
i think i couldnt explain about forwarding clearly.
your clients will use your nameserver. but your nameserver wont resolve ip of domains. but i will keep caching them.

forward first ;
forwarders { ISP_nameserver_ip };

if your nameserver wont know the ip. it will ask your ISP nameserver to learn the ip. so it wouldnt search ip itself. so performans can be increased.
i dont know how to change the cache time. cos the zone files decide this time. for example www.google.com .. your nameserver find and asks google.com's nameserver about records. it also learns how long www.google.com record will live in your nameserver cache. u cant decide how long www.goole.com record can live in cache. cache time is assinged by zone files.
I seriously doubt that this is the case with my problem! My caching DNS was working fine until I added a new zone. I am thinking that it has sth to do with the serials in each zone...

Anyway, obviously more reading is required on my end.
 
Old 12-27-2007, 04:33 PM   #7
tgridley
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Any Luck With This

Have you or anyone else had any luck with this issue. I have the exact same problem except I am running Bind 9.2.3-5. DNS keeps loosing its cache. Please help.
 
Old 12-27-2007, 05:16 PM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
You get exactly the same answer Vasillalov gets above. You do not have the capability of how long you cache answers for, that is set by the authoritative DNS for each and every zone on the internet.

Google and yahoo for example, only give out answers for 300 seconds at a time. That is 5 minutes. If the last time any computer on your LAN asked for the address of google was more than 5 minute ago, your caching server will have to traverse the entire DNS tree down to the roots, then up to the google DNS, then on again to yourself. And from a DNS perspective, a.google.com is one lookup, and b.google.com is another.

Peace,
JimBass
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keep losing route and DNS. nerdbebo Linux - Networking 2 07-15-2004 06:08 AM
problems with dns-cache kokolisso Linux - Networking 0 05-17-2003 04:43 PM
DNS cache clearing n.antonio Linux - Software 0 05-11-2003 08:44 PM
Stopping Squid without losing Cache MgF Linux - Software 0 11-21-2002 05:15 PM
DNS Cache Architect Linux - Networking 2 10-25-2002 04:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration