Table of Contents

DNS Config

The configuration of a DNS server is optional, however mandatory if you want Enterprise performance. The DNS should resolve the SCAN Listeners VIPs and it will do that in a round robin fashion. Below you can see a configuration of a DNS server zone:

Named File

That file is located at /etc/named.conf and has the settings for the zones and the location of the zone files. This file does not have the actual zone configurations and IP resolutions.

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.                                                                                                                                                                   
//                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                             
options {                                                                                                                                                                                                                                    
        listen-on port 53 { 192.168.100.20; };                                                                                                                                                                                               
        listen-on-v6 port 53 { ::1; };                                                                                                                                                                                                       
        directory       "/var/named";                                                                                                                                                                                                        
        dump-file       "/var/named/data/cache_dump.db";                                                                                                                                                                                     
        statistics-file "/var/named/data/named_stats.txt";                                                                                                                                                                                   
        memstatistics-file "/var/named/data/named_mem_stats.txt";                                                                                                                                                                            
        allow-query     { any; };                                                                                                                                                                                                            
        recursion yes;                                                                                                                                                                                                                       
                                                                                                                                                                                                                                             
        dnssec-enable yes;                                                                                                                                                                                                                   
        dnssec-validation yes;                                                                                                                                                                                                               
                                                                                                                                                                                                                                             
        /* Path to ISC DLV key */                                                                                                                                                                                                            
        bindkeys-file "/etc/named.iscdlv.key";                                                                                                                                                                                               
                                                                                                                                                                                                                                             
        managed-keys-directory "/var/named/dynamic";                                                                                                                                                                                         
};                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                             
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "myrac.com" IN {
                type master;
                file "myrac.com.zone";
                allow-update { none; };
        };

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

Zone configuration File

The file name should be as defined in “file parameter” in the zone setting and located at: /var/named/file_name

[root@lparacb ~]# cat /var/named/myrac.com.zone 
$TTL 86400
@   IN  SOA     ns1.myrac.com. root.myrac.com. (
        2013042201  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
; Specify our two nameservers
                IN      NS              ns1.myrac.com.
; Resolve nameserver hostnames to IP, replace with your two droplet IP addresses.
ns1             IN      A               192.168.100.20

; Define hostname -> IP pairs which you wish to resolve
lparac-scan     IN      A               192.168.100.101
lparac-scan     IN      A               192.168.100.102
lparac-scan     IN      A               192.168.100.103
lparaca-pub     IN      A               192.168.100.10
lparacb-pub     IN      A               192.168.100.20
lparaca-vip     IN      A               192.168.100.11
lparacb-vip     IN      A               192.168.100.21
lparaca         IN      A               192.168.100.10
lparacb         IN      A               192.168.100.20
[root@lparacb ~]# 

Service Restart

If any changes has been done, a restart of the service is needed

[root@lparacb ~]# service named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]
[root@lparacb ~]#