DNS Configuration for the SCAN used with Oracle RAC Database 11g Release 2

Source: Internet
Author: User
Tags nslookup

This article provides the basic DNS configuration steps necessary for use of the single Client Access Name (SCAN) introduced I n Oracle 11g Release 2 RAC. Consider the following caveats before following the instructions here:

I ' m not a network guy and don ' t claim to know much about DNS.
The article only discusses the use of BIND as the DNS server on Oracle Linux (a RHEL clone).
This represents the minimum-do-a SCAN work. This should is considered a best practice guide as it contains nothing about DNS redundancy or security.
With respect to Vmware/virtualbox RAC installations, this DNS configuration should is done on the host machine, or another Virtual machine separate to the RAC cluster if possible. It could is placed on one of the RAC nodes, but this would mean all name resolution would is lost if that RAC node goes of Fline.
The server used in this article are called "Maggie.localdomain" and as an IP address of "192.168.0.4".
With those caveats in mind, here's what's your need to do.

DNS Installation
"/etc/named.conf" File
"/var/named/" Files
Start the DNS Service
"/etc/resolv.conf" File
Test It
DNS Installation

If you were using a free Linux distribution, like Fedora, then you probably already has a YUM repository configured. If you is using Oracle Linux, then follow the configuration instructions on public-yum.oracle.com.

Installation of the DNS server (BIND) could not being simpler. From the command line issue the following command.

# yum Install bind-libs bind bind-utils
If you want a GUI for DNS editor, you can also install the following package. Personally, I find the GUI editor more confusing than using the configuration files directly.

# yum Install System-config-bind
Note. If the config files are not present (as was the case with Oracle Linux 5), it is worth installing the "System-config-bind" UT Ility and starting it up. This would generate a default setup of all the dependent config files for your to amend. It is much easier than trying to build them manually.

"/etc/named.conf" File

Next We must edit the contents of the "/etc/named.conf" file. Depending on the setup you require, your may need to make lots of changes, or none at all. For my home network I use "Localdomain" as my domain and the IP range "192.168.0.*", so this is what I'll show here.

We need to make sure the DNS are listening on the correct port for both the local and external IP address. This is do by the "listen-on" setting. This DNS server was only resolving the names of the servers on my network, so I need to make sure that servers on external Networks, like the Internet, is resolved properly. To does this you add a "forwarder" entry to the end of the "Options" section.

Options {
Set IP address correctly.
Listen-on Port 53 {127.0.0.1; 192.168.0.4;};

//
Leave the rest of the config as it is.
//

My Additions
Forwarder:anything This DNS can ' t resolve gets forwarded to my ISPs DNS.
Forwarders {194.168.4.100; 194.168.8.100;};
End My Additions
};
In this case I ' m using the DNS information provided by my ISP, but you could list your ADSL Router if it manages the DNS F Or you.

Since i ' m using "localdomain" as my internal domain, I need to add a zone if one isn ' t already present.

Zone "Localdomain." in {
Type master;
File "Localdomain.zone";
allow-update {none;};
};
If you plan to use a different domain simply copy this entry and the adjust it to match your domain. For example, if the were an entry for "oracle-base.com" I would create a zone as follows.

Zone "Oracle-base.com" in {
Type master;
File "Oracle-base.com.zone";
allow-update {none;};
};
The "file" parameter specifies the name of the file in the "/var/named/" directory that contains the configuration for thi S zone.

If you have care on forward lookups then you is now finished with the "/etc/named.conf" file. If you want to also cope with reverse lookups you'll need to add a extra zone to cope with those. In the case of a RAC installation, I want to create reverse lookups for my public (192.169.0.*) network, so I must add the Following zone entry.

Zone "0.168.192.in-addr.arpa." in {
Type master;
File "0.168.192.in-addr.arpa";
allow-update {none;};
};
Examples of the amended default "/etc/named.conf" files can be seen below.

Fedora16
Oracle Linux 5
Oracle Linux 6
"/var/named/" Files

In the zone definitions we defined the file containing the zone configuration. These files is located in the "/var/named/" directory. If you is using the "chroot" version of BIND, the location of the following files would be "/var/named/chroot/var/named".

For a RAC installation create/edit the file associated with your zone (in my case "/var/named/localdomain.zone") to look L Ike the one below.

$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 127.0.0.1
Rac1 in A 192.168.0.101
Rac2 in A 192.168.0.102
Rac1-priv in A 192.168.1.101
Rac2-priv in A 192.168.1.102
RAC1-VIP in A 192.168.0.111
RAC2-VIP in A 192.168.0.112
Rac-scan in A 192.168.0.121
Rac-scan in A 192.168.0.122
Rac-scan in A 192.168.0.123
I ' ve kept all the default configuration and added in my forward lookup information. Notice the three entries for the SCAN.

Next I need to create the '/var/named/0.168.192.in-addr.arpa ' file for my public network reverse lookups. This file had the following contents, where "Maggie.localdomain" is the name of the DNS server.

$ORIGIN 0.168.192.in-addr.arpa.
$TTL 1H
@ in SOA Maggie.localdomain. Root.maggie.localdomain. (2
3H
1H
1W
1H)
0.168.192.in-addr.arpa. In NS Maggie.localdomain.

101 in PTR Rac1.localdomain.
102 in PTR Rac2.localdomain.
111 in PTR Rac1-vip.localdomain.
The Rac2-vip.localdomain in PTR.
121 in PTR Rac-scan.localdomain.
122 in PTR Rac-scan.localdomain.
123 in PTR Rac-scan.localdomain.
Start the DNS Service

With the configuration in place we can start the DNS service, called "named".

# Service named start
Starting named: [OK]
#
If there is any problems with your configuration The service would fail to start and the errors should is displayed on SCR Een immediately. If They don ' t appear check the "/var/log/messages" file.

Issue the following command to make sure the ' named ' service starts automatically after reboots.

# chkconfig named on
"/etc/resolv.conf" File

The DNS server is now running, but each server must was told to use it. This is do by editing the '/etc/resolv.conf ' file on each server, including the RAC nodes. Make sure the file contains the following entries, where the IP address and domain match those of your DNS server and the Domain you have configured.

NameServer 192.168.0.4
Search Localdomain
Test It

You should now is able to test the forward and reverse lookups using the "nslookup" command. The output below shows the forward and reverse lookups of the SCAN address.

# nslookup Rac-scan.localdomain
server:192.168.0.4
address:192.168.0.4#53

Name:rac-scan.localdomain
address:192.168.0.121
Name:rac-scan.localdomain
address:192.168.0.122
Name:rac-scan.localdomain
Address:192.168.0.123

# nslookup 192.168.0.121
server:192.168.0.4
address:192.168.0.4#53

121.0.168.192.in-addr.arpa name = Rac-scan.localdomain.

# nslookup 192.168.0.122
server:192.168.0.4
address:192.168.0.4#53

122.0.168.192.in-addr.arpa name = Rac-scan.localdomain.

# nslookup 192.168.0.123
server:192.168.0.4
address:192.168.0.4#53

123.0.168.192.in-addr.arpa name = Rac-scan.localdomain.

--The end--

DNS Configuration for the SCAN used with Oracle RAC Database 11g Release 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.