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

lhrbest發表於2017-06-25

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




Oracle 11.2.0.2之前,私網的冗餘一般是透過在OS上做網路卡繫結(如Bond等)來實現的,從Oracle 11.2.0.2版本開始推出HAIPHighly Available Virtual IP)技術替代了作業系統層面的網路卡繫結技術,功能更強大、更相容。HAIP透過其提供的獨特的169.254.*網段的IP地址實現叢集內部連結的高可用及負載均衡。所以,在11.2.0.2或更高版本安裝RAC的時候需要注意169.254.*IP地址不能被佔用。有了HAIP技術則可以不再需要藉助任何第三方的冗餘技術來實現私網網路卡的冗餘。

資源ora.cluster_interconnect.haip將會啟動一個到四個本地HAIP地址附在Private網路介面卡上。透過HAIP完成Oracle RACASM等內部通訊。如果某一個私有網路卡物理損壞,那麼該網路卡上的HAIP地址會漂移到其它的可用的私有網路上。多個私網網路卡可以在安裝階段定義,也可以在GRID配置完成之後,透過呼叫$GRID_HOME/bin/oifcfg setif工具(命令為:oifcfg setif -global eth2/192.168.1.0:cluster_interconnect)來配置HAIP

HAIP的個數取決於GRID啟用的私網網路卡的個數。如果只有1塊私網網路卡,那麼GRID將會建立1HAIP。如果有兩塊私網網路卡,那麼GRID將會建立兩個HAIP。若超過兩塊私網網路卡則GRID建立4HAIPGRID最多支援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劃出來的,而出於網路管理要求,VLANIP地址與網路卡必須是繫結的,私網IP也必須是固定的IP地址(雖然按Oracle RAC的安裝要求,私網應該是獨立隔離的網路),這時HAIP會無法分配,導致依賴它的ASM資源無法啟動。HAIP存在不少Bug,若不幸碰到,則可以將HAIP功能禁用掉。如果使用者使用的是作業系統級別的繫結或者沒有使用私網的繫結,那麼可以透過在RDBMSASM的引數檔案中設定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.haipENABLED屬性的原始值為1

ENABLED=1

ora.asm資源的START_DEPENDENCIESSTOP_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.haipoffline則為禁用狀態。然後執行如下命令:

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,而節點2GI啟動時啟用的私網網路卡是eht1)

 

關閉兩節點的CRS,再重啟節點1CRS,可以看到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同樣failovereth1上了:

[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)

再看節點1haip變化:

[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層網路卡繫結解決方案的高可用性。

 





About Me

...............................................................................................................................

● 本文整理自網路

● 本文在itpub(http://blog.itpub.net/26736162)、部落格園(http://www.cnblogs.com/lhrbest)和個人微信公眾號(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/abstract/1/

● 本文部落格園地址:http://www.cnblogs.com/lhrbest

● 本文pdf版及小麥苗雲盤地址:http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答:http://blog.itpub.net/26736162/viewspace-2134706/

● QQ群:230161599     微信群:私聊

● 聯絡我請加QQ好友(646634621),註明新增緣由

● 於 2017-06-02 09:00 ~ 2017-06-30 22:00 在魔都完成

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

...............................................................................................................................

拿起手機使用微信客戶端掃描下邊的左邊圖片來關注小麥苗的微信公眾號:xiaomaimiaolhr,掃描右邊的二維碼加入小麥苗的QQ群,學習最實用的資料庫技術。

【RAC】11g R2 RAC新特性之Highly Available IP(HAIP)
DBA筆試面試講解
歡迎與我聯絡

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2141223/,如需轉載,請註明出處,否則將追究法律責任。

相關文章