【RAC】11g R2 RAC新特性之Highly Available IP(HAIP)

【RAC】11g R2 RAC新特性之Highly Available IP(HAIP)


在Oracle 11.2.0.2之前,私网的冗余一般是通过在OS上做网卡绑定(如Bond等)来实现的,从Oracle 11.2.0.2版本开始推出HAIP(Highly Available Virtual IP)技术替代了操作系统层面的网卡绑定技术,功能更强大、更兼容。HAIP通过其提供的独特的169.254.*网段的IP地址实现集群内部链接的高可用及负载均衡。所以,在11.2.0.2或更高版本安装RAC的时候需要注意169.254.*的IP地址不能被占用。有了HAIP技术则可以不再需要借助任何第三方的冗余技术来实现私网网卡的冗余。

资源ora.cluster_interconnect.haip将会启动一个到四个本地HAIP地址附在Private网络适配器上。通过HAIP完成Oracle RAC和ASM等内部通讯。如果某一个私有网卡物理损坏,那么该网卡上的HAIP地址会漂移到其它的可用的私有网络上。多个私网网卡可以在安装阶段定义,也可以在GRID配置完成之后,通过调用$GRID_HOME/bin/oifcfg setif工具(命令为:oifcfg setif -global eth2/192.168.1.0:cluster_interconnect)来配置HAIP。

HAIP的个数取决于GRID激活的私网网卡的个数。如果只有1块私网网卡,那么GRID将会创建1个HAIP。如果有两块私网网卡,那么GRID将会创建两个HAIP。若超过两块私网网卡则GRID创建4个HAIP。GRID最多支持4块私网网卡,而集群实际上使用的HAIP地址数则取决于集群中最先启动的节点中激活的私网网卡数目。如果选中更多的私网网卡作为Oracle的私有网络,那么多余4个的不能被激活。

管理ora.cluster_interconnect.haip这个资源的是ohasd.bin进程。其对应的log位于$GRID_HOME/log/<nodename>/ohasd/ohasd.log以及$GRID_HOME/log/<nodename>/agent/ohasd/orarootagent_root/orarootagent_root.log这两个位置。在HAIP资源online以后,通过操作系统命令ifconfig -a就能查看到多了类似于eth0:1的虚拟网卡,HAIP地址为169.254.X.X。当然也可以在数据库级别通过GV$CLUSTER_INTERCONNECTS视图查看HAIP的地址。HAIP对应的地址由系统自动分配,无法由用户手工进行指定。

Oracle数据库和ASM实例可以通过HAIP来实现私网通讯的高可用性和负载均衡。私网的流量会在这些私网网卡上实现负载均衡,如果某个网卡出现了故障,它上面的HAIP会自动切换到别的可用的私网网卡上,从而不影响私网的通讯。Windows平台目前不支持HAIP技术。

在有些客户环境下,私网是通过VLAN划出来的,而出于网络管理要求,VLAN的IP地址与网卡必须是绑定的,私网IP也必须是固定的IP地址(虽然按Oracle RAC的安装要求,私网应该是独立隔离的网络),这时HAIP会无法分配,导致依赖它的ASM资源无法启动。HAIP存在不少Bug,若不幸碰到,则可以将HAIP功能禁用掉。如果用户使用的是操作系统级别的绑定或者没有使用私网的绑定,那么可以通过在RDBMS和ASM的参数文件中设置CLUSTER_INTECONNECTS指定私网地址将HAIP覆盖(如果有多个私网地址,请用英文冒号分隔)。虽然说HAIP本身依然存在,但是ASM实例和RDBMS实例以后就不会使用HAIP。

下面给出禁用HAIP的主要步骤:

使用root用户执行以下命令。

1、停止所有节点的CRS

crsctl stop crs

2、依次在每个节点中执行以下命令(节点1执行完毕后再在节点2执行)

crsctl start crs -excl -nocrs

crsctl stop res ora.asm -init

crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=0" -init

crsctl modify res ora.asm -attr "START_DEPENDENCIES='hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.drivers.acfs)',STOP_DEPENDENCIES='hard(intermediate:ora.cssd)'" -init

crsctl stop crs

说明,ora.cluster_interconnect.haip的ENABLED属性的原始值为1:

ENABLED=1

ora.asm资源的START_DEPENDENCIES和STOP_DEPENDENCIES的原始值为:

START_DEPENDENCIES=hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.cluster_interconnect.haip,ora.drivers.acfs)

STOP_DEPENDENCIES=hard(intermediate:ora.cssd,shutdown:ora.cluster_interconnect.haip)

3、依次在每个节点启动CRS

