RAC配置2个私网网卡使用HAIP服务

      如果是在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

RAC配置2个私网网卡使用HAIP服务_第1张图片

 

 

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
      
      

 

你可能感兴趣的:(RAC配置2个私网网卡使用HAIP服务)