Configuring DNS Server on Oracle Linux 7.5 (For Oracle RAC)


To install and configure Oracle RAC (11gR2+), we know that we need a DNS server for Scan IP resolution. Ofcourse, using /etc/hosts we can manage but obviously every customer uses DNS. In this post, we will be seeing how to configure DNS Server on Oracle Linux 7.5 for RAC. It is really a simple process.

First install Oracle Linux 7 and install the bind rpm:

yum install bind

Edit /etc/hosts   localhost localhost.localdomain dns

Now edit /etc/named.conf. I made only 3 changes in named.conf. They are highlighted below:

options {
listen-on port 53 {;; };
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";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost;; };

Now add the below forward and reverse lookup configuration at the end of the named.conf:

zone "." IN {
type hint;
file "";

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

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

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

So this means the forward lookup file name is and the reverse lookup file name is Create these 2 files in /var/named as below:

[root@dns ~]# cat /var/named/
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A
racs1 IN A
racs2 IN A
racs1-priv IN A
racs2-priv IN A
racs1-vip IN A
racs2-vip IN A
racs-scan IN A
racs-scan IN A
racs-scan IN A

[root@dns ~]# cat /var/named/
@ IN SOA ( 2
1H ) IN NS
101 IN PTR
102 IN PTR
111 IN PTR
112 IN PTR
121 IN PTR
122 IN PTR
123 IN PTR

So we basically created the DNS entries for RACS1 and RACS2 nodes where the scan name is RACS-SCAN. Now simply restart the named service:

systemctl restart named

Then run below nslookup commands to verify forward and reverse lookup name resolution:

[root@dns ~]# nslookup
[root@dns ~]# nslookup
Address: name =

Disable the firewall in your Oracle Linux 7:

systemctl disable firewalld


Please enter your comment!
Please enter your name here