6 Replies Latest reply on Apr 22, 2014 8:07 PM by user569403

    named.conf file not present under /etc folder during DNS setup

    user10341747

      Hi team,

       

      I am configuring SCAN setup on one of the rac node (2 node racsetup using for testing not configuring DNS on seperate server ). I have installed all the required rpm like:

      bind-9.3.6-4.P1.el5_4.2

      bind-libs-9.3.6-4.P1.el5_4.2

      bind-utils-9.3.6-4.P1.el5_4.2

      bind-chroot-9.3.6-4.P1.el5_4.2

      ypbind-1.19-12.el5

       

       

      but i am unable to get named.conf file under /etc folder ,/var/named/chroot,

       

      also localdomain.zone file is also not present under /var/named folder

       

      [root@rac1 ~]# cd /etc

      [root@rac1 etc]# ls -ltr|grep named

      lrwxrwxrwx  1 root   named        31 Feb 16 04:42 rndc.key -> /var/named/chroot//etc/rndc.key

       

      [root@rac1 named]# pwd

      /var/named

      [root@rac1 named]# ls -ltr

      total 24

      drwxrwx--- 2 named named 4096 Jan 20  2010 slaves

      drwxrwx--- 2 named named 4096 Jan 20  2010 data

      drwxr-x--- 5 root  named 4096 Feb 16 04:42 chroot

      [root@rac1 named]#

       

       

      Please let me know how to configure the DNS.

       

       

      Regards,

        • 1. Re: named.conf file not present under /etc folder during DNS setup
          Vandana B -Oracle

          Hi,

           

          Please refer to the below mentioned document for the same

           

          Ref: How to Configure the DNS Server for SCAN VIP on Linux for 11gR2 GI installation (Doc ID 1107295.1)

           

          Regards,

          Vandana - Oracle

          • 2. Re: named.conf file not present under /etc folder during DNS setup
            user10341747

            Hello Vandana,

             

            Thank for replying. Actually i don't have metalink id and i am using some materials from web for configuring it.

             

            Regards, 

            • 3. Re: named.conf file not present under /etc folder during DNS setup
              Vandana B -Oracle

              Hi,

               

              Please find the steps picked up from the document below

               

              1.  On dns1.testenv.com 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. 

               

               

               

               

              OR

               

               

              You can manually download these packages:  

              bind.XXX.rpm (for example bind-9.2.4-22.el3.i386.rpm)

              bind-utils.XXX.rpm

              bind-libs.XX.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  dns1.testenv.com 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 { 10.10.1.1; };  // 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 "testenv.com" so here we need to add the following lines to "/etc/named.conf"

               

               

              zone "testenv.com" IN {

              type master;

              file "testenv.com.zone";

              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 "2.168.192.in-addr.arpa." IN {

              type master;

              file "2.168.192.in-addr.arpa";

              allow-update { none; };

              };

               

               

              3. On dns1.testenv.com edit the config  files under /var/named

              a. Edit the DNS Zone Configuration file:

              If you are using localdomain you can edit /var/named/localdomain.zone

              For this case we edit the file name: testenv.com.zone and localdomain.zone

               

               

              Add the line below to the end of this file:

               

               

              rac1-vip IN A 192.168.2.221

              rac2-vip IN A 192.168.2.222

              rac-scan IN A 192.168.2.11

              rac-scan IN A 192.168.2.12

              rac-scan IN A 192.168.2.13

               

               

              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/2.168.192.in-addr.arpa" file for reverse lookups as follows:

               

               

              $ORIGIN 2.168.192.in-addr.arpa.

              $TTL 1H

              @ IN SOA testenv.com. root.testenv.com. ( 2

              3H

              1H

              1W

              1H )

              2.168.192.in-addr.arpa. IN NS testenv.com.

               

               

              221 IN PTR rac1-vip.testenv.com.

              222 IN PTR rac2-vip.testenv.com.

              11 IN PTR rac-scan.testenv.com.

              12 IN PTR rac-scan.testenv.com.

              13 IN PTR rac-scan.testenv.com.

               

               

              4. On dns1.testenv.com : 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:

               

               

              nameserver 17.17.0.35

              search localdomain testenv.com

              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. Optionally 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.

              If there is nscd (Name Service Caching Daemon) running, then service nscd needs to be restarted:

               

               

              # /sbin/service nscd restart

               

               

               

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

               

               

              # nslookup rac-scan.testenv.com

              Server: 17.17.0.35

              Address: 17.17.0.35#53

               

               

              Name: rac-scan.testenv.com

              Address: 192.168.2.11

              Name: rac-scan.testenv.com

              Address: 192.168.2.12

              Name: rac-scan.testenv.com

              Address: 192.168.2.13

               

               

              # nslookup 192.168.2.11

              Server: 17.17.0.35

              Address: 17.17.0.35#53

               

               

              11.2.168.192.in-addr.arpa name = rac-scan.testenv.com.

               

               

              # nslookup 192.168.2.12

              Server: 17.17.0.35

              Address: 17.17.0.35#53

               

               

              12.2.168.192.in-addr.arpa name = rac-scan.testenv.com.

               

               

              # nslookup 192.168.2.13

              Server: 17.17.0.35

              Address: 17.17.0.35#53

               

               

              13.2.168.192.in-addr.arpa name = rac-scan.testenv.com.

               

               

              If you try to ping rac-scan.testenv.com at this moment, you will find it displays one of SCAN ip addresses but it will not be able to be reached. This is the 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 IP should be pingable.

               

              Regards,

              Vandana - Oracle

              1 person found this helpful
              • 5. Re: named.conf file not present under /etc folder during DNS setup
                user10341747

                Hello Vandana,

                 

                 

                Thank you for providing detailed installation steps..Appreciating the time and pain involve in providing details of each and every steps.

                 

                I am now configuring my DNS setup according to the steps provided by you but still i am unable to get the named.conf file under /etc folder or /var/named/chroot. What could be the reason???

                 

                 

                Note: following are the rpm's install on my server

                 

                [root@rac1 Server]# rpm -qa|grep bind

                bind-9.3.6-4.P1.el5_4.2

                bind-libs-9.3.6-4.P1.el5_4.2

                bind-utils-9.3.6-4.P1.el5_4.2

                bind-chroot-9.3.6-4.P1.el5_4.2

                bind-devel-9.3.6-4.P1.el5_4.2

                bind-libbind-devel-9.3.6-4.P1.el5_4.2

                ypbind-1.19-12.el5

                 

                 

                 

                Regards,

                • 6. Re: named.conf file not present under /etc folder during DNS setup
                  user569403

                  Hi ,

                   

                  Hope below helps..

                   

                  Note. If the config files are not present (as is the case in Oracle Linux 5), it is worth installing the "system-config-bind" utility and starting it up. This will generate a default setup of all the dependent config files for you to amend. It is much easier than trying to build them manually.

                   

                  # yum install system-config-bind