11G Highly Available Virtual IP (haip)

简介: Highly Available Virtual IPStarting with Oracle RAC 11.2.0.2, Oracle has introduced Redundant Interconnect Usage feature to support IP failover.

Highly Available Virtual IP
Starting with Oracle RAC 11.2.0.2, Oracle has introduced Redundant Interconnect Usage feature to support IP failover. Oracle uses its ora.cluster_interconnect.haip resource to provide this functionality. The Highly Available Internet Protocol (HAIP) has the ability to activate a maximum of four private interconnect connections. These private network adapters can be configured during the initial installation process of Oracle Grid Infrastructure or after the installation process using the oifcfg utility.
Oracle Grid Infrastructure currently creates an alias IP (known as virtual private IP) on private network interface using the 169.254.*.* subnet for the HAIP. However, if that subnet range is already in use, Oracle Grid Infrastructure will not attempt to use it. The purpose of HAIP is to perform. load balancing across all active interconnect interfaces, and fail over existing non-responsive interfaces to other available interfaces.

Note: interconnect will use virtual private IP 169.254.167.163 instead of real private IP. For pre-11.2.0.2 instance, by default it will still use the real private IP; to take advantage of the new feature, init.ora parameter cluster_interconnects can be updated each time Grid is restarted .
NOTE: If using the 11.2.0.2 (and above) Redundant Interconnect/HAIP feature (as documented in CASE 2 below) - At present it is REQUIRED that all interconnect interfaces be placed on separate subnets.  If the interfaces are all on the same subnet and the cable is pulled from the first NIC in the routing table a rebootless-restart or node reboot will occur.

 

11G从11.2.0.2 开始加入了haip的功能,其资源名称为ora.cluster_interconnect.haip  ,功能类似SCAN IP,,加入了虚拟IP 在169.254.*.*网段,此虚拟机IP能够在多个节点之间漂移,实际的通信也是通过这个IP进行的,而且文档上说是热备,及正常情况下两条心跳或者多条心跳都是可用的。当使用HAIP如果你只有一个私有网卡那就使用一个HAIP,如果你有2块就建立2个HAIP,如果是2个以上就建立4个。当然每套私有网卡都必须在不同的网段上
下面测试一下,我已经有了一个3节点集群。
首先在任一节点查询当前的网卡配置
[grid@rac2 ~]$ oifcfg getif
eth1  10.0.0.0  global  cluster_interconnect --私有
eth0  172.16.14.0  global  public ---公有

[grid@rac2 ~]$ oifcfg iflist
eth0  172.16.14.0
eth1  10.0.0.0
eth1  169.254.0.0 --- haip

ifconfig 可以看到如下的信息:

eth1:1    Link encap:Ethernet  HWaddr 00:50:56:B0:00:58 
          inet addr:169.254.152.228  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0x2c40 Memory:d8940000-d8960000
这个就是虚拟机的私有IP
也可以通过各个实例执行
 select name,ip_address from v$cluster_interconnects;
进行查询HAIP
增加一块私有网卡
启动操作系统设置好IP
启动3节点的CRS
/oracle/app/grid/product/11.2.0/bin/crsctl start crs
设置新的私有网卡
/oracle/app/grid/product/11.2.0/bin/oifcfg setif -global eth2/10.10.11.0:cluster_interconnect
重新启动所有节点的CRS
查看配置
[root@rac2 peer]# /oracle/app/grid/product/11.2.0/bin/oifcfg iflist -p -n
eth0  172.16.14.0  PRIVATE  255.255.255.0
eth1  10.10.10.0  PRIVATE  255.255.255.0
eth1  169.254.0.0  UNKNOWN  255.255.128.0
eth2  10.10.11.0  PRIVATE  255.255.255.0
eth2  169.254.128.0  UNKNOWN  255.255.128.0
查看
eth1      Link encap:Ethernet  HWaddr 00:50:56:B0:00:57 
          inet addr:10.10.10.1  Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:feb0:57/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:218928 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:242751 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:125886078 (120.0 MiB)  TX bytes:160243706 (152.8 MiB)
          Base address:0x2c40 Memory:d8960000-d8980000

eth1:1    Link encap:Ethernet  HWaddr 00:50:56:B0:00:57 
          inet addr:169.254.40.143  Bcast:169.254.127.255  Mask:255.255.128.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0x2c40 Memory:d8960000-d8980000

eth2      Link encap:Ethernet  HWaddr 00:50:56:B0:00:14 
          inet addr:10.10.11.1  Bcast:10.10.11.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:feb0:14/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33853 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:35510 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13739000 (13.1 MiB)  TX bytes:26247347 (25.0 MiB)
          Base address:0x2c80 Memory:d8a40000-d8a60000

eth2:1    Link encap:Ethernet  HWaddr 00:50:56:B0:00:14 
          inet addr:169.254.194.254  Bcast:169.254.255.255  Mask:255.255.128.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Base address:0x2c80 Memory:d8a40000-d8a60000
发现已经可以看到新配置的虚拟网卡。这里可以但不是必须把私有网卡2的解析加入到HOSTS,因为oifcfg配置是不需要解析的,
haip之所以容灾,是因为当我们的EHT1故障后,ETH1:1的IP会漂移到eth2上,形成eth2:2,
这个还需要随后测试下。

相关文章
|
存储 安全 文件存储
Network Attached Storage
Network Attached Storage
136 0
|
Java 虚拟化 C++
Stack based vs Register based Virtual Machine Architecture
进程虚拟机简介 一个虚拟机是对原生操作系统的一个高层次的抽象,目的是为了模拟物理机器,本文所谈论的是基于进程的虚拟机,而不是基于系统的虚拟机,基于系统的虚拟机可以用来在同一个平台下去运行多个不同的硬件架构的操作系统,常见的有kvm,xen,vmware等,而基于进程的虚拟机常见的有JVM,PVM(python虚拟机)等,java和python的解释器将java和python的代码编译成JVM和P
3687 0
Virtual Machine
虚拟机 关于内存 CPU通过总线来管理内存, 总线分为3种 控制总线: 指定对内存进行的是读还是写操作 地址总线: 用来表示内存中的地址, 一根地址电线对应一个0|1bit, 如果有4根线, 则CPU对内存的操作就是00, 01, 10, 11这四个地址, 如果有32根, 则CPU对内存的操作就是...
1007 0
|
网络安全 网络性能优化 Linux