14 Replies Latest reply on Oct 24, 2013 10:12 AM by Mahir M. Quluzade

    Difference between SCAN and VIP in RAC ??

    Mohanad Awad

      Hello ,


        1- Can you help me to understand SCAN IP's which use by ORACLE-BASE VMware installion :

       

      Http://Www.Oracle-Base.Com/Articles/11g/Oracle-Db-11gr2-Rac-Installation-On-Oel5-Using-Virtualbox.Php#Create_Shared_Disks

       

        It dose not clear for me why they use three different IP's

       

      ----------------------------------------

        If you are not using DNS, the "/etc/hosts" file must contain the following information.


        127.0.0.1 localhost.localdomain localhost

        # Public

        192.168.0.101 ol5-112-rac1.localdomain ol5-112-rac1

        192.168.0.102 ol5-112-rac2.localdomain ol5-112-rac2

        # Private

        192.168.1.101 ol5-112-rac1-priv.localdomain ol5-112-rac1-priv

        192.168.1.102 ol5-112-rac2-priv.localdomain ol5-112-rac2-priv

        # Virtual

        192.168.0.103 ol5-112-rac1-vip.localdomain ol5-112-rac1-vip

        192.168.0.104 ol5-112-rac2-vip.localdomain ol5-112-rac2-vip

        # SCAN

        192.168.0.105 ol5-112-scan.localdomain ol5-112-scan

        192.168.0.106 ol5-112-scan.localdomain ol5-112-scan

        192.168.0.107 ol5-112-scan.localdomain ol5-112-scan

       

      ----------------------------------------

       

        * My Q Is Round-Robin DNS Is Between Vip So Why They Use Different Ip Than Vip ? and must i put scan ip on /etc/hosts ?

       

       

        2- Can I Install Oracle 11g.R2 Rac Without Using Scan Ip , If I Did Not Have DNS . I Just Put One Scan_Ip On /Etc/Hosts. So It Will Work Without Issue ?

        And It Will Work As 11G.R1?

       

        - i test to install oracle rac on vmware with one ip scan and it work without using Round-Robin DNS and without any configuration for scan ip . i just put it on /etc/hosts

       

        3- Can anyone how to configure scan IP as Round-Robin DNS ?

       

        Thanks.

        • 1. Re: Difference between SCAN and VIP in RAC ??
          Alvaro
          * My Q Is Round-Robin DNS Is Between Vip So Why They Use Different Ip Than Vip ? and must i put scan ip on /etc/hosts ?

          SCANs uses IP's not assigned to any interface. Clusterware will be in charge of it. It will direct the requests to the appropriate servers in the cluster. VIPs are the IPs which also CRS maintains for each node. They must do this so that failover is possible, in the case one node fails it can fail over the VIP to another node.

           

          The main purpose of SCAN is to provide ease of management/connection. For instance you can add new nodes to the cluster without changing your client TNSnames. This is because Oracle will automatically distribute requests accordingly based on the SCAN IPs which point to the underlying VIPs. Scan listeners do the bridge between clients and the underlying local listeners which are VIP-dependent.

           

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

           

          On the same white paper above you will find instruction on how to use a hosts file as a workaround for SCAN in an oracle GRID/CRS installation.

           

          By the way that hosts file looks strange. OS will only resolve to the first name it matches, so the 106 and 107 won't ever be used.

          • 2. Re: Difference between SCAN and VIP in RAC ??
            Mahir M. Quluzade

            Hi,

             

             

            1. Scan Name is coming after Oracle RAC 11gR2.

            This Scan name for using connection to RAC database.

            When you add new node to cluster, then you not need IP changes on client.

            Scan also helping for Load balancing.

            You can use connect to node with  VIP of node, too.

             

            2. No, you cannot install RAC 11gR2 without SCAN Name, because it is required.

            If you haven't DNS, then you can use hosts file as Tim. and you can use only 1 Scan IP for 2 node RAC.

            It is working well only two node. SCAN was first introduced with Oracle Real Application Clusters (RAC) 11g Release 2 and

            provides additional functionality in Oracle RAC 12c.

             

            3. Then you must check other post from  oracle-base : DNS Configuration for the SCAN used with Oracle RAC Database 11g Release 2

             

             

            And please check more info : http://www.oracle.com/technetwork/products/clustering/overview/scan-129069.pdf

             

             

            Regards

            Mahir M. Quluzade

            1 person found this helpful
            • 3. Re: Difference between SCAN and VIP in RAC ??
              Billy~Verreynne

              A VIP is a virtual IP for a specific server node in the cluster.

               

              Should that server node fail, this VIP is transferred to another server node in order to still provide network connectivity for clients using the address of the failed server node. VIP in other words provides high availability as despite a server node failing, network communication to this node will still be supported by another node via the failed node's VIP.

               

              SCAN is a virtual hostname for the cluster. On a 10 node cluster, there will be 10 virtual IP addresses with 10 virtual hostnames - which means that many clients will need to know and use all 10 VIPs in order to make load balanced, or high availability, or TAF, connections.

               

              SCAN replaces this on the client side - by providing the client with a Single Client Acces Name to use as oppose to 10 VIPs. The SCAN listener service knows all cluster services - and can redirect the client to the appropriate VIP listener where the requested service is available.

               

              Yes, lacking a DNS you can make use of /etc/hosts to define VIP and SCAN hostnames and IP addresses.

               

              But as clients will not be able to resolve hostnames provided via cluster listeners on redirects, each and every client also need the same list of VIP and SCAN hostnames and IP addresses in their respective hosts file too.

              1 person found this helpful
              • 4. Re: Difference between SCAN and VIP in RAC ??
                Mohanad Awad

                If i put just 1 SCAN-IP in /etc/hosts/ without any conflation , dose Round-Robin will work for RAC , and the Round-Robin come from ORACLE rac cluster software or from network configurations ?

                and we oracle recommend to use 3 SCAN-IP and can i use 4 , 5 ?????

                 

                i and i see your link from oracle-base ... but as you see he put all ips VIP Physical IP , Private on DNS why ?

                • 5. Re: Difference between SCAN and VIP in RAC ??
                  Mohanad Awad

                  Thanks All,

                   

                  When i ask network administration to define round robin using DNS , he will make this on the VIP ?

                   

                  For example if have below IP's :

                   

                  # Public

                    192.168.0.101 ol5-112-rac1.localdomain ol5-112-rac1

                    192.168.0.102 ol5-112-rac2.localdomain ol5-112-rac2

                    # Private

                    192.168.1.101 ol5-112-rac1-priv.localdomain ol5-112-rac1-priv

                    192.168.1.102 ol5-112-rac2-priv.localdomain ol5-112-rac2-priv

                    # Virtual

                    192.168.0.103 ol5-112-rac1-vip.localdomain ol5-112-rac1-vip

                    192.168.0.104 ol5-112-rac2-vip.localdomain ol5-112-rac2-vip

                   

                   

                  >> i must give him VIP : 192.168.0.103,192.168.0.104 to make DNS round robin ? or i give him public 192.168.0.101,192.168.0.102 ? or he will make new IP's virtual and rac can connect them with VIP ?

                   

                  Regards,

                  Mohanad Awad

                  • 6. Re: Difference between SCAN and VIP in RAC ??
                    Mahir M. Quluzade

                    Hi ,

                     

                    If you  are using DNS, then not need write SCAN IP addresses in hosts file,

                    Because SCAN IP Addresses  will resolve from DNS.

                     

                    Round Robin using for only SCAN IP addresses. Every node need only one VIP.

                     

                    Documentation Says:

                     

                    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

                    • 7. Re: Difference between SCAN and VIP in RAC ??
                      Billy~Verreynne

                      Your private addresses are wrong. In fact, from what you have listed above, your Interconnect is a mess - and will NOT performance and will NOT scale.

                       

                      Fact. A private and dedicate network for the Interconnect is mandatory.

                       

                      And if you even half-serious about building a decent RAC, you would use Infiniband for the Interconnect.

                      • 8. Re: Difference between SCAN and VIP in RAC ??
                        Mohanad Awad

                        what i send you above is just for testing not  production one , and i ask you about  network administration to define round robin using DNS , he will make this on the VIP ? not about Interconnect and private IP ...

                        • 9. Re: Difference between SCAN and VIP in RAC ??
                          Mahir M. Quluzade

                          You must make on SCAN.

                           

                          And yuo can check Roud -robin on scan with OS command nslookup

                           

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

                           

                          #

                          Regards

                          Mahir M. Quluzade

                          • 10. Re: Difference between SCAN and VIP in RAC ??
                            Mohanad Awad

                            Thanks Mahir,

                             

                            You must make on SCAN >> so it's different IP than  Virtual IP below

                             

                             

                            about You example :

                            -------------------------------------------------------------

                             

                            # 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

                             

                            ---------------------------------------------------------------

                             

                            So these IP (192.168.0.121 , 192.168.0.122 ,192.168.0.123) is Virtual IP which use for oracle RAC fail over  ? or it's different IPs ????

                             

                             

                            Regards,

                            Mohanad Awad

                            • 11. Re: Difference between SCAN and VIP in RAC ??
                              Mahir M. Quluzade

                              Yes, It is SCAN iIPs, and also need additional 1 VIP for each node.

                              • 12. Re: Difference between SCAN and VIP in RAC ??
                                Mohanad Awad

                                Thanks Maher,

                                 

                                Just to make sure , so now the listener will use DNS scan-IP on ORACLE 11GR2 . and will not have VIP.

                                 

                                and the SCAN IP will forward connection to one of the VIP ? 

                                What the Application forward the connection , it dose that from cluster software . it will now which Connect each scan-ip with VIP ??????

                                 

                                 

                                Regards,

                                Mohanad Awad 

                                • 13. Re: Difference between SCAN and VIP in RAC ??
                                  Billy~Verreynne

                                  The basics.

                                   

                                  Client uses SCAN hostname. This resolves to an IP address (or addresses). The client uses the IP to connect to the SCAN listener.

                                   

                                  The SCAN listener (via the remote_listener setting) is continually informed by the various database and ASM instances of what services are available, and on which hosts.

                                   

                                  The SCAN listener processes the client's request and sends a redirect back to a specific host with a local listener supporting the specific service.

                                   

                                  The client receives the redirect. It resolves that hostname (typically a VIP hostname) to an IP address (typically a VIP). It now connects to that IP and local listener on it, requesting a connection to the required service.

                                  • 14. Re: Difference between SCAN and VIP in RAC ??
                                    Mahir M. Quluzade

                                    Hi All,

                                     

                                    Yes Oracle create listener for each SCAN Ip address.

                                    As said Billy~Verreynne it is basic concepts of RAC architecture.

                                    Please read : Introduction to Oracle Clusterware  and Introduction to Oracle RAC

                                     

                                    Regards

                                    Mahir M. Quluzade