Reference site:https://jtechspot.com/dns-setup-for-oracle-rac-environment/This articles provides basic DNS Configuration setup which is important part in Oracle RAC Environment to use Single Client Access Name (SCAN)
# cd /var/named/chroot/etc
# vi named.conf
options { listen-on port 53 { 192.168.78.51; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; }; zone "racdomain.com" { type master; file "racdomain.com.fwd.zone"; }; zone "localhost" { type master; file "localhost.fwd.zone"; }; zone "78.168.192.in-addr.arpa" { type master; file "192.168.78.rev.zone"; }; zone "0.0.127.in-addr.arpa" { type master; file "localhost.rev.zone"; };
# cd ../var/named
# vi racdomain.com.fwd.zone (forward zone)
$TTL 1D @ IN SOA racnode1.racdomain.com. root.localhost ( 2015111000 ; serial 8H ; refresh 4H ; retry 1W ; expiry 1D ) ; minimum @ IN NS racnode1.racdomain.com. localhost IN A 127.0.0.1 dns1 IN A 192.169.78.51 racnode1 IN A 192.168.78.51 racnode2 IN A 192.168.78.52 racnode1-priv IN A 172.16.100.50 racnode2-priv IN A 172.16.100.60 racnode1-vip IN A 192.168.78.53 racnode2-vip IN A 192.168.78.54 rac-scan IN A 192.168.78.60 IN A 192.168.78.61 IN A 192.168.78.62
# vi localhost.fwd.zone
(forward zone)
$TTL 1D @ IN SOA racnode1.racdomain.com. root.localhost ( 2015111000 ; serial 8H ; refresh 4H ; retry 1W ; expiry 1D ) ; minimum IN NS @ IN A 127.0.0.1
# vi 192.168.78.rev.zone
(reverse zone)
$TTL 1D @ IN SOA racnode1.racdomain.com. root.localhost ( 2015111000 ; serial 8H ; refresh 4H ; retry 1W ; expiry 1d ) ; minimum @ IN NS racnode1.racdomain.com. 51 IN PTR racnode1.racdomain.com. 52 IN PTR racnode2.racdomain.com. 53 IN PTR racnode1-vip.racdomain.com. 54 IN PTR racnode2-vip.racdomain.com.
# vi localhost.rev.zone
(reverse zone)
$TTL 1D @ IN SOA racnode1.racdomain.com. root.localhost ( 2015111000 ; serial 8H ; refresh 4H ; retry 1W ; expiry 1d ) ; minimum IN NS localhost. 1 IN PTR localhost.
# cat /etc/resolv.conf
; generated by /sbin/dhclient-script search racdomain.com nameserver 192.168.78.51 nameserver 127.0.0.1 options attempts: 2 options timeout: 1
Disable the Firewall run below commands
# chkconfig iptables off
# service iptables stop
-- Prevent to reset the resolv.conf on reboot # chattr +i /etc/resolv.conf to undo # chattr -i /etc/resolv.conf # lsattr /etc/resolv.conf ---## shows the output editable or not Restart the Service # service named start OUTPUT Starting named: [ OK ]
# nslookup racnode1
OUTPUT
Server: 192.168.78.51 Address: 192.168.78.51#53 Name: racnode1.racdomain.com Address: 192.168.78.51
# nslookup rac-scan
OUTPUT
Server: 192.168.78.51 Address: 192.168.78.51#53 Name: rac-scan.racdomain.com Address: 192.168.78.62 Name: rac-scan.racdomain.com Address: 192.168.78.60 Name: rac-scan.racdomain.com Address: 192.168.78.61
Reference site:https://jtechspot.com/dns-setup-for-oracle-rac-environment/