[TAG] (forw) Thanks for your DNS articles in LG
rick at linuxmafia.com
Tue Jan 5 05:27:09 MSK 2010
Quoting PeterHuewe at gmx.de:
> I just stumbled upon your DNS articles in Linux Gazette and although I first
> though this topic is not that interesting for me it turned out to be really
> really interesting!
I'm delighted that you found those pieces worthwhile reading.
[running a local copy of Unbound:]
> The only minor drawback I see is that (as I have to run it locally on
> my box - yes I'm one of your oddballs :) it looses its cache after
> reboot. - do you happen to know if there is something I could do
> against that?
Yes, indeed, most recursive nameservers use RAM-based caches, and
Unbound certainly is among them. That would indeed be at least slightly
irritating with workstations/laptops that get restarted frequently.
I can think offhand of two candidate solutions:
1. dnscache from Dan Bernstein's djbdns package is the sole exception
I know of to that generalisation about RAM-based caches. Instead, it
back-ends into an embedded copy of Bernstein's disk-based "cdb"
("constant database") package, http://cr.yp.to/cdb.html . As I
mentioned in my article, there are four maintained forks of Prof.
Bernstein's package. You could try one of those.
Prof. Bernstein's software tends to be... how shall I put it... a bit
eccentric in its design and operation, and I have only limited
experience with it, for a number of reasons. Indeed, there's a certain
lovely irony in my recommending his software, having been among the
best-known critics of both his past licensing and some aspects of its
operation. However, you might try it and see if you like it.
2. It might be possible to use a recursive server with a RAM-based
cache in conjunction with pdnsd
is a forwarder with disk-based cache, written specifically to service
workstations/laptops likely to getting rebooted. From that perspective,
it's a pity that pdnsd is just a forwarder -- but my idea is to have
/etc/resolv.conf point to an instance of pdnsd (thus getting the benefit
of its persistent disk-based cache), and having pdnsd in turn point to a
full-service recursive nameserver such as Unbound.
Alas, I'm not 100% sure how one would configure such a setup, especially
on a dynamic-IP workstation. You would have to play with the software,
to see if that could be made to work. E.g., it might be possible to
make Unbound listen for queries on localhost port 9999 (picking an
example port number), and configure pdnsd issue queries to that same
I hope that helps -- although I'm aware of my answers containing quite a
bit more handwaving than I'm happy with.
Rick Moen "Having the right word is much more satisfying than just
rick at linuxmafia.com sleeping around with any old word that comes along."
More information about the TAG