<<Back to Linux Main Page
To resolve the SCAN IPs in round robin fashion you need DNS configuration. If you are installing RAC on your laptop for practice purpose, It is obvious that you don't have DNS server. In this post I will explain you, how you can configure DNS server which you can use to resolve SCAN IPs to install and configure oracle RAC
Step by Step How to Configure DNS Server for Oracle RAC Installation
Step1: Install Bind Packages
Bind packages are required to configure DNS. Check whether the required bind packages are installed. To see what packages are installed you can use rpm or yum command
#rpm –qa bind*
#yum list installed bind*
Install individual packages using yum or rpm Utility. Here I am using rpm
#rpm -ivh bind-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-dyndb-ldap-10.0-5.el7.x86_64.rpm
#rpm -ivh bind-libs-lite-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-utils-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-libs-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-chroot-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-license-9.9.4-37.el7.noarch.rpm
#rpm -ivh bind-pkcs11-libs-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-pkcs11-9.9.4-37.el7.x86_64.rpm
#rpm -ivh bind-pkcs11-utils-9.9.4-37.el7.x86_64.rpm
Step2: Configure named.conf
Configure named.conf . If /etc/named.conf does not exist then create using vi /etc/named.conf
and modify exactly as shown below
options{
directory "/var/named";
};
zone "oracle.com" {
type master;
file "oracle.com.zone";
allow-transfer {192.9.1.1;};
};
zone "1.9.192.in-addr.arpa" {
type master;
file "1.9.192.in-addr.arpa.zone";
};
We have defined two zone files here oracle.com.zone for forward zone and 1.9.192.in-addr.arpa for reverse zone in /etc/named.conf . These files will be stored in /var/named/ location. Lets Configure these two files as well.
Step3: Configuring forward and Reverse Lookup Zone Files
Configure forward lookup zone file oracle.com.zone
modify or create the file /var/named/oracle.com.zone exactly as shown below
$TTL 86400
@ SOA oracle.com. root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ NS dns.oracle.com.
dns A 192.9.1.102
node1 A 192.9.1.100
node2 A 192.9.1.101
storage A 192.9.1.105
scan A 192.9.1.120
scan A 192.9.1.121
scan A 192.9.1.122
node1-vip A 192.9.1.150
node2-vip A 192.9.1.151
Configure reverse lookup zone file oracle.com.zone
modify or create the file /var/named/1.9.192.in-addr.arpa.zone exactly as shown below
$TTL 86400
@ IN SOA oracle.com. root.dns.oracle.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS dns.oracle.com.
100 IN PTR node1.oracle.com.
101 IN PTR node2.oracle.com.
105 IN PTR storage.oracle.com.
150 IN PTR node1-vip.oracle.com.
151 IN PTR node2-vip.oracle.com.
120 IN PTR scan.
121 IN PTR scan.
122 IN PTR scan.
Step4: Change the Zone file ownership
Change the owner ship of these zone files to named group.
#chown root:named /var/named/1.9.192.in-addr.arpa.zone
#chown root:named /var/named/oracle.com.zone
Step5: Start named Service
#systemctl start named.service
#systemctl enable named.service
Step6: Verify the Status of Named Service
Check if the named service is up and running
#systemctl status named.service
Step7: Configure DNS Clients
How to Configure DNS Clients
Configuring DNS client is pretty easy just make an entry of your DNS server in /etc/resolv.conf
search oracle.com
nameserver 192.9.1.102 <= this is the IP of DNS server
As you can see in the screenshot below the scan IPs are resolved in round-robin fashion. This is the main reason to use DNS for scan Listener in RAC.
Hi. Is the DNS on the node's machine or on a separate machine? And what are the adapter settings for DNS? Like is it Bridged, Private, Host only ?
ReplyDeletedns A 192.9.1.102
Deleteseparate machine.
it could be the node for an other RAC.
just for fun everything is possible
Hi In this article I installed DNS on separate server . Network and other configuration of DNS node is same as other RAC nodes. The blog is for education propose only. In real life DNS is separate entity and not managed by DBA at all.
Delete