Configuring SCAN for Oracle RAC Database

This blog is only for Oracle RAC Setup, I am not a network expert but I used my skills to collect knowledge from different blogs and compiled it in a easy way here. I found it bit difficult initially when i did not know anything about DNS and SCAN IP.

For this Setup I will be using my RAC Node 1 to be working as a DNS Server. Configuration of Node 1 is like below:


Step 1 – Install Bind Packages, we will be using the chroot part for SCAN configuration here

Bind packages are available under default yum repositories. To install packages simple execute below command.

# yum install bind bind-chroot

If you don’t have yum repository installed, like I did not have it. So you can use the rpm repository also which is there with the ISO Image file for your Operating system.

Mount it in your RAC Node 1 VM:, select the VM, go to stetting and browse the iso image for OS and click Open. Make Sure Device Status is Connected on Top.



Device Status is checked as connected, else you wont see this ISO file in the OS.



Now you can see iso image has been mounted in /media. Go to packages folder in the media folder.


Install bind and bind-chroot:


Step 2 – Edit Main Configuration File

Default bind main configuration file is located under /etc directory. But using chroot environment, this file is located under /var/named/chroot/etc directory. Now edit main configuration file and update content as below.


[root@node1 ~]# cat /var/named/chroot/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 {;; };
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; };
allow-query-cache { localhost; };
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/”;
severity dynamic;

zone “.” IN {
type hint;
file “”;

zone “DNS-Search” IN {
type master;
file “”;
allow-update { none; };

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

[root@node1 ~]#



I have kept the important configuration in Bold.

Step 3 – Create Zone Files for Your Domain

After creating bind main configuration file, create a zone file for you domain as per configuration:

We have to make sure the names of the files must match with the names we configured in named.conf file. Name could be anything but meaningful. file:

5 file:


Finally for the Reverse Resolution:


Step 5 : Configure /etc/resolve.conf

On Node 1: /etc/resolve.conf file must have this configuration. Remember our named.conf file has this entry – DNS-Search, so this value will be picked up from here and accordingly it will go to search for a file to get the configuration.


And on Node 2 – you only have to make this change on Node 2, rest anything you don’t have to do on Node 2. Only /etc/resolve.conf must be edited to have the DNS Server Setting:


Step 6: Start Bind Service

Start named (bind) service using the below command:

[root@node1 ~]# service named restart
Enable auto start on system boot.

[root@node1 ~]# chkconfig named on

Step 6: Test the Scan Configuration

Check the /etc/hosts file for our setup from node 1 and node 2:


Notice that SCAN IP in /etc/hosts is commented because we are using DNS Configuration to resolve this.

Now we can nslookup all our Node’s IPs – Public, Private, Virtual and SCAN IP:

Below is the example for SCAN IP, you can notice every time it picks up a different IP.


We can also check for other nodes too to verify the configuration.


We are good with this configuration.

Let me know if any question.






Leave a Reply

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

You are commenting using your 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

%d bloggers like this: