GNS configuration for Oracle 11gR2 in DNS using DHCP
GNS configuration for Oracle 11gR2 in DNS using DHCP
Oracle 11gR2 introduces a new concept of a Single Client Access Name (SCAN). Prior to Oracle 11gR2 adding or removing nodes from the cluster required changes in the tnsnames.ora for the node VIP addresses. With SCAN Oracle eliminated the need to change tnsnames.ora entries. SCAN is required for Oracle 11gR2 Grid Infrastructure installation and OUI cannot complete install unless SCAN is defined since the SCAN concept is an essential part during the creation of Oracle RAC 11gR2 database.
SCAN can be defined in following ways:
- In the DNS – a single name that resolves to three IP addresses must be created in DNS. The IP should not be assigned to a NIC as the Oracle Grid Infrastructure will
- Using GNS – instead of listing SCAN static addresses in DNS a sub-domain must be created in DNS for GNS to run that is, we will create a static virtual IP address in DNS for GNS. The node VIP and the SCAN VIP are obtained from the DHCP server when using GNS.
- In /etc/hosts on each node of the cluster – a single IP for the whole cluster. Helps bypass the OUI installer limitation of DNS defined SCAN.
Here in the article we will look at how to configure a GNS entry in the DNS resolvable to a GNS VIP using Oracle Enterprise Linux (OEL) 5.5. For grid.gj.com a “delegation” is made, so that every request to a machine in the domain .grid.gj.com is delegated to the GNS. (with the GNS VIP).The BIND DNS server is used in the exercise. We have a RAC cluster on nodes raclinux1, raclinux2 and raclinux3. The public addresses of the cluster nodes, the GNS VIP address and DNS server IP will be added to a new domain with reverse lookup enabled. The setup is performed on a separate DNS server dnsoel55 acting as NS. The DNS will contain the following mappings.
raclinux1 192.168.20.10
raclinux2 192.168.20.20
raclinux3 192.168.20.30
dnsoel55 192.168.20.50
gns.grid.gj.com 192.168.20.52
Note: the cluster node VIPs and SCANs are obtained via DHCP.
Install BIND – Make sure the following rpms are installed
[root@dnsoel55 named]# rpm -qa | grep bind
bind-9.3.6-4.P1.el5_4.2
bind-libs-9.3.6-4.P1.el5_4.2
system-config-bind-4.0.3-4.0.1.el5
bind-chroot-9.3.6-4.P1.el5_4.2
bind-utils-9.3.6-4.P1.el5_4.2
[root@dnsoel55 named]#
Install DHCP –Make sure the following rpms are installed
[root@dnsoel55 named]# rpm -qa | grep dhcp-3
dhcp-3.0.5-23.el5
[root@dnsoel55 named]#
Make sure DNS information is set while configuring Network Devices.
Configure BIND
We will create a new custom zone gj.com and will list the public nodes of the cluster in the domain in order to map a hostname to an address. We will create a new custom zone grid.gj.com for the GNS virtual IP (VIP). We will add a reverse DNS lookup for the entries as well by adding a zone “20.168.192.in-addr.arpa” in order to identify a hostname by the address. In the /etc/named.conf file we will add the following entries.
zone “20.168.192.in-addr.arpa” IN {
type master;
file “gj1.com.reverse”;
allow-update { none; };
};
zone “gj.com.” IN {
type master;
file “gj1.zone”;
allow-update { none; };
};
zone “grid.gj.com.” IN {
type forward;
forward only;
forwarders { 192.168.20.52 ;};
};
The custom zone, for the public IP, definition is in the gj.zone file as shown in the Appendix. The reverse lookup is in the gj.com.reverse file as shown in the Appendix. The custom zone, for GNS VIP, definition is in the grid.gj.zone file as shown in the Appendix. Both zone files are in /var/named directory. For each entry that is added in the /etc/named.conf make sure the respective zone files are updated.
Configure DHCP
For GNS resolution we will configure DHCL by editing the /etc/dhcpd.conf file and specifying the domain, IP range for the nodes VIP, SCANS etc. In this example the gj.com domin is used and an IP range 192.168.20.100 to 192.168.20.120 is provided.
[root@dnsoel55 named]# cat /etc/dhcpd.conf ddns-update-style interim; ignore client-updates; subnet 192.168.20.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.30.254; option subnet-mask 255.255.255.0; # option nis-domain "gj.com"; option domain-name "gj.com"; option domain-name-servers 192.168.30.50; option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range 192.168.20.100 192.168.20.120; default-lease-time 21600; max-lease-time 43200; } [root@dnsoel55 named]#
Edit the file /etc/resolv.conf to specify the IP of the DNS server and the domain name on each node. The Appendix contains a sample.
Edit /etc/nsswitch.conf to specify lookup order.
hosts: dns files
Start/Stop/Restart the named
[root@dnsoel55 named]# service named stop
Stopping named: [ OK ]
[root@dnsoel55 named]# service named start
Starting named: [ OK ]
[root@dnsoel55 named]#
[root@dnsoel55 named]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@dnsoel55 named]#
To start up the named service on boot execute the following command.
[root@dnsoel55 named]# chkconfig named on
[root@dnsoel55 named]#
Start/Stop/Restart the dhcpd
[root@dnsoel55 named]# service dhcpd start
[root@dnsoel55 named]# service dhcpd stop
Shutting down dhcpd: [ OK ]
[root@dnsoel55 named]# service dhcpd restart
Starting dhcpd: [ OK ]
[root@dnsoel55 named]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
[root@dnsoel55 named]#
Optionally use system-config-bind to look at the setup
The gj.com zone appears as show below.
The zone grid.gj.com appears as below
The zone 20.168.192.in-addr.arpa for the reverse lookup appears as show below.
Disable iptable service for the external hosts to be able to connect to DNS server.
[root@dnsoel55 named]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: nat filter [ OK ]
Unloading iptables modules: [ OK ]
Test
[root@dnsoel55 named]# nslookup raclinux1 Server: 192.168.30.50 Address: 192.168.30.50#53 Name: raclinux1.gj.com Address: 192.168.20.10 [root@dnsoel55 named]# nslookup 192.168.20.10 Server: 192.168.30.50 Address: 192.168.30.50#53 10.20.168.192.in-addr.arpa name = raclinux1.gj.com. [root@dnsoel55 named]# nslookup raclinux2 Server: 192.168.30.50 Address: 192.168.30.50#53 Name: raclinux2.gj.com Address: 192.168.20.20 [root@dnsoel55 named]# nslookup 192.168.20.20 Server: 192.168.30.50 Address: 192.168.30.50#53 20.20.168.192.in-addr.arpa name = raclinux2.gj.com. [root@dnsoel55 named]# nslookup dnsoel55 Server: 192.168.30.50 Address: 192.168.30.50#53 Name: dnsoel55.gj.com Address: 192.168.20.50 [root@dnsoel55 named]# nslookup 192.168.20.50 Server: 192.168.30.50 Address: 192.168.30.50#53 50.20.168.192.in-addr.arpa name = dnsoel55.gj.com. [root@dnsoel55 named]# nslookup gns.grid.gj.com Server: 192.168.30.50 Address: 192.168.30.50#53 Name: gns.grid.gj.com Address: 192.168.20.52 [root@dnsoel55 named]# nslookup 192.168.20.52 Server: 192.168.30.50 Address: 192.168.30.50#53 52.20.168.192.in-addr.arpa name = gns.grid.gj.com. [root@dnsoel55 named]#
Summary
We looked at the rpms required to install BIND and DHCP on OEL. We created a custom and reverse lookup zone for the cluster public nodes and for the GNS VIP. The configuration files required for DNS setup were described. We tested the forward and reverse DNS resolution. The above DNS setup will ensure that we have GNS VIP for the Oracle 11gR2 Grid Infrastructure installation.
After the Oracle GI installation the nslookup output will be something like:
[root@dnsoel55 named]# nslookup scan.grid.gj.com
Server: 192.168.20.50
Address: 192.168.20.50#53
Non-authoritative answer:
Name: scan.grid.gj.com
Address: 192.168.20.107
Name: scan.grid.gj.com
Address: 192.168.20.108
Name: scan.grid.gj.com
Address: 192.168.20.109
[root@dnsoel55 named]#
Appendix:
[root@dnsoel55 etc]# cat named.conf // Enterprise Linux BIND Configuration Tool // // Default initial "Caching Only" name server configuration // options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; }; zone "20.168.192.in-addr.arpa" IN { type master; file "gj1.com.reverse"; allow-update { none; }; }; zone "30.168.192.in-addr.arpa" IN { type master; file "gj.reverse"; allow-update { none; }; }; zone "gj.com." IN { type master; file "gj1.zone"; allow-update { none; }; }; zone "grid.gj.com." IN { type forward; forward only; forwarders { 192.168.2.61 ;} }; zone "." IN { type hint; file "named.root"; }; zone "localdomain." IN { type master; file "localdomain.zone"; allow-update { none; }; }; zone "localhost." IN { type master; file "localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa." IN { type master; file "named.local"; allow-update { none; }; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." IN { type master; file "named.ip6.local"; allow-update { none; }; }; zone "255.in-addr.arpa." IN { type master; file "named.broadcast"; allow-update { none; }; }; zone "0.in-addr.arpa." IN { type master; file "named.zero"; allow-update { none; }; }; include "/etc/rndc.key"; [root@dnsoel55 etc]# [root@dnsoel55 named]# cat gj1.com.reverse $ORIGIN 20.168.192.in-addr.arpa. $TTL 1H @ IN SOA dnsoel55.gj.com. root.dnsoel55.gj.com. ( 2 3H 1H 1W 1H ) 20.168.192.in-addr.arpa. IN NS dnsoel55.gj.com. IN NS dnsoel55.gj.com. 10 IN PTR raclinux1.gj.com. 20 IN PTR raclinux2.gj.com. 30 IN PTR raclinux3.gj.com. 50 IN PTR dnsoel55.gj.com. 52 IN PTR gns.grid.gj.com. [root@dnsoel55 named]# cat gj1.zone $TTL 86400 @ IN SOA dnsoel55 root ( 43 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS dnsoel55 raclinux1 IN A 192.168.20.10 raclinux2 IN A 192.168.20.20 raclinux3 IN A 192.168.20.30 dnsoel55 IN A 192.168.20.50 gns.grid.gj.com. IN A 192.168.20.52 [root@dnsoel55 named]# cat grid.gj.zone $TTL 86400 @ IN SOA dnsoel55 root ( 43 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS dnsoel55 IN NS gns.grid.gj.com. IN NS dnsoel55.gj.com. gns IN A 192.168.20.52 dnsoel55 IN A 192.168.20.50 [root@dnsoel55 named]# [root@dnsoel55 named]# cat /etc/dhcpd.conf ddns-update-style interim; ignore client-updates; subnet 192.168.20.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.30.254; option subnet-mask 255.255.255.0; # option nis-domain "gj.com"; option domain-name "gj.com"; option domain-name-servers 192.168.30.50; option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range 192.168.20.100 192.168.20.120; default-lease-time 21600; max-lease-time 43200; } [root@dnsoel55 named]# [root@dnsoel55 named]# cat /etc/resolv.conf options attempts: 2 options timeout: 1 options attempts: 2 ; generated by /sbin/dhclient-script search gj.com nameserver 192.168.30.50 [root@dnsoel55 named]# [root@dnsoel55 named]# cat /etc/nsswitch.conf # # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # nisplus or nis+ Use NIS+ (NIS version 3) # nis or yp Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far # # To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis passwd: files shadow: files group: files #hosts: db files nisplus nis dns hosts: dns files # Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files netgroup: nisplus publickey: nisplus automount: files nisplus aliases: files nisplus [root@dnsoel55 named]#
23 Comments »
Leave a Reply to cell phone number lookup Cancel reply
-
Archives
- February 2017 (1)
- November 2016 (1)
- October 2016 (1)
- May 2016 (2)
- March 2016 (3)
- December 2014 (2)
- July 2014 (1)
- June 2014 (6)
- May 2014 (5)
- February 2014 (1)
- December 2012 (2)
- November 2012 (8)
-
Categories
-
RSS
Entries RSS
Comments RSS
[…] original post here: GNS configuration for Oracle 11gR2 in DNS using DHCP « Guenadi N … By admin | category: domain name lookup | tags: address, dns, entries, entries-as-well, […]
Pingback by GNS configuration for Oracle 11gR2 in DNS using DHCP « Guenadi N … Divorce on Me | September 12, 2010 |
[…] are two ways for sub-domain delegation implementation. For examples click here and here. In the article both methods were tested. The DNS IP is 192.168.2.11 and GNS VIP is […]
You could certainly see your skills within the work you write. The sector hopes for even more passionate writers like you who are not afraid to say how they believe. At all times follow your heart.
Wow! This could be one particular of the most useful blogs We’ve ever arrive across on this subject. Actually Wonderful. I am also a specialist in this topic so I can understand your effort.
hi in teh name.conf. where is “grid.gj.zone”??
Hi,
In the Appendix. Look for something like this…
zone “grid.gj.com.” IN {
type forward;
forward only;
forwarders { 192.168.2.61 ;}
};
Regards,
Please let me know if you’re looking for a article writer for your blog.
You have some really good articles and I believe I would be a good asset.
If you ever want to take some of the load off, I’d really like to write some material for your
blog in exchange for a link back to mine. Please shoot me an e-mail if interested.
Many thanks!
This is really interesting, You’re a very skilled blogger.
I have joined your feed and look forward to seeking more of
your great post. Also, I have shared your site in my social
networks!
Mods are indeed vital for Minecraft Premium Account Generator fans so that they can modify their
game while they have never done ahead of.
Step 1: If you want to change spawn point, you need NBTedit.
The only thing that he has produced with regularity is strikeouts.
It’s remarkable in support of me to have a website, which is good in support of my know-how.
thanks admin
Good post. I learn something new and challenging on websites
I stumbleupon oon a daily basis. It will always be helpful to read through articles from other authors
and practice a little something from their websites.
Pretty component of content. I just stumbled upon your
blog and in accession capital to claim that I acquire
actually enjoyed account your weblog posts. Anyway I will be subscribing for your augment or even I achievement you get admission to consistently fast.
Very nice post. I just stumbled upon your blog and
wished to say that I’ve truly enjoyed surfing around your blog posts.
After all I’ll be subscribing to your rss feed and I
hope you write again soon!
I’m really loving the theme/design of your weblog.
Do you ever run into any browser compatibility issues? A few of my blog readers
have complained about my site not operating
correctly in Explorer but looks great in Safari. Do you have any ideas to help fix this
problem?
Hi there to all, how is all, I think every
one is getting more from this site, and your views are fastidious
in support of new visitors.
I was wondering if уou ever thought ߋоf сhanging the structure of your site?
Its very well written; I love աhat youve got to
say. But maybe you could a littlе more in the way of
content so people could connect witҺ it better.
Youνe got an awful lot of text for only having 1 or
tԝo images. Maybe you could spae it out betteг?
Hey there great website! Does running a blog such as this take a massive amount work?
I have very little expertise in programming but I was hoping to start my own blog soon. Anyway, if
you have any suggestions or tips for new blog owners please share.
I know this is off subject however I simply wanted to ask.
Thank you!
Hello, everything is going fine here and ofcourse every one is sharing data, that’s
truly good, keep up writing.
I’ve been exploring for a little for any high-quality articles orr
blog poxts in this sort of house . Exploring in Yahoo I finally
stumbled upon this site. Reading this information So i’m satisfied to convey that Ihwve a very just right uncanny feeling I came upon just what I needed.
I so much certainly will make certain too don?t omit this website and give it a look on a relentless basis.
wonderful points altogether, you just gained a logo new reader.
What could you recommend in regards to your post that you just made a few
days ago? Any certain?
Modern-day home windows are an easy way to increase the look of
the house and save money on the power costs as well.
Replacement windows are available in such a wide array that most older
window styles can easily be matched. Compare bids, choose
the few you like and start talking about your budget.
Im setting up 12c Flex Cluster …….for which I need GNS Setup….I have a questn…
What is the exact DNS Server Address in this post?
dnsoel55 192.168.20.50
or
dnsoel55 192.168.30.50
Please reply fast
[…] Edit:GNS configuration for Oracle 11gR2 in DNS using DHCP […]