The VIP address is a static IP address with a virtual host name defined and resolved through either the DNS or your hosts file. During Oracle Clusterware installation, you are prompted to enter a virtual IP and virtual host name for each of the nodes in the cluster. Virtual IP addresses are stored in OCR, and different components within the Oracle Clusterware HA framework depend on these VIPs. Generally, VIP addresses can be changed during a scheduled, complete cluster outage. However, in some cases, downtime is not required. For example, if the VIP for node 1 was entered incorrectly in DNS, then the modification would need to occur only on that node. From 10.2.0.3 onwards, the ASM/database instance dependency on the VIP resource is removed, so the VIP could be modified without having to take down the ASM/database instance, only client connections to this node be impacted during this time. In this article, I am going to show the general procedure for Oracle 10G R2 and 11G R2.
- Confirm the current IP address for the VIP by running the ifconfig -a command. On Windows, run ipconfig /all command. You could see the current VIP bound to one of network interface.
$ srvctl config nodeapps -n <node> -a
- Stop all resources that are dependent on the VIP on that node (must be done for Oracle 10.2.0.2 upwards). First, stop the database instance, and then the ASM instance. When done, stop nodeapps.
$ srvctl stop instance -d database_name -i instance_name
$ srvctl stop nodeapps -n node_name
For 11g r2
$ srvctl stop instance -d <database_name> -n <node_name>
$ srvctl stop vip -n <node_name> -f
- Verify that the VIP is no longer running by executing the ifconfig -a agian, and confirm that its interface is no longer listed in the output. if the interface still shows as online, this is an indication that a resource which dependent on the VIP is still running. The crs_stat -t command can help to show resources that are still online.
for 11g r2
$ crsctl stat res -t
Note that the -f option is required for 11G R2
- Make any changes necessary to all nodes' /etc/hosts file and make the necessary DNS changes, to associate the new IP address with the old host name.
- Modify the VIP resource
# srvctl modify nodeapps -n <node> -A <new_vip_address or new_vip_hostname>/netmask
/[if1[if2....]]>
eg:
# srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2
Verify the change
$ srvctl config nodeapps -n <node_name> -a
$ srvctl config nodeapps -a (11G R2)
- Restarting resource
$ srvctl start instance -d <database_name> -i <instance_name>
$ srvctl start asm -n <node_name>
- Others