Sunday, November 17, 2013

OIFCFG COMMANDS 11GR2

The Oracle Interface Configuration Tool (oifcfg) is used define and administer network interfaces such as the public andprivate interfaces.
The usage of oifcfg command is
  1. Allocate/ Deallocate network interfaces to components
  2. Direct components to use specific network interfaces
  3. Display information of component network configuration 
The following table lists the different oifcfg commands and their purpose:
Oifcfg commandDescription
Iflist [-p [-n]]Displays the interfaces available to the cluster on the node that the oifcfgcommand was executed on. The –p parameter displays the type of interface which can be PRIVATE, PUBLIC or UNKNOWN.
SetifAssigns the interface type (PUBLIC or PRIVATE) to a given interface.
GetifDisplays the interfaces that have been allocated to the cluster, along with the type of interface (public, cluster_interconnect)
DelifThis command is used to remove a stored network configuration.

The following lists the parameters can be used with the oifcfg command:
Parameter_nameDescription
-node node_nameThis parameter defines the node that the command should be executed on. Valid with the setif, getif, and the delif commands
-globalIndicates that the interface should be stored as a global interface for the entire cluster. Used with the setif, getif and delif commands.
-if interface_nameThis 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 beeth0/192.168.1.101:cluster_interconnect.
SubnetThis is the subnet number for the interface. Used with setif, getif and delifcommands.
-type interface_typeThis is the type of interface. Valid entries are public or cluster_interconnect. Used with the getif and setif commands.
-helpPrint 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.0
Example 2   
Retrieving Network Information
You 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 getif
This 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_interconnect
Example 3   
Storing a New Global Interface
To 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_interconnect
For a cluster interconnect that exists between only two nodes, for example rac1 and rac2, you could create the cms0interface with the following commands, assuming 139.185.142.0 is the subnet number for the interconnect on rac1 andrac2, respectively:
oifcfg setif -global cms0/139.185.142.0:cluster_interconnect
Example 4   
Deleting the Stored Interface
Use 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.0
The following command deletes all of the global interfaces assigned with OIFCFG:
oifcfg delif -global

No comments:

Post a Comment