linux DNS Server in Oracle 11g RAC environment

Keywords: DNS Linux yum Database

When installing oracle 11g rac, SCAN IP needs DNS parsing. In the absence of an external DNS server, DNS Server is deployed on the database server (linux) for DNS parsing SCAN IP.

The database server guarantees the redundancy of DNS parsing. DNS server s are deployed on each node in alternate mode.

Noe1 first resolves SCAN domain name through the DNS server of Noe1. If there is a problem with DNS service, the next hop resolves DNS through the DNS server of Noe2.
Noe2 first resolves SCAN domain name through the DNS server of Noe2. If the DNS service has problems, the next hop resolves the DNS domain name through the DNS server of Noe1.

/ / install DNS
RHEL 6.4 Install DNS Service (bind-9.8)

First install yum and use yum to install bind

yum install bind*

Different operating systems may have different rpm packages

    bind-9.8.2-0.17.rc1.el6.x86_64
    bind-utils-9.8.2-0.17.rc1.el6.x86_64
    bind-chroot-9.8.2-0.17.rc1.el6.x86_64
    bind-dyndb-ldap-2.3-2.el6.x86_64
    bind-libs-9.8.2-0.17.rc1.el6.x86_64

After several rpm packages are installed, edit named.conf

/ / configuration
[root@linux named]# vi /etc/named.conf

//
// 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 { any; };  //modify
    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; };    //modify
        allow-query-cache { any; };  //modify
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* 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;
        };
};
//Add the following records
zone "racdb.com" IN {
        type master;
        file "named.racdb.com";

};

zone "1.168.192.in-addr.arpa" IN {
        type master;
        file "named.192.168.1";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

[root@linux named]# cd /var/named
[root@linux named]# vi named.racdb.com

$TTL 1D
@   IN SOA  @ root.racdb.com. (
                    0   ; serial
                    1D  ; refresh
                    1H  ; retry
                    1W  ; expire
                    3H )    ; minimum
@       IN     NS       localhost.
racscan IN      A       192.168.1.200;
racscan IN      A       192.168.1.199;
racscan IN      A       192.168.1.198;

[root@linux named]# vi named.192.168.1

$TTL 3600
@      IN      SOA   racdb.com. root.racdb.com. (
                                                2014102402
                                                1H
                                                5M
                                                1w
                                                1D )
@      IN      NS     racdb.com.
200     IN      PTR     racscan.
199     IN      PTR     racscan.
198     IN      PTR     racscan.

[root@linux named]# vi /etc/resolv.conf

# Generated by NetworkManager


# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
search     racdb.com
nameserver 192.168.1.111

Check configuration files

[root@linux named]# named-checkzone racdb.com named.racdb.com
zone racdb.com/IN: loaded serial 0
OK
[root@linux named]# named-checkzone 1.168.192.in-addr.arpa named.192.168.1
zone 1.168.192.in-addr.arpa/IN: loaded serial 2014102402
OK
[root@linux named]# service named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]

Generating/etc/rndc.key: Card here, test below

[root@node1 named]# rndc-confgen -r /dev/urandom -a 
wrote key file "/etc/rndc.key"
[root@node1 named]# service named start
Starting named: [  OK  ]
[root@linux named]# chkconfig named on 
[root@linux named]# nslookup racscan
Server:     192.168.1.111
Address:    192.168.1.111#53

Name:   racscan.racdb.com
Address: 192.168.1.198
Name:   racscan.racdb.com
Address: 192.168.1.200
Name:   racscan.racdb.com
Address: 192.168.1.199

Reverse analysis:

[root@linux named]# nslookup 192.168.1.200
Server:     192.168.1.111
Address:    192.168.1.111#53

200.1.168.192.in-addr.arpa  name = racscan.
[root@linux named]# nslookup 192.168.1.199
Server:     192.168.1.111
Address:    192.168.1.111#53


199.1.168.192.in-addr.arpa  name = racscan.
[root@linux named]# nslookup 192.168.1.198
Server:     192.168.1.111
Address:    192.168.1.111#53

198.1.168.192.in-addr.arpa  name = racscan.

Posted by pureDesi on Sat, 09 Feb 2019 19:51:18 -0800