Martins Blog

Trying to explain complex things in simple terms

Build your own 11.2 RAC system-part II: DNS & DHCP for GNS

Posted by Martin Bach on October 2, 2009

Wow, I managed to cram 4 acronyms into the subject line, not bad for a Friday! The reason of this post is simple: I want to get GNS up and running on my RAC 11.2 cluster, after all it’s one of the major new features. It required me to get acquainted with DNS and now also with DHCP, so better get cracking.

For GNS (part of Grid Plug And Play) we need dhcp and dns, so let’s tackle them one by one.


The post has been updated on November 15 to make it equally useful for Oracle 12c. The latest release at the time of writing enhanced GNS but that won’t be covered in this post. The idea remains the same: use GNS/DHCP for a true Grid Plug and Play.


Another one of those services the linux sys admin normally provides; it’s short for dynamic host configuration protocol. There has to be a package which provides the service, and sure enough this is called  dhcp. The dhcp client normally is installed already which makes it easy to avoid confusion.

We start by installing the dhcp server:

# rpm -ihv dhcp-3.0.5-21.el5.i386.rpm

Documentation is a great way to get started so I looked up a sample configuration file for my network. GNS will require to assign IP addresses on the public network so I came up with the following configuration in /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

subnet netmask {

 option subnet-mask    ;
 option domain-name              "";

 default-lease-time 21600;
 max-lease-time 43200;


A simple “service dhcpd start” as root started the service. Easy enough, now for DNS.


Please refer to part I of the series for an (albeit very brief) intrduction to DNS. The difference now is that we have to delegate the subdomain to GNS,  which involves a little bit of work on the DNS server. Also, we need to put a virtual IP address for GNS into DNS, but that address must not be in use. I also created a dedicated server for DNS and bind, called “” on The configuration changes I made are as follows:


 /* make named use port 53 for the source of all queries, to allow
 * firewalls to block all ports except 53:
 query-source    port 53;
 query-source-v6 port 53;

 // Put files that named is allowed to write in the data/ directory:
 directory "/var/named"; // the default
 dump-file               "data/cache_dump.db";
 statistics-file         "data/named_stats.txt";
 memstatistics-file      "data/named_mem_stats.txt";

 allow-transfer {"none";};
 zone-statistics yes;

 channel default_debug {
 file "data/";
 severity dynamic;

zone "" IN {
 type master;
 file "";
 allow-transfer {; };

zone "" IN {
 type master;
 file "the-playground.reverse";

// named.rfc1912.zones here....


$TTL 86400
@   1D           IN      SOA (
 2002022401 ; serial
 3H ; refresh
 15 ; retry
 1w ; expire
 3h ; minimum
; main domain name servers
 IN      NS
auxOEL5       IN      A
; A record for mail server above
mail          IN      A

rac11gr2node1 IN      A
rac11gr2node2 IN      A

; sub-domain definitions
@             IN      NS
; sub-domain address records for name server only - glue record
gns           IN      A ; 'glue' record


$TTL    86400 ; 24 hours could have been written as 24h or 1d
@  1D  IN        SOA (
 2002022401 ; serial
 3H ; refresh
 15 ; retry
 1w ; expire
 3h ; minimum
82              IN PTR
90              IN PTR
91              IN PTR

That’s it! Use service named restart to activate your changes and check that name resolution via DNS works on node1/node2. The debugging tools are dig and nslookup. My configuration uses the following settings on the client:



options attempts: 2
options timeout: 1


group:      files

#hosts:     db files nisplus nis dns
hosts:      files dns

That should be enough for the moment, if your name service caching daemon is active it might be a good idea to stop it now. First we try forward resolution:

[oracle@rac11gr2node1 ~]$ nslookup


Now let’s try the reverse lookup:

[oracle@rac11gr2node1 ~]$ nslookup
Address:       name =

[oracle@rac11gr2node1 ~]$

With the subdomain delegation, who answers my questions for domain “”?

[oracle@rac11gr2node1 ~]$ dig

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29033
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;             IN      A

;; AUTHORITY SECTION:      10800   IN      SOA 2002022401 10800 15 604800 10800

;; Query time: 2 msec
;; WHEN: Wed Oct  7 13:48:05 2009
;; MSG SIZE  rcvd: 90

The important bit is the “AUTHORITY SECTION”. So, it’s working! I’ll write up my troubleshooting tips for DNS (I learned the hard way) in a future article.

We are ready to run runInstaller for the Grid Infrastructure now. Remember these points:

  • Public hostnames go into DNS such as
  • SCAN is NOT in DNS and will be created by DHCP. The SCAN address is in the subdomain, i.e.
  • The GNS VIP must be in the subdomain delegation section
About these ads

23 Responses to “Build your own 11.2 RAC system-part II: DNS & DHCP for GNS”

  1. dbametrix said


    Very interesting and extra ordinary. Nice article and discussion.
    Thanks a lot for same.

    Gitesh Trivedi

  2. [...]… [...]

  3. Ayo said

    I am confused about the DNS configuration. You mentioned a dedicated DNS server on Is that the server on which you configured this files? What server do you have at

  4. Martin said


    you actually found an error in the post, a leftover from a previous configuration. The nameserver “” should be listed as

    Thanks for your input,


  5. ragesh said


    I tried your article “Build your own 11.2 RAC system-part II: DNS & DHCP for GNS” and while installing 11gr2 Grid Infra I am running into this error (while executing on primary node).Iam not using /etc/hosts to resolv scan. Would appreciate if you can point out where I am going wrong.

    CRS-2676: Start of ‘ora.CRS.dg’ on ‘vmnode1′ succeeded
    PRCR-1079 : Failed to start resource ora.gns
    CRS-2674: Start of ‘ora.gns’ on ‘vmnode1′ failed
    CRS-2632: There are no more servers to try to place resource ‘ora.gns’ on that would satisfy its placement policy
    start gns … failed
    Configure Oracle Grid Infrastructure for a Cluster … failed

    Thank you

    • Martin said


      did you run cluvfy before you started the installation? It seems you are missing out on prerequisites. I suggest you double check the Grid Infrastructure installation guide for Linux and ensure that your DNS server really hands off DNS requests to GNS.

      Hope this helps,


      • ragesh said

        Hi Martin,

        Thanks for a prompt response.
        But how can I check if subdomain delegation is working before the start of the grid infra install. I executed “./ stage -pre crsinst -n vmnode1,vmnode2 -fixup” before the start of install and all were successful except a “Warning:Could not find a suitable set of interfaces for VIPs”.


      • Martin said

        This would go too far to discuss here, you might want to consult the DNS server’s manual (bind in my case), especially the section on diagnosing and troubleshooting.

  6. Kabbo said

    Merry Christmas, if you celebrate Christams,and happy holidays, since I am writing this to you on Christmas day, nothing else to do. There are a few questions I would like to ask you please. One, when you say in your article “I also created a dedicated server for DNS and bind, called “” on″, is this server outside of your RAC nodes being a physical anothor server explicitly for DNS? Second, I have two physicall servers with OEL5 update 5 installed on them, with all the HW requirements met, the run of ” ./ stage -pre crsinst -n host01,host02 -fixup -verbose ” completely successful, and I followed step by steyp this article, and yet my nslookup fails, why? Third, in your article, you have “rac11gr2node1/node2″. Are these the hostname of your physical RAC nodes?

    The only modification I have made on my setup for DNS, is that my domain is called ” localdoamin as opposed to yours”. And I named my servers thier acutal hostnames, host01 and host02. Why is it that I cannot get “nslookup” to work? This is pretty much a showstopper for me and I appreciate your help. Here is my “nslookup” search:

    [root@host01 tmp]# nslookup host01.localdomain

    ** server can’t find host01.localdomain: NXDOMAIN

    As you can see the DNS server is the DNS server name from my ISP and not the one with, eventhough I put its entry in the /etc/resolv.conf file like so:
    ; generated by /sbin/dhclient-script
    search localodmain

    And here is the result of “dig”

    [root@host01 tmp]# dig localdomain.

    ; <> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <> localdomain.
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24230
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;localdomain. IN A

    localdomain. 86400 IN SOA localhost.localdomain. root.localdomain. 42 10800 900 604800 86400

    ;; Query time: 15 msec
    ;; SERVER:
    ;; WHEN: Sat Dec 25 13:57:35 2010
    ;; MSG SIZE rcvd: 80

    Please let me know.

    • Martin said

      Hi Kabbo,

      Thanks for your Christmas wishes, well received. I am UK based, which means I’m on holidays until Wednesday this week :) Anyway, I’ll try and answer your questions, see below:

      1) The auxOEL5 server is a dedicated VM, and dns is not running on any of the RAC nodes. Which wouldn’t be a good idea anyway in my opinion.

      2) Your nslookup may use the wrong DNS server. Have a look at the man page for nslookup, it has an interactive mode where you can set your domain server to the one you are using. Your RAC nodes have to set your own name server in /etc/resolv.conf, not the ISP’s

      And finally, my hosts rac11gr2node{1,2} are virtual machines.

      Hope this helps,


  7. Kabbo said

    Hi Martin,

    It certainly helps. I completely agree with you to not have one of the RAC to server as your DNS server as well which makes it very impractical if it is in a production environment. However, this is my home setup and I wanted to just get it done so that I could start practicing for my next Oracle certification, Oracle OCM. So, haveing explained that, will I still be able to use one of my RAC nodes as a local DNS server as wells? If I can use it, do I need to cofigure “DNS for GNS” on the second RAC node as wells?

    thanks for your prompt response!

    • Martin said

      Hi Kabbo,

      well as you can imagine running a DNS server on one of your cluster nodes will defeat the purpose of the cluster once that node is down: it takes the DNS server with it. Naming resolution will fail and no one can connect to the cluster. If you really have to, make the bind server highly available-for pointers see either chapter 8 of Pro Oracle Database 11g Rac on Linux or chapter 5 of the Clusterware Administration Guide.

      In your case I’d use /etc/hosts for name resolution – easier to set up and works as well. Just not supported by Oracle, but you wouldn’t mind on your playground environment. Oh, and GNS doesn’t work with this setup, obviously.

      Hope this helps,


  8. Farooq said

    Simply awesome and straight forward, as always
    Keep up the good work

  9. Farooq Nafey said

    Quick question, though not directly related to the post but still you might be able to help.

    The subdoamin delegation to gns works fine and the scan ip addresses respond in a round-robin fashion. But for some reason i am unable to ping the gns by the alias (ip ping works fine). The last line in the file “/var/named/” has been glued to point to gns, but the gns itself does not respond with the alias.

    One way that works is to add the gns entry to /etc/hosts file, but i want that to happen through the dns.

    Any clue on how to accomplish this.


  10. Tiran said

    Hi Martin, firstly I want to thank you for your blog
    this is really excellent that you share with your experience , RESPECT! I follow instructions in this (Build your own 11.2 RAC system-part II: DNS & DHCP for GNS) article but I facing error
    white DNS configuration.
    PRVF-4664 : Found inconsistent name resolution entries for SCAN name.
    So I want to ask you this is final configuration and your installation is completed successful ?

    • Martin Bach said

      I have just done another installation using my instructions and it worked.

      Do you have scan related information in your hosts file? Is the nsswitch file consistent across nodes? If yes, and you still have the problem please run cluvfy and post the relevant output here

      • Tiran said

        Thanks Martin for reply , I already solved this problem, I don’t know why but OUI don’t
        understood my new parameters in DNS and I was forced to restart OUI instead of retry with cluster verification utility.


  11. Kabbo said

    Hi Martin,

    Thank you for all of these nice articles. I wanted to understand this concept correctly since my first try was not successful. First, the hardware that I have at hand. Please don’t advise on Virtualization.

    1- I have 2 physical servers with OEL with update 5 installed. Each machine has 8GB of RAM and 500 GB of disk space. The disks in each server is SATA, two SATA in each one.
    2 – Two NIC cards in each server , one for Pbulic and one Private interconnect
    3- all the user equivalence, ssh, are setup between the two and they are communication with each other.
    4 – This set up is at my house, not at work, so I have an ISP with cable modem. Then I use a 4 port Linksys Router along with 4 port Netgear switch.
    5 – I have one PC client set up to access these Linux machines via Putty

    I would like to setup Oracle 11g R2 RAC here, and here is my question. Basically, it boils down to the shared storage, and here is the question:

    How would I set up one of the severs not only as one of the RAC nodes, but also, as the shared storage device? I know that this is not a good practice in prod, but I just need to use in my house for hands on practice of getting my certification in RAC and MAA.

    Do I need a third NIC card in each server for communicating to the shared storage? Please let me know.


    • Martin Bach said

      Hi Kabbo,

      The only way I can see is to use iSCSI on one of the hosts. I have used tgtd for this successfully, it all depends on available CPU cycles. You know that if your storage is too slow you might get node evictions. The use if iSCSI Not pretty, but good enough to get your feet wet. Definitely don’t do this in a real life project! Having the iSCSI targets on the same hosts as your cluster.

      Hope this helps,


  12. Tiran said

    Hi Martin, thanks for article is very useful , but I want to ask , is this configuration for only RHEL 5.4 OS ? I trying in OEL 6.2. I able to dig my RAC nodes but not to subdomain.
    I get “connection timed out; no servers could be reached” with dig or nslookup.

    Please help.

    • Tiran said

      I solved this problem , sorry :)
      However I have questions please take time to answer.
      1. In dhcp configuration I didn’t found “option routers” parameter. This is not required ?
      2. In dhcp configuration you mentioned “” for “option domain-name” not
      sub-domain “”.

      Can you please explain usage of these parameters in RAC system point of view.

      Thanks for advance.

    • Martin Bach said

      Hi Tiran,

      yes it was some RHEL 5.x version, it might have been 5.3 given the time I wrote the article.


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 )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 2,075 other followers

%d bloggers like this: