LinuxQuestions.org
Visit Jeremy's Blog.
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 10-27-2008, 01:42 PM   #1
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 316

Rep: Reputation: 20
DNS cache without dnsmasq


I have a rather large home network, which is used by the family. A performance issue appears to be that with everyone's activity, there are lots of DNS hits. The local ISP is slow, but there are some other alternatives like OpenDNS, which may perform faster.

What I would really like to try is to cache dns calls locally. For lots of reasons, all the machines here have static IPs, so using the DNS caching capability of dnsmasq is apparently not an option.

Can anyone point out what options I might have? I'd like to cache a small number of DNS calls, (~1000 to 5000), and have DNS run through my gateway slackware 12.1 box. That box would make outside queries for addresses not in the cache, or for which the cache was getting stale on.

Any pointers? Thanks.
 
Old 10-27-2008, 02:04 PM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 587

Rep: Reputation: 32
Quote:
Originally Posted by linuxbird View Post
For lots of reasons, all the machines here have static IPs, so using the DNS caching capability of dnsmasq is apparently not an option.
Well, I am not familiar with dnsmasq too much but I can't see what way static IPs flows on the DNS caching capability of dnsmasq.
 
Old 10-27-2008, 03:30 PM   #3
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by dorian33 View Post
Well, I am not familiar with dnsmasq too much but I can't see what way static IPs flows on the DNS caching capability of dnsmasq.
dnsmasq provides for dns cacheing of dhcp clients. Since my IPs are static, DHCP is not used for any of them, and therefore the dnsmasq dns cacheing capability cannot be used.

If I had dynamic IPs, allocated by dhcp, then the question would be moot, since I could use dnsmasq.

Does anyone have a suggested solution?
 
Old 10-27-2008, 04:08 PM   #4
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 587

Rep: Reputation: 32
Could you point the part of the dnsmasq manual which states that it serve DNS resolution ONLY for hosts with IPs got from DHCP ?
 
Old 10-27-2008, 04:20 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
dnsmasq provides for dns cacheing of dhcp clients. Since my IPs are static, DHCP is not used for any of them, and therefore the dnsmasq dns cacheing capability cannot be used.
This is incorrect - you may give out static IP's through static DHCP and Dnsmasq is set up to do this if you wish. Simply build a table in dnsmasq mapping ip's to mac addresses and then those IP's will always be given out to the same clients.

I had my network setup this way as it eased setting up gateway and nameserver addresses across the network.

This is defined in the DHCP RFC 2131 here and is known as manual allocation. It forms part of the standard.

You may use dnsmasq in your case in fact it's ideally suited and will cut configuration and administration as well as speeding up DNS access.
 
Old 10-27-2008, 04:26 PM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Could you point the part of the dnsmasq manual which states that it serve DNS resolution ONLY for hosts with IPs got from DHCP ?
It doesn't ! Dnsmasq handles DHCP, DNS forwarding and caching. It's DHCP may be static or even disabled and it's DNS caching may handle all requests should you so desire.
 
Old 10-27-2008, 04:58 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,240

Rep: Reputation: 121Reputation: 121
Have you considered djbdns?
 
Old 10-27-2008, 05:36 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
How about Pdnsd? Low memory footprint, cache surviving reboots, highly configurable.
 
Old 10-29-2008, 08:50 PM   #9
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 316

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by bgeddy View Post
It doesn't ! Dnsmasq handles DHCP, DNS forwarding and caching. It's DHCP may be static or even disabled and it's DNS caching may handle all requests should you so desire.
You are right! I fired up dnsmasq, and low and behold, it started serving dns. I'm not clear on how much it cached, because the times on repeated dns requests does not drop much. I can investigate further.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Enhance your DNS and DHCP services with dnsmasq LXer Syndicated Linux News 0 10-04-2008 06:50 AM
dnsmasq cache dpballey Linux - Networking 3 01-30-2008 06:32 AM
regarding dns cache gimmereeson Linux - Server 4 01-22-2007 07:41 PM
is there a file where dnsmasq stores its cached dns? kublador Linux - Software 0 09-04-2004 07:01 AM
DNS Cache Architect Linux - Networking 2 10-25-2002 04:02 AM


All times are GMT -5. The time now is 02:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration