如果是在oracle 10gRAC, 私网网卡冗余保护只能使用操作系统网卡绑定方式,但是到了oracle 11g,如果担心一个私网网卡故障导致rac节点驱逐,可以使用2个私网网卡,Oracle将自动使用HAIP服务冗余私网网卡。
HAIP之后,无需使用网卡绑定就可以实现私网网卡的冗余。
如下测试环境rac 2节点,linux redhat6.9
1.配置
#/etc/hosts
10.0.0.11 wsgwa1
10.0.0.12 wsgwa2
192.168.53.11 wsgwa1-priv1
192.168.54.11 wsgwa1-priv2
192.168.53.12 wsgwa2-priv1
192.168.54.12 wsgwa2-priv2
10.0.0.13 wsgwa1-vip
10.0.0.14 wsgwa2-vip
10.0.0.15 wsgwa-scan # cd /etc/sysconfig/network-scripts/
[root@wsgwa2 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
IPADDR=192.168.53.12
BOOTPROTO=static
ONBOOT=yes
[root@wsgwa2 network-scripts]# cat ifcfg-eth2
DEVICE=eth2
IPADDR=192.168.54.12
BOOTPROTO=static
ONBOOT=yes
HWADDR=:0C::3F:A5:
2.测试,down一个私网网卡,如果rac只有一块私网网卡, 假设rac 2节点,将导致节点2被驱逐。
[grid@wsgwa2 ~]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cluster_interconnect.haip
ONLINE ONLINE wsgwa2
[grid@wsgwa2 ~]$ ifconfig -a
eth1 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3f:a584/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (53.5 MiB) TX bytes: (90.0 MiB) eth1: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric:
eth2 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3f:a598/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (68.8 MiB) TX bytes: (97.5 MiB) eth2: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric: [grid@wsgwa2 ~]$ oifcfg iflist
eth1 192.168.53.0
eth1 169.254.0.0
eth2 192.168.54.0
eth2 169.254.128.0
bond0 10.0.0.0 [grid@wsgwa2 ~]$ oifcfg getif
eth2 192.168.54.0 global cluster_interconnect
eth1 192.168.53.0 global cluster_interconnect
bond0 10.0.0.0 global public SQL> select * from gv$cluster_interconnects;
INST_ID NAME IP_ADDRESS IS_ SOURCE
---------- --------------- ---------------- --- -------------------------------
eth1: 169.254.109.141 NO
eth2: 169.254.174.33 NO
eth1: 169.254.22.31 NO
eth2: 169.254.202.196 NO [root@wsgwa2 ~]# ifconfig eth1 down grid_alert
Sun May ::
SKGXP: ospid : network interface with IP address 169.254.109.141 no longer running (check cable)
SKGXP: ospid : network interface with IP address 169.254.109.141 is DOWN Sun May ::
SKGXP: ospid : network interface with IP address 169.254.109.141 is now running
SKGXP: ospid : network interface with IP address 169.254.109.141 is now UP
#ifconfig -a ip 169.254..141移动到存活的eth2网卡上
eth1 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (55.8 MiB) TX bytes: (94.0 MiB) eth2 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3f:a598/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (72.9 MiB) TX bytes: (102.7 MiB) eth2: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric: eth2: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric: 启动恢复
[root@wsgwa2 ~]# ifconfig eth1 up
eth1 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3f:a584/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (56.0 MiB) TX bytes: (94.1 MiB) eth1: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric: eth2 Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe3f:a598/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (75.6 MiB) TX bytes: (106.6 MiB) eth2: Link encap:Ethernet HWaddr :0C::3F:A5:
inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0
UP BROADCAST RUNNING MULTICAST MTU: Metric: