Koozali.org: home of the SME Server

TinyDNS Caching server - How to keep cached data?

Offline Lum-chan

  • **
  • 29
  • +0/-0
    • The World of Urusei Yatsura's Lum
TinyDNS Caching server - How to keep cached data?
« on: February 27, 2012, 06:25:07 PM »
I did some searching on TinyDNS and found out that if the SME box is restarted, the cache of TinyDNS is emptied. Is there a way to make TinyDNS keep the cached data after a restart and still have the most actual DNS info in the cache?
I couldn't find such an option anywhere in the server-manager or is there a contrib available which in which you can setup this?

I'm using SME 7.5.1 with all available updates installed in 'Server Only' mode
Lum-chan

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: TinyDNS Caching server - How to keep cached data?
« Reply #1 on: February 27, 2012, 06:39:56 PM »
do you have any specific reason for it?

Offline Lum-chan

  • **
  • 29
  • +0/-0
    • The World of Urusei Yatsura's Lum
Re: TinyDNS Caching server - How to keep cached data?
« Reply #2 on: February 27, 2012, 06:59:16 PM »
As I use my SME box as the default DNS server for my local network and the lookup of external DNS servers is not reliable enough (crappy ADSL connection), it would be nice if the cache from the SME box is not deleted when a restart is issued (powerdown on end of working day)

I have no additional DNS server configured for the clients (WindowsXP SP3). The main reason for my question/request is my crappy connection which prevents reliable DNS resolving. When I installed SME this all was fixed but every morning it needs to resolve at least one time for each URL to the root-servers (I have the DNS field left blank in the setup of SME). Keeping the cache available after a (re)start while keeping the TTL to refresh any changes in the DNS as specified by the RFC(?) regulations.

Using OpenDNS or the DNS-servers of my provider didn't help but installing SME as a caching nameserver did fix most of my resolving problems
« Last Edit: February 27, 2012, 07:03:08 PM by Lum-chan »
Lum-chan

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: TinyDNS Caching server - How to keep cached data?
« Reply #3 on: February 28, 2012, 11:48:13 AM »
Sorry for the tough answer: let your server on all times... using a UPS (APC has good ones!)

...

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: TinyDNS Caching server - How to keep cached data?
« Reply #4 on: February 28, 2012, 02:59:50 PM »
FYI -
SME uses tinydns as the DNS server for sme-hosted domains. For all dns lookups, it uses dnscache.

I can't find any indication that dnscache stores anything on disk, so I don't know how you'd be able to preserve the state through a reboot.

Offline Lum-chan

  • **
  • 29
  • +0/-0
    • The World of Urusei Yatsura's Lum
Re: TinyDNS Caching server - How to keep cached data?
« Reply #5 on: February 29, 2012, 09:16:28 AM »
Thanks for all your suggestions. I checked the documentation for dnscache and if I read it correctly, it uses a pre-configured amount of memory to keep the cache. No problem and as stated by jader, I'll try to move the server to a powersocket which always supplies power.

Thanks again!
Lum-chan

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: TinyDNS Caching server - How to keep cached data?
« Reply #6 on: February 29, 2012, 04:48:15 PM »
I can't find any indication that dnscache stores anything on disk, ...

It doesn't.