If clients of an application access the application through a network, and the placement policy for the application allows it to fail over to another node, then you must register a virtual internet protocol address (VIP) on which the application depends. An application VIP is a cluster resource that Oracle Clusterware manages (Oracle Clusterware provides a standard VIP agent for application VIPs). You should base any new application VIPs on this VIP type to ensure that your system experiences consistent behavior among all of the VIPs that you deploy in your cluster.
While you can add a VIP in the same way that you can add any other resource that Oracle Clusterware manages, Oracle recommends using the Grid_home
/bin/appvipcfg
command-line utility to create or delete an application VIP on the default network for which the ora.net1.network
resource is created by default.
To create an application VIP, use the following syntax:
appvipcfg create -network=network_nummber -ip=ip_address -vipname=vip_name -user=user_name [-group=group_name] [-failback=0 | 1]
Note:
You can modify the VIP name while the resource remains online, without restarting the resource.
When you create an application VIP on a default network, set -network=1
.
To create an application VIP on a non-default network, you may have to first create the network using the srvctl add network
command. Then you can create the application VIP, setting -network=
non-default_network_number
.
In an Oracle Flex Cluster, you can also add a Leaf Node network resource for application VIPs, so that applications can run on Leaf Nodes using the srvctl add network
command, use the following syntax:
srvctl add network -netnum=network_number -subnet subnet/netmask[/if1[|if2|...]] -leaf
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for more information about the srvctl add network
command
Oracle Flex Clusters for more information about Leaf Nodes
To delete an application VIP, use the following syntax:
appvipcfg delete -vipname=vip_name
In the preceding syntax examples, network_number
is the number of the network, ip_address
is the IP address, vip_name
is the name of the VIP, user_name
is the name of the user who installed Oracle Database, and group_name
is the name of the group. The default value of the -failback
option is 0. If you set the option to 1, then the VIP (and therefore any resources that depend on VIP) fails back to the original node when it becomes available again.
Note:
The -ip=
ip_address
parameter is required, but if Grid Plug and Play and GNS with DHCP have been configured, the parameter always takes the IP address from the DHCP server and ignores the IP address specified in the command. The value for the -vipname=
vip_name
parameter is also ignored with DHCP.
For example, as root
, run the following command:
# Grid_home/bin/appvipcfg create -network=1 -ip=148.87.58.196 -vipname=appsVIP -user=root
The script only requires a network number, the IP address, and a name for the VIP resource, in addition to the user that owns the application VIP resource. A VIP resource is typically owned by root
because VIP related operations require root privileges.
To delete an application VIP, use the same script with the delete
option. This option accepts the VIP name as a parameter. For example:
# Grid_home/bin/appvipcfg delete -vipname=appsVIP
After you have created the application VIP using this configuration script, you can view the VIP profile using the following command:
Grid_home/bin/crsctl status res appsVIP -p
Verify and, if required, modify the following parameters using the Grid_home
/bin/crsctl modify res
command.
See Also:
Oracle Clusterware Resource Reference for detailed information about using CRSCTL commands
The appvipcfg
script requires that you specify the -network
option, even if -network=1
.
As the Oracle Database installation owner, start the VIP resource:
$ crsctl start resource appsVIP