The usage of oifcfg command is
- Allocate/ Deallocate network interfaces to components
- Direct components to use specific network interfaces
- Display information of component network configuration
Oifcfg command |
Description |
Iflist [-p [-n]] |
Displays the interfaces available to the cluster on the node
that the oifcfg command was executed on. The –p
parameter displays the type of interface which can be PRIVATE,
PUBLIC or UNKNOWN. |
Setif |
Assigns the interface type (PUBLIC or PRIVATE) to a
given interface. |
Getif |
Displays the interfaces that have been allocated to the
cluster, along with the type of interface (public,
cluster_interconnect) |
Delif |
This command is used to remove a stored network
configuration. |
The following lists the parameters can be used with the oifcfg command:
Parameter_name |
Description |
-node node_name |
This parameter defines the node that the command should be
executed on. Valid with the setif, getif, and the
delif commands |
-global |
Indicates that the interface should be stored as a global
interface for the entire cluster. Used with the setif,
getif and delif commands. |
-if interface_name |
This is the name of the interface on the system. Used with the
getif, setif and delif commands. The interface
name takes the form: interface_name/subnet:interface_type.
An example might be
eth0/192.168.1.101:cluster_interconnect. |
Subnet |
This is the subnet number for the interface. Used with setif,
getif and delif commands. |
-type interface_type |
This is the type of interface. Valid entries are public or
cluster_interconnect. Used with the getif
and setif commands. |
-help |
Print the help information. |
Examples of Using the Oicfg Command
Example 1
Listing the Names of Network Interfaces
You can use OIFCFG to list the interface names and the subnets of all of the interfaces available on the local node by executing the
iflist
keyword, as shown in this
example:oifcfg iflist hme0 139.185.141.0 qfe0 204.152.65.0You can also retrieve specific OIFCFG information with a
getif
command.oifcfg getif [ [-global | -node nodename] [-if if_name[/subnet]] [-type if_type] ]For example, after you install Oracle Clusterware, you can verify that the public and cluster interconnect have been set to the desired values by entering the following commands as
root
:$ oifcfg getifThis command should return values for global public and global cluster_interconnect. For example:
en0 144.25.68.0 global public hme0 139.185.141.0 global cluster_interconnectTo store a new interface, use the
setif
keyword. For example, to store the interface hme0
,
with the subnet 139.185.141.0, as a global interface (to be used as
an interconnect for all of the Oracle RAC instances in your cluster),
you would use the command:oifcfg setif -global hme0/139.185.141.0:cluster_interconnectFor a cluster interconnect that exists between only two nodes, for example
rac1
and rac2
,
you could create the cms0
interface with
the following commands, assuming 139.185.142.0 is the subnet number
for the interconnect on rac1
and rac2
,
respectively:oifcfg setif -global cms0/139.185.142.0:cluster_interconnectUse the OIFCFG
delif
command to delete
the stored configuration for global or node-specific interfaces. A
specific node-specific or global interface can be deleted by
supplying the interface name, with an optional subnet, on the command
line. Without the -node
or -global
options, the delif
keyword deletes
either the given interface or all of the global and node-specific
interfaces on all of the nodes in the cluster.For example, the following command deletes the global interface named
qfe0
for the subnet 204.152.65.0:oifcfg delif -global qfe0/204.152.65.0The following command deletes all of the global interfaces assigned with OIFCFG:
oifcfg delif -global