Configure DNS for SCAN IP in Oracle RAC

Configure DNS for SCAN IP in Oracle RAC with named service

Edit the hosts file present in Linux at /etc/hosts

[root@racnode1 named]# cat /etc/hosts
######-- SCAN IP -----############################
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
############--------------PUBLIC ------------ ###########
192.168.1.50      racnode1.india.com           racnode1
192.168.1.51      racnode2.india.com           racnode2
####### --------------------- VIP ------------------ ###########
10.10.10.10       racnode1-priv.india.com      racnode1-priv
10.10.10.20       racnode2-priv.india.com      racnode2-priv
####### ----------------  eth1 - PRIVATE ----------- ###########
192.168.1.60      racnode1-vip.india.com       racnode1-vip
192.168.1.61      racnode2-vip.india.com       racnode2-vip
#######################-- SCAN IP -----############################
192.168.1.70  racnodescan.india.com    racnodescan
192.168.1.71  racnodescan.india.com    racnodescan
192.168.1.72  racnodescan.india.com    racnodescan

Edit the named file for DNS Server

[root@racnode1 named]# pwd
/var/named/chroot/var/named

Create two file india.com.zone and 1.168.192.zone file as named or domain used in host file

[root@racnode1 named]# ls -ltr
total 24
drwxrwx--- 2 named named 4096 Jul 27  2004 slaves
drwxrwx--- 2 named named 4096 Aug 25  2004 data
-rw-r--r-- 1 root  root   700 Jul 16 09:05 india.com.zone
-rw-r--r-- 1 root  root   787 Jul 16 09:06 1.168.192.zone

Edit the two files as follows:

[root@racnode1 named]# more india.com.zone
$TTL    1d
india.com.  IN    SOA   lab-dns.india.com. root.india.com. (
    100        ; se = serial number
  8h         ; ref = refresh
    5m         ; ret = update retry
    3w         ; ex = expiry
    3h         ; min = minimum
    )

IN    NS    lab-dns.india.com.

; DNS server

lab-dns    IN    A    192.168.1.1
 
; RAC Nodes Public name
 
racnode1          IN    A    192.168.1.50
racnode2          IN    A    192.168.1.51
racnode2          IN    A    192.168.1.51
 
 
; RAC Nodes Public VIPs
 
racnode1-vip      IN    A    192.168.1.60
racnode2-vip      IN    A    192.168.1.61
 
; 3 SCAN VIPs
 
racnodescan       IN    A    192.168.1.70
racnodescan       IN    A    192.168.1.71
racnodescan       IN    A    192.168.1.72
 

 
[root@racnode1 named]# more 1.168.192.zone
$TTL    1d
@   IN    SOA   lab-dns.india.com. root.india.com. (
    100        ; se = serial number
    8h         ; ref = refresh
    5m         ; ret = update retry
    3w         ; ex = expiry
    3h         ; min = minimum
    )
 
    IN    NS    lab-dns.india.com.
 
; DNS machine name in reverse
1        IN    PTR racnode.india.com.
 
; RAC Nodes Public Name in Reverse
 
50          IN    PTR racnode1.india.com.
51         IN    PTR racnode2.india.com.
 
; RAC Nodes Public VIPs in Reverse
 
60          IN    PTR      racnode1-vip.india.com.
61          IN    PTR      racnode2-vip.india.com.
 
; RAC Nodes SCAN VIPs in Reverse
 
70         IN    PTR      racnodescan.india.com.
71         IN    PTR      racnodescan.india.com.
72         IN    PTR      racnodescan.india.com.

configure named.conf file

[root@racnode1 etc]# pwd
/var/named/chroot/etc

[root@racnode1 etc]# ls
india.com.zone  localtime  named.conf  named.conf~  rndc.key

[root@racnode1 etc]# more named.conf
// Enterprise Linux BIND Configuration Tool
//
// Default initial "Caching Only" name server configuration
//

options {
       directory "/var/named";
       dump-file "/var/named/data/cache_dump.db";
      statistics-file "/var/named/data/named_stats.txt";
};

// Zone for this RAC configuration is hingu.net

zone "india.com" in {
  type master;
  file "india.com.zone";
  allow-update { none; };
};

// For reverse lookups

zone "1.168.192.in-addr.arpa" in {
  type master;
  file "1.168.192.zone";
  allow-update { none; };
};

include "/etc/rndc.key";

Restart the named service for configure scan ip

[root@racnode1 etc]# start named service

then check the scan ip is resolved by named service.

nslookup racnodescan

Advertisements

One thought on “Configure DNS for SCAN IP in Oracle RAC

  1. Pingback: [INS-40922] Invalid SCAN Name – Unresolvable to IP Address | Smart way of Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.