首页 > 数据库 > Oracle > Configure the DNS Server for SCAN VIP on Linux

Configure the DNS Server for SCAN VIP on Linux

原创 Oracle 作者:ygzhou518 时间:2011-12-06 14:28:00 0 删除 编辑

How to Configure the DNS Server for SCAN VIP on Linux for 11gR2 GI installation [ID 1107295.1]
                                                                             Modified 16-SEP-2010     Type HOWTO     Status PUBLISHED 

In this Document


Applies to:
Oracle Server - Enterprise Edition - Version: to - Release: 11.2 to 11.2
Linux x86
Linux x86-64
Linux Itanium
The commands listed in this Note tested at Red Hat Enterprise Server 5 Update 2. For the other Linux enviroments it should be similar.

This note explains how to configure the DNS to accommodate SCAN-VIP. In most cases this task is carried out by the Network Administrator, but awareness of these steps can be very useful for assisting your network administrator in configuring DNS properly for SCAN and/or provide the ability to configure DNS in a sandbox enviroment.

If there is no separate DNS Server box available for your test case, you can have one of the cluster nodes (example: rac1 or rac2) also acting as the DNS server. Note, however, that using one of your cluster nodes as your DNS server is not supported in production.

This note will demonstrate how to prepare the SCAN-IP on a Linux DNS Server:

When installing Grid Infrastructure, there are 2 options:

    1. Configure GNS and let it handle name resolution
    2. Choose not to configure GNS and configure each Node and SCAN name with IP addresses defined in DNS

For the purpose of this note, we will not involve GNS (see Note:946452.1 for how to configure GNS).

The three nodes involved in this case are:  rac1, rac2, and dns1.  The domain is:

Node Name            Public IP            Private IP                VIP IP                  

The target scan-vip name is: rac-scan  
rac-scan will be configued with the following 3 IP addresses:,,

  On install the DNS Server Package:

# yum install bind-libs bind bind-utils
Three packages must be installed on Linux for DNS Server:

bind (includes DNS server, named)
bind-utils (utilities for querying DNS servers about host information)
bind-libs (libraries used by the bind server and utils package)

You can obtain an account from the Yum Server which will install the package for you automatically. 


You can manually download these packages:   

bind.XXX.rpm (for example bind-9.2.4-22.el3.i386.rpm)
And use the rpm command to do the DNS Server installation (For example)
#  rpm -Uvh bind-9.2.3-1.i386.rpm

2. On system edit the "/etc/named.conf" file
a. Configure the "forwarder" under "options" in "/etc/named.conf " (If you do not have another DNS or Router that can resolve names for you, skip this step) :
options {
// Forwarder: Anything this DNS can't resolve gets forwarded to other DNS.
forwarders {; };  // This is the IP for another DNS/Router };

b. Configure Zone Entries for your domain in "/etc/named.conf "  
If you are using localdomain, it has been automatically configured and you can skip this step.
For this case we are using "" so here we need to add the following lines to "/etc/named.conf"

zone "" IN {
type master;
file "";
allow-update { none; };
The "file" parameter specifies the name of the file in the "/var/named/" directory that contains the configuration for this zone.

c. Configure reverse lookup in "/etc/named.conf "
Reverse lookup is used to let the client find out if the hostname matches to the related IP. 
Because we are using 192.168.2.X for VIP and SCAN-VIP so we need to configure the reverse lookup for 192.168.2.X

To configure reverse lookup add the following to "/etc/named.conf"

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

3. On edit the config  files under /var/named
a. Edit the DNS Zone Configuration file:
If you are using localdomain you can edit /var/named/
For this case we edit the file name: and

Add the line below to the end of this file: vi /var/named/

rac1-vip IN A
rac2-vip IN A
rac-scan IN A
rac-scan IN A
rac-scan IN A
Put all the private IPs, VIP and SCAN VIPs in the DNS config file.  If you only want the DNS to resolve the scan-vip, only include the rac-scan with its three corresponding IP addresses in the file.  Also if you only need one SCAN IP, you can put only one entry in the file.

b. Create/Edit the "/var/named/" file for reverse lookups as follows:        -------SCAN-IP網段(

1H ) IN NS

221 IN PTR
222 IN PTR

4. On : stop/start DNS Server to ensure it can be successfully restarted and make sure the DNS Server will be started automatically:

# service named stop
# service named start
# chkconfig named on

The DNS Server configuration has been completed, next we need to point our RAC nodes to use this DNS server for name resolution.

5. Configure "/etc/resolv.conf" on all nodes:

search localdomain

It should point to the DNS Server Address.  In this case nameserver has been set to the IP address of dns1.  If the node itself is also acting as the DNS Server it should point to its own IP address.

6. Change the hosts search order in  /etc/nsswitch.conf on all nodes:

hosts: dns files nis

The default sequence is: files nis dns; We must move dns to the first entry.

At this point the configuration is complete.  We should be able to test the forward and reverse lookups using the "nslookup" command.

# nslookup


# nslookup
Address: name =

# nslookup
Address: name =

# nslookup
Address: name =

If we try to ping at this moment you will find it will display one of our SCAN ip addresses but it will not be able to be reached. This is correct behavior.

Once the GI software has been installed and is running it will bring these IP addresses online and at that point the SCAN should be resolvable.

NOTE:811293.1 - RAC Assurance Support Team: RAC Starter Kit and Best Practices (AIX)
NOTE:887522.1 - 11gR2 Grid Infrastructure Single Client Access Name (SCAN) Explained
NOTE:946452.1 - DNS and DHCP Setup Example for Grid Infrastructure GNS


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量