Disclaimer

Wednesday 14 July 2021

DNS Configuration for the SCAN used with Oracle RAC Database

How to Configure DNS Server on OEL7 for RAC


Step by Step DNS Server Configuration


Step1:

Bind packages are required to configure DNS. Check whether the required bind packages are installed                to see what packages are installed execute

rpm –qa bind*

            Install individual packages using yum or rpm Utility. Here I am using rpm

rpm -ivh bind-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-dyndb-ldap-10.0-5.el7.x86_64.rpm
rpm -ivh bind-libs-lite-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-utils-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-libs-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-chroot-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-license-9.9.4-37.el7.noarch.rpm
rpm -ivh bind-pkcs11-libs-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-pkcs11-9.9.4-37.el7.x86_64.rpm
rpm -ivh bind-pkcs11-utils-9.9.4-37.el7.x86_64.rpm


Step2:

Configure named.conf if not existing then create using vi /etc/named.conf
and modify exactly as shown below


options{
        directory "/var/named";
};
zone "oracle.com" {
        type master;
        file "oracle.com.zone";
        allow-transfer {192.9.1.1;};
};
zone "1.9.192.in-addr.arpa" {
        type master;
        file "1.9.192.in-addr.arpa.zone";
};


We have defined two zone files here oracle.com.zone for forward zone and 1.9.192.in-addr.arpa for reverse zone. These files will be stored in /var/named/ location. Configure these two files as below.



Step3:

Configure forward lookup zone file oracle.com.zone
modify or create the file /var/named/oracle.com.zone exactly as shown below


$TTL    86400
@                SOA           oracle.com.       root (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
@              NS              dns.oracle.com.
dns            A               192.9.1.102
node1          A               192.9.1.100
node2          A               192.9.1.101
storage        A               192.9.1.105
scan           A               192.9.1.120
scan           A               192.9.1.121
scan           A               192.9.1.122
node1-vip      A               192.9.1.150
node2-vip      A               192.9.1.151


Step4:

Configure reverse lookup zone file oracle.com.zone
modify or create the file /var/named/1.9.192.in-addr.arpa.zone exactly as shown below


$TTL    86400
@       IN      SOA     oracle.com. root.dns.oracle.com.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      dns.oracle.com.
100     IN      PTR     node1.oracle.com.
101     IN      PTR     node2.oracle.com.
105     IN      PTR     storage.oracle.com.
150     IN      PTR     node1-vip.oracle.com.
151     IN      PTR     node2-vip.oracle.com.
120     IN      PTR     scan.
121     IN      PTR     scan.
122     IN      PTR     scan.



Step5:

Change the owner ship of these zone files to named group.


Step6:

Start named Service


systemctl start named.service
systemctl enable named.service


Step7:

Check if the named service is up and running

systemctl status named.service


How to Configure DNS Clients:-


Configuring DNS client is pretty easy just make an entry of your DNS server in /etc/resolv.conf


search  oracle.com
nameserver 192.9.1.102



As you can see in the screenshot below the scan IPs are resolved in round-robin fashion. 
This is the main reason to use DNS for scan Listener in RAC.









No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...