crsctl start crs

4、检查HAIP是否禁用

crsctl stat res -t -init

若ora.cluster_interconnect.haip为offline则为禁用状态。然后执行如下命令:

ifconfig -a 或ip a |grep 169.254

查看是否还有169.254开头的地址,如果没有了,那么说明已经禁用成功。

下面给出查看资源的属性值的命令:

[root@rac2 ~]# crsctl stat res ora.cluster_interconnect.haip  -p -init | grep ENABLED

ENABLED=0

[root@rac2 ~]# crsctl stat res ora.asm  -p -init | grep START_DEPENDENCIES

START_DEPENDENCIES=hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.drivers.acfs)

[root@rac2 ~]#

[root@rac2 ~]# crsctl stat res ora.asm  -p -init | grep STOP_DEPENDENCIES

STOP_DEPENDENCIES=hard(intermediate:ora.cssd)

若启用HAIP,则过程和禁用的过程一致,其主要修改命令如下:

crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=1" -init

crsctl modify res ora.asm -attr "START_DEPENDENCIES='hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.cluster_interconnect.haip,ora.drivers.acfs)',STOP_DEPENDENCIES='hard(intermediate:ora.cssd,shutdown:ora.cluster_interconnect.haip)'" -init

 
 
 
 

 

在11g之前的版本,为了使单块私网网卡NIC down引起节点踢出的可能性最小化,通常要依赖与OS厂商的bonding,trunking,teaming类似技术将冗余的网卡绑定在一起使用,从11.2.0.2版本开始,Oracle Clusterware提供了通过ip故障切换来保障内部连接冗余的一体化解决方案。

多个私网网卡可以在安装阶段定义,可以在后来使用oifcfg进行更改,ora.cluster_interconnect.haip资源将从”link-local”IP范围(169.254.*.*)中为每个私网网卡选取一个高可用的虚IP(HAIP),默认地,私网流量会在所有活动的内联网卡上进行负载均衡,如果一个私网网卡损坏或者无法通信,Oracle GI软件会很透明地将相应的HAIP地址移到其中一个剩余的在工作的网卡上面,相比于第三方网卡绑定技术,在提供高可用性的同时又有效利用了带宽。

即使定义了更多的私网网卡,GI软件最大能激活的私网网卡数目为四个,而集群实际使用的HAIP地址数则取决于集群中最先启动的节点中激活的私网网卡数目,所以如果增加私网网卡,需要重启所有节点的clusterware才会生效。

以下通过示例演示1、使用HAIP的好处;2、想让私网连接继续使用固定ip的情况下如何配置。


1. 环境介始

DB 版本:11.2.0.3 两节点RAC 64位

OS 版本:OEL 5.7 64位

公网网卡(public):eth0 (192.168.1.201/203);私网网卡eth1(172.168.191、192);待加入私网网卡eth2(172.168.1.181/182)
[grid@jzh1 ~]$ oifcfg iflist -p -n

eth0  192.168.1.0  PRIVATE  255.255.255.0-------->公网

eth1  172.168.1.0  UNKNOWN  255.255.255.0-------->私网

eth1  169.254.0.0  UNKNOWN  255.255.0.0------->HAIP

eth2  172.168.1.0  UNKNOWN  255.255.255.0------>未使用

[grid@jzh1 ~]$ oifcfg getif

eth0  192.168.1.0  global  public

eth1  172.168.1.0  global  cluster_interconnect

1. 将eth2网卡加入cluster_interconnect

[grid@jzh1 ~]$ oifcfg setif -global eth2/172.168.1.0:cluster_interconnect

[grid@jzh1 ~]$ oifcfg getif

eth0  192.168.1.0  global  public

eth1  172.168.1.0  global  cluster_interconnect

eth2  172.168.1.0  global  cluster_interconnect


[root@jzh1 ~]# ifconfig –a

