如果是在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=00:0C:29:3F:A5:98
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 1 ONLINE ONLINE wsgwa2 [grid@wsgwa2 ~]$ ifconfig -a eth1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:84 inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe3f:a584/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:96312 errors:0 dropped:0 overruns:0 frame:0 TX packets:123418 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:56115982 (53.5 MiB) TX bytes:94440448 (90.0 MiB) eth1:1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:84 inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe3f:a598/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:110625 errors:0 dropped:0 overruns:0 frame:0 TX packets:132466 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:72168975 (68.8 MiB) TX bytes:102316691 (97.5 MiB) eth2:1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 [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 ---------- --------------- ---------------- --- ------------------------------- 2 eth1:1 169.254.109.141 NO 2 eth2:1 169.254.174.33 NO 1 eth1:1 169.254.22.31 NO 1 eth2:1 169.254.202.196 NO [root@wsgwa2 ~]# ifconfig eth1 down grid_alert Sun May 24 14:10:46 2020 SKGXP: ospid 3617: network interface with IP address 169.254.109.141 no longer running (check cable) SKGXP: ospid 3617: network interface with IP address 169.254.109.141 is DOWN Sun May 24 14:11:48 2020 SKGXP: ospid 3617: network interface with IP address 169.254.109.141 is now running SKGXP: ospid 3617: network interface with IP address 169.254.109.141 is now UP #ifconfig -a ip 169.254.109.141移動到存活的eth2網路卡上 eth1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:84 inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:100543 errors:0 dropped:0 overruns:0 frame:0 TX packets:128814 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:58595074 (55.8 MiB) TX bytes:98607919 (94.0 MiB) eth2 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe3f:a598/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:117343 errors:0 dropped:0 overruns:0 frame:0 TX packets:139978 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:76533799 (72.9 MiB) TX bytes:107769058 (102.7 MiB) eth2:1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2:2 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 啟動恢復 [root@wsgwa2 ~]# ifconfig eth1 up eth1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:84 inet addr:192.168.53.12 Bcast:192.168.53.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe3f:a584/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:100874 errors:0 dropped:0 overruns:0 frame:0 TX packets:129149 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:58773246 (56.0 MiB) TX bytes:98774886 (94.1 MiB) eth1:1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:84 inet addr:169.254.109.141 Bcast:169.254.127.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:192.168.54.12 Bcast:192.168.54.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe3f:a598/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:121482 errors:0 dropped:0 overruns:0 frame:0 TX packets:145062 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:79272957 (75.6 MiB) TX bytes:111847037 (106.6 MiB) eth2:1 Link encap:Ethernet HWaddr 00:0C:29:3F:A5:98 inet addr:169.254.174.33 Bcast:169.254.255.255 Mask:255.255.128.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1