LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-22-2008, 03:17 AM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
DNS Caching Questions


I use dnsmasq to cache my DNS lookups. That's good. I power off my system at the end of my day, which means I lose my DNS cache. That's bad.

I pondered whether I could extract (grep/sed/awk/etc.) data from the dnsmasq logs to create a second hosts file for dnsmasq. I already use a secondary hosts file with dnsmasq to provide ad blocking (works great too!). I was thinking I could append that second hosts file from the dnsmasq logs. The file would grow very large and I don't know where the point of no return might be where performance would be impacted.

Is this idea feasible?

Second, how would I handle stale IP addresses? Possibly sort | uniq?

Thanks again.
 
Old 10-22-2008, 03:37 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
A DNS server must maintain expiration timestamps for results, and must expire records according to TTLs. Your file based approach would have to do the same.

The loss of a DNS cache in a small environment is negligible.
 
Old 10-22-2008, 10:58 AM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Just to amplify Mr C's comments; most DNS records have an expiration period of 6 hours or less; in that context, your approach would only have a real benefit if you switched the computer back on after under 6 hours.

This feature is a real necessity in a context in which servers move.
 
  


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
Debian Slow DNS after enabling dns caching kuangchen Debian 0 04-12-2008 12:18 PM
dns caching? codec Linux - Networking 7 07-04-2005 06:02 PM
DNS is not caching Mike Healan Mandriva 4 12-24-2004 08:53 PM
DNS still slow after installing caching DNS mooreted Linux - Networking 16 01-01-2004 12:18 AM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:59 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