Monthly archive August, 2010

BIND Tip – Dumping The Cache

Thought it would be useful to document a useful command while learning how to operate BIND.  I set BIND9 up on my print server and was trying to examine how much resources it was consuming.  I found the following command helpful – it dumps the current BIND9 database from memory to /var/cache/bind (by default):

sudo rndc dumpdb –all

After that I simply navigated to /var/cache/bind and issued the command

ls –lah

and was shown that it consumes 649K in memory from the output of the command above:

-rw-r--r--  1 bind bind 649K 2010-05-02 08:15 named_dump.db

I’m not a BIND expert and am actually stumbling around with some custom zone settings but I thought this was worth mentioning.  I’m also assuming this is quite small for a db size since this was only setup for testing for a 1 user network.  Nevertheless, it would be useful to check that you have adequate memory to handle the database size if you are deploying a DNS server for your network. I believe you can also limit the cache size if needed, but I don’t think I’ll be needing that option added to my config anytime soon.

If you haven’t already, read up on the rndc command – because it’s quite powerful.  In addition, make sure you are using the latest stable version of BIND to (as well as other benefits) protect against cache poisoning.