4 Types of IP commentary in Oracle 11GR2 RAC

Source: Internet
Author: User

There are a lot of friends who are confused about the 4 IPs when configuring Oracle 11GR2 RAC, this article explains here.

Open a/etc/hosts file for a RAC node

Cat/etc/hosts

# public IP

192.168.1.138rac1.localdomain Rac1

192.168.1.139rac2.localdomain RAC2

#Private IP

172.16.10.138rac1-priv.localdomain Rac1-priv

172.16.10.139rac2-priv.localdomain Rac2-priv

#Virtual IP

192.168.1.140 Rac1-vip.localdomain RAC1-VIP

192.168.1.141 Rac2-vip.localdomain RAC2-VIP

#SCAN IP

192.168.1.142 Rac-scan.localdomain Rac-scan


This file is designed with four types of IP, with public IP, Private IP, Virtual IP, SCAN IP

Private IP: That is, internal IP. For communication between nodes, including network heartbeat and cache fusion
Public IP: That is, the external IP. Used to provide external data services.
Virtual IP: That is, an IP. Its maximum effect is for failover.

Each node in the Oracle RAC has a virtual IP, referred to as a VIP, and a public IP in the same network segment. VIP is attached to the public gateway interface.
The main difference between Virtual IP and public IP is that the VIP is floating and the public IP is fixed. When all nodes are functioning properly, the VIP of each node is assigned to the public NIC, and in Linux ifconfig, the public network card is 2 IP addresses, and if one node goes down, the VIP of the node is transferred to the node that is still running. That is, the surviving node of the public NIC on this NIC, there will be 3 IP addresses.

If there is no VIP, the connection failed node process will have a long TCP timeout wait to return an error, after the VIP, after the node fails, because the VIP drift to other nodes, the process of connecting the VIP will quickly return errors, so that the faster attempt to connect other active nodes To prevent clients from repeatedly connecting to Node1 instances.



Scan IP: In Oracle 11gr2, scan IP appears as a new IP, scan IP is actually oracle between the client and the database, a new connection layer, when there is client access, connected to the scan IP LISTENER, and the scan IP L When the Istener receives a connection request, it forwards the client's connection request to the VIP LISTENER on the corresponding instance based on the LBA algorithm, thus completing the whole client-server connection process. Simplify as follows:
Client, scan listener, local listener, local instance
You can also interpret scan as a virtual hostname, which corresponds to the entire RAC cluster. The client host simply accesses any node of the DB cluster through this scan name. Of course, the nodes that are accessed are random, and Oracle strongly recommends parsing the scan through the DNS server's round robin mode configuration to achieve load balancing (that is, rotating the IP address of the connection scan). This is somewhat similar to the principle of load balancing through VIP and listener loadbalance configurations.


So why did you add a scan IP after the virtual IP?

Before Oracle 11.2, the client links the database with a VIP, if your Oracle cluster has 4 nodes, Then in the client's Tnsnames.ora there is a connection string of four host VIP, if cluster adds a node, then for each client connecting the database needs to modify this Tnsnames.ora.


After the introduction of scan, it is convenient for the client to connect an interface, as the name implies, a single client access name, a simple connection name, this is a unique name, within the entire corporate network is unique, and in DNS can be resolved to three IP addresses, Client connection only need to know this name, and connect, each scan VIP corresponding to a scan listener,cluster internal service on each scan listener have registered, scan listener accept the client's request, and foward to different local listener, or by the local listener to provide services to the client.


Scan IP is mainly to simplify the client connection, if your Oracle cluster has 20 nodes, when the client connection, is not required to configure 20 VIP, if using scan, only need a scan name on the line, the rest of the matter, scan to help you do.


This article is from the "Hollows Jie Sun" blog, be sure to keep this source http://xjsunjie.blog.51cto.com/999372/1547128

4 Types of IP commentary in Oracle 11GR2 RAC

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.