….
eth1      Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:172.168.1.191  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:25815 errors:0 dropped:0 overruns:0 frame:0

          TX packets:30961 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:13606333 (12.9 MiB)  TX bytes:20103597 (19.1 MiB)

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 


          inet addr:169.254.252.36  Bcast:169.254.255.255  Mask:255.255.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth2      Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:172.168.1.181  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4102 errors:0 dropped:0 overruns:0 frame:0

          TX packets:43 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1809892 (1.7 MiB)  TX bytes:6916 (6.7 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:9452 errors:0 dropped:0 overruns:0 frame:0

          TX packets:9452 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:11305144 (10.7 MiB)  TX bytes:11305144 (10.7 MiB)

从ifconfig –a输出可以看到,现在并未在eth2上分配相应的HAIP;

只重启一个节点的CRS,查看HAIP变化的情况:

[root@jzh1 ~]# cd /u01/app/grid/product/11.2.0/db_1/bin/

[root@jzh1 bin]# ./crsctl stop cluster

[root@jzh1 bin]# ./crsctl stat res -t -init

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.asm

      1        ONLINE  ONLINE       jzh1                     Started    

ora.cluster_interconnect.haip

      1        ONLINE  ONLINE       jzh1

ora.crf

      1        ONLINE  ONLINE       jzh1                                        

ora.crsd

      1        ONLINE  ONLINE       jzh1                                        

ora.cssd

      1        ONLINE  ONLINE       jzh1                                         

ora.cssdmonitor

      1        ONLINE  ONLINE       jzh1                                        

ora.ctssd

      1        ONLINE  ONLINE       jzh1                     ACTIVE:-700        

ora.diskmon

      1        OFFLINE OFFLINE                                                  

ora.evmd

      1        ONLINE  ONLINE       jzh1                                        

ora.gipcd

      1        ONLINE  ONLINE       jzh1                                         

ora.gpnpd

      1        ONLINE  ONLINE       jzh1                                        

ora.mdnsd

      1        ONLINE  ONLINE       jzh1

 

[root@jzh1 bin]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:00:27:7C:02:66 

          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1465 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1223 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:138696 (135.4 KiB)  TX bytes:140412 (137.1 KiB)

 

eth1      Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:172.168.1.191  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:37602 errors:0 dropped:0 overruns:0 frame:0

          TX packets:41365 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:20243257 (19.3 MiB)  TX bytes:25118102 (23.9 MiB)

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:169.254.252.36  Bcast:169.254.255.255  Mask:255.255.0.0

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

eth2      Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:172.168.1.181  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4191 errors:0 dropped:0 overruns:0 frame:0

          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1826607 (1.7 MiB)  TX bytes:12482 (12.1 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:12724 errors:0 dropped:0 overruns:0 frame:0

          TX packets:12724 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:14485187 (13.8 MiB)  TX bytes:14485187 (13.8 MiB)

 

如上可以看出,只重启一个节点,在新增的私网上并示分配HAIP,这是因为集群实际使用的HAIP地址数取决于集群中最先启动的节点在GI启动时激活的私网网卡数目(节点1重启后,集群中最先启动的节点就变成了节点2,而节点2的GI启动时激活的私网网卡是eht1)。

 

关闭两节点的CRS,再重启节点1的CRS,可以看到eth2网卡上分配了新的HAIP:

 

[root@jzh1 bin]# ./crsctl stop crs

[root@jzh2 bin]# ./crsctl stop crs

[root@jzh1 bin]# ./crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

[root@jzh1 bin]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:00:27:7C:02:66 

          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1615 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1416 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:150626 (147.0 KiB)  TX bytes:165915 (162.0 KiB)

 

eth1      Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:172.168.1.191  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:40216 errors:0 dropped:0 overruns:0 frame:0

          TX packets:43691 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:21707998 (20.7 MiB)  TX bytes:26237184 (25.0 MiB)

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:169.254.40.82  Bcast:169.254.127.255  Mask:255.255.128.0------>分配了新的HAIP与上面的HAIP不同。

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

eth2      Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:172.168.1.181  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4259 errors:0 dropped:0 overruns:0 frame:0

          TX packets:118 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1837463 (1.7 MiB)  TX bytes:22866 (22.3 KiB)

eth2:1    Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:169.254.132.31  Bcast:169.254.255.255  Mask:255.255.128.0------>分配了HAIP

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:14309 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14309 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:16043830 (15.3 MiB)  TX bytes:16043830 (15.3 MiB)


1. HAIP failover/failback测试

关闭节点2的eth2网卡,观察eth2上的HAIP变化

[root@jzh2 bin]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:00:27:24:BE:83 

          inet addr:192.168.1.203  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1429 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1141 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:144439 (141.0 KiB)  TX bytes:130175 (127.1 KiB)


eth1      Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:172.168.1.192  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:41805 errors:0 dropped:0 overruns:0 frame:0

          TX packets:42857 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:25461201 (24.2 MiB)  TX bytes:22956995 (21.8 MiB)

eth2      Link encap:Ethernet  HWaddr 08:00:27:8F:F9:93  ------->网卡不在running状态

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:3065 errors:0 dropped:0 overruns:0 frame:0

          TX packets:917 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1075689 (1.0 MiB)  TX bytes:392052 (382.8 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:11862 errors:0 dropped:0 overruns:0 frame:0

          TX packets:11862 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:8860108 (8.4 MiB)  TX bytes:8860108 (8.4 MiB)

 

再查看一次

[root@jzh2 bin]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:00:27:24:BE:83 

          inet addr:192.168.1.203  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1467 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1185 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:149432 (145.9 KiB)  TX bytes:138605 (135.3 KiB)

 

eth1      Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:172.168.1.192  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:45224 errors:0 dropped:0 overruns:0 frame:0

          TX packets:46113 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:27730676 (26.4 MiB)  TX bytes:24619678 (23.4 MiB)

 

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:169.254.248.244  Bcast:169.254.255.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1:2    Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:169.254.113.183  Bcast:169.254.127.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1-------->再次查看,发现原来在eth2上的HAIP已经failover到eth1上了。

eth2      Link encap:Ethernet  HWaddr 08:00:27:8F:F9:93 

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:3065 errors:0 dropped:0 overruns:0 frame:0

          TX packets:917 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1075689 (1.0 MiB)  TX bytes:392052 (382.8 KiB)

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:13061 errors:0 dropped:0 overruns:0 frame:0

          TX packets:13061 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:10106955 (9.6 MiB)  TX bytes:10106955 (9.6 MiB)

 

查看另一节点,发现原来在eth2上的HAIP同样failover到eth1上了:

[root@jzh1 bin]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 08:00:27:7C:02:66 

          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1727 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1499 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:169404 (165.4 KiB)  TX bytes:176549 (172.4 KiB)

 

eth1      Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:172.168.1.191  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:42413 errors:0 dropped:0 overruns:0 frame:0

          TX packets:46609 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:22699094 (21.6 MiB)  TX bytes:28181009 (26.8 MiB)

 

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:169.254.40.82  Bcast:169.254.127.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1:2    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:169.254.132.31  Bcast:169.254.255.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth2      Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:172.168.1.181  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:5007 errors:0 dropped:0 overruns:0 frame:0

          TX packets:149 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:2154439 (2.0 MiB)  TX bytes:31910 (31.1 KiB)


lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:16357 errors:0 dropped:0 overruns:0 frame:0

          TX packets:16357 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:17526361 (16.7 MiB)  TX bytes:17526361 (16.7 MiB)

1. 再恢复eth2网卡的运行,观察haip的变化:

[root@jzh2 bin]# ifup eth2

[root@jzh2 bin]# ifconfig –a

eth1      Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:172.168.1.192  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:51359 errors:0 dropped:0 overruns:0 frame:0

          TX packets:53530 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:30810015 (29.3 MiB)  TX bytes:28677206 (27.3 MiB)


eth1:2    Link encap:Ethernet  HWaddr 08:00:27:E9:7B:8A 

          inet addr:169.254.113.183  Bcast:169.254.127.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


eth2      Link encap:Ethernet  HWaddr 08:00:27:8F:F9:93 

          inet addr:172.168.1.182  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:4134 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1612 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:1535872 (1.4 MiB)  TX bytes:838887 (819.2 KiB)


eth2:1    Link encap:Ethernet  HWaddr 08:00:27:8F:F9:93 


          inet addr:169.254.248.244  Bcast:169.254.255.255  Mask:255.255.128.0------>haip failback回来了

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:14100 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14100 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:10572962 (10.0 MiB)  TX bytes:10572962 (10.0 MiB)

再看节点1的haip变化:

[root@jzh1 bin]# ifconfig –a

eth1      Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:172.168.1.191  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:50252 errors:0 dropped:0 overruns:0 frame:0

          TX packets:54664 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:27405036 (26.1 MiB)  TX bytes:32112301 (30.6 MiB)

 

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:A3:C9:14 

          inet addr:169.254.40.82  Bcast:169.254.127.255  Mask:255.255.128.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

eth2      Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:172.168.1.181  Bcast:172.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:7549 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1121 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:3198808 (3.0 MiB)  TX bytes:586895 (573.1 KiB)

eth2:1    Link encap:Ethernet  HWaddr 08:00:27:78:4D:21 

          inet addr:169.254.132.31  Bcast:169.254.255.255  Mask:255.255.128.0------>节点1 haip同样也failback回eth2了

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:18187 errors:0 dropped:0 overruns:0 frame:0

          TX packets:18187 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:19309077 (18.4 MiB)  TX bytes:19309077 (18.4 MiB)

 

通过以上测试可见,HAIP在同时利用多个私网网卡带宽提升私网性能的同时,又具备了类似OS层网卡绑定解决方案的高可用性。

上一篇:【DATAGUARD】 将11g物理备库转换为Snapshot Standby


下一篇:【PSU】AIX 11g RAC自动打GI PSU5