11 Replies Latest reply: Oct 31, 2013 8:44 AM by Levi Pereira RSS

    How to choose scan ip for scan listener?

    Lonion

      Background Description:

       

      Assume

       

      I have a 11gR2 RAC with 3 nodes. If I configure 4 scan ip resolved by DNS, which three scan ip would be choosen for scan listener? Does it like below?

       

      4 scan ip in DNS server:

      192.168.2.101

      192.168.2.102

      192.168.2.103

      192.168.2.104

       

      The scan listener's ip may be like below:

      node1
      [grid@rac1 ~]$ lsnrctl status listener_scan1
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.101)(PORT=1521)))
      
      
      node2
      [grid@rac2 ~]$ lsnrctl status listener_scan2
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.102)(PORT=1521)))
      
      
      node3
      [grid@rac3 ~]$ lsnrctl status listener_scan3
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.103)(PORT=1521)))
      
      
      
      
      
      
      

       

       

      But it also can be choosen like below

      node1
      [grid@rac1 ~]$ lsnrctl status listener_scan1
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.103)(PORT=1521)))
      
      
      node2
      [grid@rac2 ~]$ lsnrctl status listener_scan2
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.102)(PORT=1521)))
      
      
      node3
      [grid@rac3 ~]$ lsnrctl status listener_scan3
      Listening Endpoints Summary...
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.104)(PORT=1521)))
      
      
      
      
      
      
      
      

       

      and so on .

       

      Above is my guess, so what's the real combination of three ip ?

       

      Pls help me.

        • 1. Re: How to choose scan ip for scan listener?
          Svetoslav Gyurov

          Hi Lonion,

           

          First of all the SCAN need only three IP addresses and not four. Before installation SCAN hostname is configured in the DNS to resolve to three ip addresses (mycluster-scan). Upon installation the installer will resolve these three ip addresses and assign them to the scan vips THE WAY their are returned by the DNS at that point. Because DNS works in round robin fashion you can't say what would be the combination until the time the installation finish.

           

          Once the SCAN VIPs are assigned, the SCAN LISTENERs will run on top of the VIPs to provide access for the clients.

           

          Regards,

          Sve

           

          p.s. Having four IP addresses for the scan would result that one in four users will get timeout.

          • 2. Re: How to choose scan ip for scan listener?
            Lonion

            Hi, SvetoslavGyurov. Pls look at my real RAC environment.

             

            [grid@rac1 ~]$ srvctl status scan_listener

            SCAN Listener LISTENER_SCAN1 is enabled

            SCAN listener LISTENER_SCAN1 is running on node rac1

            SCAN Listener LISTENER_SCAN2 is enabled

            SCAN listener LISTENER_SCAN2 is running on node rac3

            SCAN Listener LISTENER_SCAN3 is enabled

            SCAN listener LISTENER_SCAN3 is running on node rac2

            SCAN Listener LISTENER_SCAN4 is enabled

            SCAN listener LISTENER_SCAN4 is running on node rac4

            [grid@rac1 ~]$

            [grid@rac1 ~]$ srvctl config scan

            SCAN name: rac, Network: 1/192.168.2.0/255.255.255.0/eth0

            SCAN VIP name: scan1, IP: /rac/192.168.2.177

            SCAN VIP name: scan2, IP: /rac/192.168.2.178

            SCAN VIP name: scan3, IP: /rac/192.168.2.179

            SCAN VIP name: scan4, IP: /rac/192.168.2.180

             

            Node 1

            [grid@rac1 ~]$ lsnrctl status listener_scan1
            
            LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-OCT-2013 17:02:47
            
            Copyright (c) 1991, 2011, Oracle.  All rights reserved.
            
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
            STATUS of the LISTENER
            ------------------------
            Alias                     LISTENER_SCAN1
            Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
            Start Date                24-SEP-2013 14:24:11
            Uptime                    28 days 2 hr. 38 min. 36 sec
            Trace Level               off
            Security                  ON: Local OS Authentication
            SNMP                      OFF
            Listener Parameter File   /u01/app/grid/network/admin/listener.ora
            Listener Log File         /u01/app/grid/log/diag/tnslsnr/rac1/listener_scan1/alert/log.xml
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.177)(PORT=1521)))
            Services Summary...
            Service "abc" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            Service "abcXDB" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            The command completed successfully
            [grid@rac1 ~]$ 
            

             

             

            Node 2

            [grid@rac1 ~]$ ssh rac2
            Last login: Mon Oct 21 16:28:55 2013 from rac1
            [grid@rac2 ~]$ 
            [grid@rac2 ~]$ lsnrctl status listener_scan3
            
            LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-OCT-2013 17:04:13
            
            Copyright (c) 1991, 2011, Oracle.  All rights reserved.
            
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))
            STATUS of the LISTENER
            ------------------------
            Alias                     LISTENER_SCAN3
            Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
            Start Date                18-SEP-2013 13:59:43
            Uptime                    34 days 3 hr. 4 min. 30 sec
            Trace Level               off
            Security                  ON: Local OS Authentication
            SNMP                      OFF
            Listener Parameter File   /u01/app/grid/network/admin/listener.ora
            Listener Log File         /u01/app/grid/log/diag/tnslsnr/rac2/listener_scan3/alert/log.xml
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.179)(PORT=1521)))
            Services Summary...
            Service "abc" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            Service "abcXDB" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            The command completed successfully
            [grid@rac2 ~]$ 
            

             

             

            Node 3

            [grid@rac2 ~]$ ssh rac3
            Last login: Mon Oct 21 16:29:41 2013 from rac2
            [grid@rac3 ~]$ lsnrctl status listener_scan2
            
            LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-OCT-2013 17:04:52
            
            Copyright (c) 1991, 2011, Oracle.  All rights reserved.
            
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
            STATUS of the LISTENER
            ------------------------
            Alias                     LISTENER_SCAN2
            Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
            Start Date                24-SEP-2013 14:19:31
            Uptime                    28 days 2 hr. 45 min. 20 sec
            Trace Level               off
            Security                  ON: Local OS Authentication
            SNMP                      OFF
            Listener Parameter File   /u01/app/grid/network/admin/listener.ora
            Listener Log File         /u01/app/grid/log/diag/tnslsnr/rac3/listener_scan2/alert/log.xml
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.178)(PORT=1521)))
            Services Summary...
            Service "abc" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            Service "abcXDB" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            The command completed successfully
            [grid@rac3 ~]$ 
            

             

             

            Node 4

            [grid@rac3 ~]$ ssh rac4
            Last login: Mon Oct 21 16:30:24 2013 from rac3
            [grid@rac4 ~]$ 
            [grid@rac4 ~]$ lsnrctl status listener_scan4
            
            LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-OCT-2013 17:05:28
            
            Copyright (c) 1991, 2011, Oracle.  All rights reserved.
            
            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN4)))
            STATUS of the LISTENER
            ------------------------
            Alias                     LISTENER_SCAN4
            Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
            Start Date                18-SEP-2013 13:59:43
            Uptime                    34 days 3 hr. 5 min. 44 sec
            Trace Level               off
            Security                  ON: Local OS Authentication
            SNMP                      OFF
            Listener Parameter File   /u01/app/grid/network/admin/listener.ora
            Listener Log File         /u01/app/grid/log/diag/tnslsnr/rac4/listener_scan4/alert/log.xml
            Listening Endpoints Summary...
              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN4)))
              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.180)(PORT=1521)))
            Services Summary...
            Service "abc" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            Service "abcXDB" has 4 instance(s).
              Instance "abc1", status READY, has 1 handler(s) for this service...
              Instance "abc2", status READY, has 1 handler(s) for this service...
              Instance "abc3", status READY, has 1 handler(s) for this service...
              Instance "abc4", status READY, has 1 handler(s) for this service...
            The command completed successfully
            [grid@rac4 ~]$ 
            

             

             

            Look, there are 4 scan ip in my 11gR2 RAC environment. So, I think your opinion First of all the SCAN need only three IP addresses and not four」 is wrong.

            • 3. Re: How to choose scan ip for scan listener?
              FreddieEssex

              Hi,

               

              Oracle document states the following:

               

              Oracle RAC 11g release 2 (11.2) introduces the Single Client Access Name (SCAN). SCAN is a domain name registered to at least one and up to three IP addresses, either in DNS or GNS.

               

              Configure up to three SCAN addresses for the entire cluster.

              Introduction to Oracle Clusterware

               

              However, from your output it looks like all 4 SCAN addresses have been configured in both DNS and SCAN, but you are getting different IP's assigned to each scan listener when you run a lsnrctl status scan_listenerx due to round robin.  I suspect this anomaly is due to you having assigned 4 IP's in DNS.

               

              Even for a 20 node cluster you only need 3 SCAN addresses, so the fact remains.  Although you have proved that you can configure more than 3 addresses for SCAN (albeit with the unwanted affect as described), you only need 3 SCAN addresses.  Furthermore, Oracle documentation itself states that you should only configure up to 3 addresses for SCAN.

              • 4. Re: How to choose scan ip for scan listener?
                Levi Pereira

                Hi,

                Rule: All IP assigned to SCAN Hostname in DNS must be configured on Clusterware as SCAN IP/Listener.

                3 SCAN IP is recommended, but you can have more than 3 SCAN IP.

                Usually 3 SCAN IP is enough need and you don't need to setup a SCAN IP for each hostname, the purpose of SCAN is quite different from the VIP/Local Listener.

                • 5. Re: How to choose scan ip for scan listener?
                  Lonion

                  Rule: All IP assigned to SCAN Hostname in DNS must be configured on Clusterware as SCAN IP/Listener.

                  Hi, I have 2 questions about this as follow:

                  1. Which document this opinion quote from?

                  2. If I conigured 4 IP in DNS, but only 3 nodes in my RAC environment, which 3 IP would be choosen for the scan listeners?

                  • 6. Re: How to choose scan ip for scan listener?
                    Lonion

                    Nobody can answer me?

                    so sad,  T  _T ........

                    • 7. Re: How to choose scan ip for scan listener?
                      Mahir M. Quluzade

                      Lonion wrote:

                       

                      Rule: All IP assigned to SCAN Hostname in DNS must be configured on Clusterware as SCAN IP/Listener.

                      Hi, I have 2 questions about this as follow:

                      1. Which document this opinion quote from?

                      2. If I conigured 4 IP in DNS, but only 3 nodes in my RAC environment, which 3 IP would be choosen for the scan listeners?

                      Hi,

                       

                      I think your questions answered before replies.

                       

                      1. Please check : Typical Installation for Oracle Grid Infrastructure for a Cluster  - 1.3.2.2 IP Address Requirements

                      2. Three Static IP addresses configured on the domain name server (DNS) before installation so that the three IP addresses are associated with the name provided as the SCAN, and all three addresses are returned in random order by the DNS to the requestor.

                       

                      Regards

                      Mahir M. Quluzade

                      • 8. Re: How to choose scan ip for scan listener?
                        Lonion

                        Hi, MahirM.Quluzade:

                        You may mistake me regarding the second question. The important point is 4 ip (for example,ip1,ip2,ip3,ip4) corresponding 3 node, then which three ip would be choosen from the 4 ip as the scan listener's ip? 「ip1,ip2,ip3」 or 「ip1,ip3,ip4」 or 「ip2,ip3,ip4」 and so on?

                         

                        God bless that you can understand me.

                        • 9. Re: How to choose scan ip for scan listener?
                          Mahir M. Quluzade

                          Hi,

                           

                          I understand your question

                          I' not sure, which combination will choose for SCAN listeners.

                           

                          You can check with  nslookup  <scan-name>

                           

                          But i'm sure you must use 3 IPs for SCAN names.

                          It is not difficult  delete 4th IP  from  DNS. May be need restart cluster.

                           

                          Regards

                          Mahir M. Quluzade

                          • 10. Re: How to choose scan ip for scan listener?
                            FreddieEssex

                            Yes, I agree...you are sad.

                             

                            Try google...it's amazing what you find on there

                            • 11. Re: How to choose scan ip for scan listener?
                              Levi Pereira

                              Hi,

                              You are trying to do something not recommended by Oracle.

                              Then to get answers to these questions you can issue a SR to MoS.

                               

                              My answer is : Follow exactly what is written in these docs.

                               

                              http://www.oracle.com/technetwork/products/clustering/overview/scan-129069.pdf

                              Grid Infrastructure Single Client Access Name (SCAN) Explained (Doc ID 887522.1)