In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
I would like to share with you several kinds of IP in oracle 11gr2 rac. I hope you will get something after reading this article. Let's discuss it together.
Open the / etc/hosts file of 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
There are four kinds of IP designed in this file, namely Public IP, Private IP, Virtual IP and SCAN IP.
Private ip: internal IP. Used for communication between nodes, including network heartbeat and cache fusion
Public ip: external IP. Used to provide external data services.
Virtual IP: virtual IP. Its greatest function is for failover.
Each node in the Oracle RAC has a virtual IP, referred to as VIP, which is on the same network segment as the public network PUBLIC IP. Vip is attached to the public interface.
The main difference between Virtual IP and PUBLIC IP is that VIP is floating while PUBLIC IP is fixed. When all nodes are running normally, the VIP of each node will be assigned to the public NIC. According to the ifconfig view under linux, there are 2 IP addresses on the public Nic. If a node goes down, the VIP of that node will be transferred to the running node. That is, the public NIC of the surviving node will have three IP addresses on the network card.
If there is no vip, the process of the failed node will have a long tcp timeout to return an error. After the node fails with vip, because the vip drifts to other nodes, the process connected to the vip will soon return an error, thus faster to try to connect to other active nodes and prevent the client from repeatedly connecting to the instance of node1. If both the application and the client are configured with transparent application failover options, you can reconnect to the remaining instances at the client.
Another reason for using Virtual ip, I think, is load balancing. When the client configures tnsnames.ora, it is necessary to use vip in some situations and Public IP in others. For example, when you are locating a deadlock in a database, you can use Public IP to ensure that you are connected to the machine you want to process. On the contrary, there will be uncertainty when using VIP, because the server enables load balancing by default, that is, you may want to connect to A machine, but the system assigns you B machine.
SCAN IP: in oracle 11gR2, SCAN IP appears as a new IP. Scan ip is actually a new connection layer added by oracle between the client and the database. When a client accesses, it connects to SCAN IP LISTENER, and when SCAN IP LISTENER receives a connection request, it forwards the client connection request to the VIP LISTENER on the corresponding instance according to the LBA algorithm, thus completing the connection process between the client and the server. The simplification is as follows:
Client-> scan listener-> local listener-> local instance
You can also think of scan as a virtual hostname that corresponds to the entire RAC cluster. Client hosts only need to use this scan name to access any node of the database cluster. Of course, the nodes visited are random. Oracle strongly recommends that you resolve SCAN through DNS Server's round robin mode configuration to achieve load balancing (that is, rotate the IP address corresponding to the SCAN connection). This is somewhat similar to the principle of load balancing through vip and listener loadbalance configuration.
So why did you add a SCAN IP after Virtual ip?
Before oracle 11.2, client used vip when linking to the database. If your oracle cluster has four nodes, then the client's tnsnames.ora should have a connection string of four host vip. If cluster adds a node, then each client connecting to the database needs to modify the tnsnames.ora.
After the introduction of scan, it is convenient for an interface for client connection, as the name implies single client access name, a simple client connection name, which is a unique name, unique within the entire corporate network, and can be resolved to three ip addresses in DNS. When the client connects, it only needs to know the name and connect. Each SCAN VIP corresponds to an internal service of scan listener,cluster is registered on each scan listener. Scan listener accepts requests from the client and foward to different Local listener, or the listener of local provides services to the client.
Scan ip is mainly to simplify client connections. If your oracle cluster has 20 nodes, do you need to configure 20 vip when connecting clients? if you use scan, you only need one scan name. Scan will do the rest for you.
After reading this article, I believe you have a certain understanding of "several kinds of IP in oracle 11gr2 rac". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.