In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
At the beginning of oracle11g, set up SCAN ip, in addition to there is public ip,virtual ip,private ip, easy to make people dizzy.
The following are explained one by one:
Public ip:
Similar to the single-instance oracle database ip, it is mainly used to manage\ access.
Virtual ip (vip):
Oracle is dedicated in rac architecture, and this vip is used for failover. When one node fails, its vip will "float" to another normal node, that is, the normal node corresponds to two vip.
SCAN:
Single Client Access Name, a single customer access name, means the public domain name when the client (such as jdbc,pl/sql, etc.) accesses the database. Because rac is multi-node, the client only needs to provide an access name through the scan mechanism, and oracle rac will automatically assign a node to the client, which is transparent to the client.
Private ip: private ip,oracle internal ip for communication between nodes, which is not open to the public.
Public ip:
Must be a dedicated ip, must be configured before installing oracle rac, and can connect to the network. The public ip,vip,scan ip must be within the same network segment.
Vip:
It must be a private ip, it must be configured before installing oracle rac, it can connect with the network, and the public ip,vip,scan ip must be in the same network segment. Although the ip and domain name are configured, they must remain unusable (inaccessible, such as ping).
Scan:
It is recommended to configure three private ip through dns, which must be configured before installation. When there is a requestor, it will be randomly assigned by dns. Not in use for the time being. Scan ip needs to give a unique name, that is, three ip correspond to one domain name. Names can only be characters and'-'. Oracle is not recommended to be configured through a hosts file, so you can only get a scan ip.
Scan is also a virtual IP name, similar to the virtual IP name, but the difference is that the virtual ip is a node, an ip address and a domain name, scan is for the entire cluster, a domain name corresponds to multiple nodes, multiple ip addresses.
Private ip:
It must be a private ip. It must be configured before installation. It must be in a private private network. It can only be parsed by other rac nodes, not by other networks. Starting from 11.2.0.2, oracle can automatically use up to 4 private network cards to achieve load balancing and redundancy of internal nodes.
GNS:Grid Naming Service .
The following is the information on the Internet
In Oracle RAC environment, each node will have more than one IP address, which is Public/Private/Vip. What is the difference between these three IP? On which occasions are they used separately? Let's take a look at the foreigners' answers.
1. Private IP address is used only for internal clustering processing (Cache Fusion)
Private IP is used for heartbeat synchronization, which can be ignored directly at the user level. Simply understand, this Ip is used to ensure that the two servers synchronize the data with the private IP.
2. Virtual IP is used by database applications to enable fail over when one cluster node fails
Virtual IP is used for client applications to support failure transfer, which means that one machine is dead and the other is automatically taken over, and the client does not feel anything.
This is one of the reasons why RAC is used, and another reason, I think, is load balancing.
3. Public IP adress is the normal IP address typically used by DBA and SA to manage storage, system and database.
Public IP is generally used by administrators to ensure that the correct machine can be operated, and I prefer to call it the real IP.
From the above explanation, it is not difficult to understand that as a DBA, when configuring tnsnames.ora, some situations need to use vip, while others must use public IP. 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 deal with. On the contrary, when you use virtual ip, there will be uncertainty, because the server is enabled by default, that is, if you want to connect to A machine, the system assigns you B machine.
For example:
The following example is the use of 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)
)
))
The following example is the Public IP used, specify the connection machine 1, and note that the red font infodb1 further restricts the instance of the connection.
INFODB83 =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS= (PROTOCOL= TCP) (HOST=138.*.1.83) (PORT= 1521))
)
(CONNECT_DATA=
(SERVICE_NAME= infodb)
(INSTANCE_NAME= infodb1)
)
(HS = OK)
)
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 IP.
When there is no VIP, the Oracle client relies on "TCP/IP stack timeout" to determine the server failure. The TCP/IP protocol stack is implemented as a part of OS Kernel, and different OS has different thresholds. The time for users to learn about database exceptions depends entirely on the implementation of OS Kernel. Although some OS allows to modify this threshold, it will have an unknown impact on other programs. Therefore, oracle RAC introduces VIP to avoid dependence on TCP stack timeout.
The main difference between VIP and IP is that VIP is floating while 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.
When a node goes down, the real IP of the node can not be connected, but the virtual IP of the node can be connected, and it will automatically transfer the client connection request to the surviving node.
In the tnsname.ora file, specify the Address list, and the client will randomly select a node to connect to the database, rather than sequentially.
VIP features:
1 VIP is created through the script VIPCA during the final stage of the clusterware installation
2 VIP is registered in OCR as a CRS Resource of type Nodeapps, and the state is maintained by CRS
3 VIP will be bound to the node's public Nic; then the public Nic will have two addresses
4 when a node fails, CRS will transfer the VIP of the failed node to other nodes
5 the Listener of each node listens on both the public IP and VIP addresses of the public Nic.
6 the tnsname.ora of the client generally configures the VIP pointing to the node
A question can be raised from article 6 above. If you add a node, then the client's tnsname.ora needs to join the VIP of the new node. So imagine: multiple clients, adding multiple nodes, then it is particularly troublesome to maintain. So when it comes to Oracle11gR2, a concept of scan is introduced.
Scan,single client access name . Simple client connection name, which is a unique name, unique within the entire corporate network, and can be resolved into three ip addresses in DNS. The client only needs to know this name when connecting and connect. Each SCAN VIP corresponds to an internal scan listener,cluster service that is registered on each scan listener. Scan listener accepts client requests and foward to different Local listener. Or the listener of local provides the service to the client.
Note: scan does not have to resolve to three ip, one is enough. Only 3 are recommended to prevent scan from a single point of failure.
Principle and characteristics of VIP
Oracle's TAF is based on VIP technology. IP differs from VIP in that IP takes advantage of the TCP layer timeout, while VIP takes advantage of the immediate response of the application layer. VIP it is a floating IP. When there is a problem with one node, it will automatically go to another node.
Suppose you have a 2-node RAC, and in normal operation there is a VIP on each node. VIP1 and VIP2. When node 2 fails, such as an abnormal relationship. RAC does the following:
1)。 After CRS detects an exception of rac2 nodes, it triggers Clusterware reconfiguration, and finally removes the rac2 nodes from the cluster, and a new cluster is formed by node 1.
2)。 The Failover mechanism of RAC transfers the VIP of node 2 to node 1, and there are three IP addresses on the PUBLIC network card of node 1: VIP1,VIP2, PUBLIC IP1.
3)。 The user's connection request for VIP2 will be routed to node 1 by the IP layer
4)。 Because there is an VIP2 address on node 1, all packets pass through the routing layer, the network layer, and the transport layer.
5)。 However, only two IP addresses of VIP1 and public IP1 are listening on node 1. The VIP2 is not listening, so there is no corresponding program in the application layer to receive the packet, and the error is caught immediately.
6)。 The client segment can immediately receive this error, and then the client segment will re-initiate the connection request to the VIP1.
VIP features:
1)。 VIP is created through a VIPCA script
2)。 VIP is registered in OCR as a CRS Resource of type Nodeapps, and the state is maintained by CRS.
3)。 The VIP is bound to the node's public Nic, so the public Nic has two addresses.
4)。 When a node fails, CRS transfers the VIP of the failed node to another node.
5)。 The Listener of each node listens for both public ip and VIP on the public Nic.
6)。 The tnsnames.Ora of the client generally configures the VIP pointing to the node.
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.