In the Oracle RAC environment, each node has multiple IP addresses: Public, Private, and Vip. What is the difference between these three IP addresses? Which occasions are used separately? Let's take a look at the answers from foreigners.
1. private IP address is used only for internal clustering processing (Cache Fusion)
Private IP addresses are used for heartbeat synchronization, which can be ignored directly at the user level. This Ip address is used to ensure the private IP addresses used for data synchronization between the two servers.
2. VIP is used by database applications to enable fail over when one cluster node fails
The virtual IP address is used for client applications to support failover. In other words, one instance is suspended and the other instance is automatically taken over. The client does not feel any way.
This is one of the reasons for using RAC, and I think it is Server Load balancer.
3. public IP adress is the normal IP address typically used by DBA and SA to manage storage, system and database.
Public IP addresses are generally used by administrators to ensure that they can operate on the right machine. I prefer to call them real IP addresses.
Through the above explanation, it is hard to understand that, as a DBA, When configuring tnsnames. ora, vip is used in some cases, while public IP must be used in some cases.For example, when you locate a database deadlock and use a public ip address, you can ensure that you are connected to the machine you want to handle. On the contrary, when using a virtual ip address, there will be uncertainty, because Server Load balancer is enabled by default, that is, if you want to connect to server A, the system allocates server B to you.
For example:
The following example shows how to use the VIP
- Infodb8=
- (DESCRIPTION=
- (ADDRESS= (PROTOCOL=TCP)(HOST= 138.*.1.81)(PORT=1521))
- (ADDRESS= (PROTOCOL=TCP)(HOST= 138.*.1.82)(PORT=1521))
- (LOAD_BALANCE=Yes)
- (FAILOVER=ON)
- (CONNECT_DATA=
- (SERVER=DEDICATED)
- (SERVICE_NAME=Infodb)
- (FAILOVER_MODE=
- (TYPE= SELECT)
- (METHOD=BASIC)
- (RETRIES=30)
- (DELAY=5)
- )
- ))
- In the following example, the Public IP address is used to specify the connection HOST 1. Note that the red font infodb1 further limits the connection instance.
- INFODB83=
- (DESCRIPTION=
- (ADDRESS_LIST=
- (ADDRESS= (PROTOCOL=TCP)(HOST= 138.*.1.83)(PORT=1521))
- )
- (CONNECT_DATA=
- (SERVICE_NAME= Infodb)
- (INSTANCE_NAME= Infodb1)
- )
- (HS=OK)
- )