Tag Archives: dns

NSCD – Cache DNS requests

DNS queries can be an issue on Cloud infrastructure, where SaaS are generally configured using FQDN instead of IP. This means that every time your application needs MySQL or Redis or any of the Platform/Software as a service, a DNS query will be issued.

Sometimes this could hammer the local DNS and service providers might block your DNS traffic.

To minimise this, you could use nscd to cache the DNS queries and reduce the traffic to the local DNS servers.

DNS updated via DHCP: BIND9 and ISC-DHCP on Linux

Linux: Debian stable (currently version 7)

Packages:

Create a key required for DHCP server to update the DNS zones:

This will create /etc/bind/rndc.key, whose contents will look something like this:

BIND configuration

Configuration files:

 

/etc/hosts

 

/etc/bind/named.conf.local

 

/etc/bind/named.conf.options

(just to setup the external forwarders)

 

/etc/bind/db.lab.loc

 

/etc/bind/db.10.0.60

 

DHCP configuration

Here there is just one file that has to be modified: dhcpd.conf

/etc/dhcp/dhcpd.conf

Here we need to enter the key in plain text.

 

Once everything is configured, just restart bind and dhcp:

 

Sources:

https://www.centos.org/docs/4/html/rhel-rg-en-4/s1-bind-zone.html