Modifying the default gateway address used by the Oracle 10g VIP

来源:互联网 发布:番茄酱 知乎 编辑:程序博客网 时间:2024/06/01 21:58
PURPOSE-------By default, the server's default gateway is used as a ping target during the Oracle RAC 10g VIP status check action. Upon a ping failure, Oracle will decide that the current interface where the VIP is running has failed, and will initiate an interface / internode VIP failover.  Though the VIP check action will work as designed in most situations, it will not function correctly as designed under special circumstances where the server's default gateway resides on a different network from the client LAN network (the network where the VIP is configured on).  In order for the VIP check action to function as designed, the ping target address needs to be modified after installing RAC 10g. o Example of a network configuration where use of the default gateway is sufficient                                                    +------+   +------+   +------+   +-----------------+                |Client|   |Client|   |Client|   | * Default G/W * |                +------+   +------+   +------+   +-----------------+                   |          |          |              |(146.56.20.1)                   +----------+----------+--------------+                              |                              |                +-------------+---------------+                |                             |                |                             |          (146.56.20.2)                 (146.56.20.3)              (VIP)                         (VIP)                |                             |        +------qfe1------+            +------qfe1------+        |                |            |                |        |(RAC node1) qfe0+------------+qfe0 (RAC node2)|        |                |            |                |        +----------------+            +----------------+   Since the VIP, clients and default gateway are all on the same network segment, the VIP   check action will function correctly in the above case. o Example of a network configuration where the ping target needs to be modified                +------+   +------+   +------+   +-------------+                |Client|   |Client|   |Client|   |    nodeX    |                +------+   +------+   +------+   +-------------+                   |          |          |              |(146.56.20.1)                   +----------+----------+--------------+                              |                              |                +-------------+---------------+                |                             |                |                             |          (146.56.20.2)                 (146.56.20.3)              (VIP)                         (VIP)                |                             |        +------qfe1------+            +------qfe1------+        |                |            |                |        |(RAC node1) qfe0+------------+qfe0 (RAC node2)|        |                |            |                |        +------qfe2------+            +------qfe2------+          (196.168.1.2)                 (192.168.1.3)                |                             |                +-------------+---------------+                              |                              |                              +---------------------+                 (192.168.1.4)|                     |(192.168.1.1)                       +------+-------+      +------+------+                       |Client For    |      | Default G/W |                       |   Management |      +-------------+                       +--------------+   Since the default gateway is configured on a different network segment from the VIP/Clients,   the VIP check action will not work correctly as designed in the above configuration.   Since the VIP check action will use the default gateway (192.168.1.1) as the ping target, and   Oracle will not be able to detect failures in the client network (146.56.20.X) as expected.   In this case, the ping target used by the VIP needs to be modified to an IP address in the    146.56.20.X network segment in order for the check action to function correctly as designed.   The target address needs to remain static and highly available, as VIP availability directly    leads to service / instance availability.  In order to achieve high availability for the ping   target, make sure to use redundant links / hardware for the host / router to be used as the target.NOTE-----This note is targeted for systems with the 10.1.0.4 patchset installed.On some non-Windows operating systems, Oracle takes advantage of certain platform specific API's to determinethe connectivity of the network interface.  In these cases, Oracle will not ping the default gateway as long as the call to the platform specific API succeeds.  However, Oracle will ping the default gateway in the event where the API fails, so it is important to configure the default gateway correctly even if the default gateway is not pinged on a regular basis.The Windows VIP determines network connectivity using Windows API's, thus the default gateway (nor any 3rd site) is not used in the VIP status check action.  Therefore the modifications explained in this article are not applicable on Windows platforms.Modifying the ping target for the Oracle 10g VIP----------------------------------------------------------The following steps need to be performed on every node within the cluster.1. Stop all node applications. % srvctl stop instance -d <database-name> -i <instance-name> % srvctl stop asm -n <node_name> % srvctl stop nodeapps -n <hostname>2. As root, modify the following script and change the value of DEFAULTGW variable. # vi $ORA_CRS_HOME/bin/racgvip * Examples of modifying the ping target    BEFORE)      DEFAULTGW=    AFTER)      DEFAULTGW=146.56.20.13. Start the node applications and other necessary resources. % srvctl start nodeapps -n <hostname> % srvctl start asm -n <node_name> % srvctl start instance -d <database-name> -i <instance-name>Make sure to repeat these steps for all CRS homes within the cluster.Also make sure to repeat these steps after patching / reinstalling the software,as the modifications may be overwritten by the new software on all nodes.Before applying the changes to your production cluster, thorough testing must be done on your test cluster to ensure that the new configuration does not introduce new problems in the VIPcheck action.
AIX中查看网关的方法:
root@ballontt:/#  netstat -nr
Routing tablesDestination      Gateway         Flags   Refs     Use  If   Exp  GroupsRoute Tree for Protocol Family 2 (Internet):default            10.217.3.135      UG       27  32898665 en16     -      -   10.217.4/24        10.217.3.96       U         0         0 en16     -      -   10.217.4.64        10.217.3.94       UHSb      0         0 en16     -      -   =>10.217.4.64/26     10.217.3.94       U        15 628921208 en16     -      -   10.217.4.92        127.0.0.1         UGHS      2   1752346 lo0      -      -   10.217.4.94        127.0.0.1         UGHS      2       828 lo0      -      -   10.217.4.127       10.217.3.94       UHSb      0       230 en16     -      -   10.217.4.255       10.217.3.96       UHSb      0         0 en16     -      -   127/8              127.0.0.1         U        33  20199605 lo0      -      -   192.168.168.0      192.168.168.12    UHSb      0         7 en17     -      -   =>192.168.168/24     192.168.168.12    U        48 384017680 en17     -      -   192.168.168.12     127.0.0.1         UGHS      4   1080949 lo0      -      -   192.168.168.255    192.168.168.12    UHSb      0       330 en17     -      -   Route Tree for Protocol Family 24 (Internet v6):::1                ::1               UH        1    104218 lo0      -      - 
其中10.217.3.135就是vip需要ping系统默认网关。在我自己的系统上,通过查看ifconfig -a 知道该网关地址和VIP地址10.217.3.96在同一个网段

其它各个字段解释见:http://blog.knowsky.com/265348.htm


ballontt
2013/12/24

---The End---

微博weibo.com/ballontt
如需转载,请标明出处和链接,谢谢!
0 0
原创粉丝点击