Operating System - Linux
1752721 Members
6960 Online
108789 Solutions
New Discussion юеВ

Re: howto check if DNS sever caches queries correctly ?

 
SOLVED
Go to solution
Matti_Kurkela
Honored Contributor

Re: howto check if DNS sever caches queries correctly ?

If you want a persistent (=on-disk) cache for some domains you're using a lot, have you considered making your DNS server a "slave" for that zone?

You can be a "stealth-slave": that is, your DNS server does not need to be announced to the world in NS records, so you don't get random queries to that zone from the outside world.

To be a "stealth-slave" for a zone, you first ensure that your server is permitted to "suck" a copy of the desired zone's data from some DNS server that already is authoritative for the zone.

Then you configure something like this in you r named.conf:

zone "some.domain.example" {
type slave;
masters { authoritative.server.ip.addr; };
file { "/etc/bind/slave/db.some.domain"; };
};

Ensure that the bind process can write to the file mentioned in "file" directive, and you're all set. Restart BIND (or say "rndc reconfig" if you've set up rndc properly) and it will automatically fetch the current data for the zone, store it into the file and keep the file up to date.

If the domain's content is changing often, it would be good to have the domain's master server set up an "also-notify" for you: normally a slave server checks periodically on its master for changes to the duplicated zone data, but the master can also send NOTIFY messages to the slaves when the data changes. This is done automatically for official slaves (those mentioned in the zone's NS records), but for stealth-slaves the master server must be configured explicitly to send the notify message, because the master has no other way to know about the slave's existence.
MK
'chris'
Super Advisor

Re: howto check if DNS sever caches queries correctly ?

thanks,

but howto modify the amount of memory bind uses ?
Stuart Browne
Honored Contributor

Re: howto check if DNS sever caches queries correctly ?

There are no configuration options that I'm aware of to do this.

If you're really desperate to limit the amount of memory bind uses, then it's back to the source for you! ;)
One long-haired git at your service...
Bejoy C Alias
Respected Contributor

Re: howto check if DNS sever caches queries correctly ?

Chris,
U cant modify the amount of memory bind uses for caching. The amount of memory which bind allocates is depending upon the total memory u have in ur system.
Be Always Joy ......
'chris'
Super Advisor

Re: howto check if DNS sever caches queries correctly ?

I have 2 questions:

1.) Howto modify the amount of memory bind uses for caching ?

2.) How can I check how much memory uses BIND now ?

Stuart Browne
Honored Contributor

Re: howto check if DNS sever caches queries correctly ?

1) Source code modification, recompile. Not simple.

2) ps -elf | grep named, check the SZ (10th) column, in kilobytes.
One long-haired git at your service...
'chris'
Super Advisor

Re: howto check if DNS sever caches queries correctly ?

thanks, but which one is SZ column ?

# ps -elf | grep named
1 S root 1338 1 0 69 0 - 561 select Jul08 ? 00:00:00 /sbin/syslogd -a /var/lib/named/dev/log
1 S bind 1349 1 0 69 0 - 3002 rt_sig Jul08 ? 00:00:00 /usr/sbin/named -u bind -t /var/lib/named
1 S bind 1352 1349 0 69 0 - 3002 poll Jul08 ? 00:00:00 /usr/sbin/named -u bind -t /var/lib/named
5 S bind 1353 1352 0 70 0 - 3002 rt_sig Jul08 ? 00:00:37 /usr/sbin/named -u bind -t /var/lib/named
1 S bind 1354 1352 0 69 0 - 3002 nanosl Jul08 ? 00:00:00 /usr/sbin/named -u bind -t /var/lib/named
1 S bind 1355 1352 0 69 0 - 3002 select Jul08 ? 00:00:04 /usr/sbin/named -u bind -t /var/lib/named


Stuart Browne
Honored Contributor

Re: howto check if DNS sever caches queries correctly ?

the 10th column. the '3002'. So about 3MB of memory for you.
One long-haired git at your service...