Using ifcfg
Defining Network Interfaces with OIFCFG
A network interface is uniquely identified using these three components:
* An interface name
* An interface subnet address
* An interface type
The interface type is based on the purpose for which the network interface is configured. The OIFCFG supported interface types are:
* Public—Any interface that is used for communication with components external to RAC instances, such as Oracle Net and Virtual Internet Protocol (VIP) addresses
* Cluster interconnect—A private interface used for the cluster interconnect to provide inter-instance or Cache Fusion communication
* Storage—Usually a disk interface used for high-speed file I/O
Network interfaces are stored as one of two possible types:
* global interface
* node-specific interface
An interface should be stored as a global interface when all the nodes of a specific RAC cluster have the same interface connected to the same subnet. An interface is stored as a node-specific interface when any of the nodes in the cluster utilize a different set of interfaces and subnets. If an interface is configured as both a global and a node-specific interface by mistake or design, it will default to the node-specific definition.
A network interface specification is in the form of:
<interface_name>/<subnet>:<interface_type>.
For example, the following identifies eth0 as a cluster interconnect located at the address 1.1.1.1:
eth0/1.1.1.1:cluster_interconnect
OIFCFG Syntax and Commands
As with many of the other Oracle command line tools, use the oifcfg -help command to display online help for OIFCFG. For example:
<add output>
The elements of OIFCFG commands, some of which are optional, are:
* nodename is the name of the host, as known to the network
* if_name is the name by which the interface is known in the node in which it resides
* subnet is the subnet address of the interface, usually its IP address
* if_type is the type of interface: one of the values of: public, cluster_interconnect, or storage
Use the iflist option with the OIFCFG utility to list the interface names and the subnets of all the interfaces available on the local node, for example:
oifcfg iflist
eth0 1.1.1.1
eth0 1.1.1.2
Use the getif option to retrieve specific OIFCFG information:
oifcfg getif [ [-global | -node <nodename>] [-if <if_name>[/<subnet>]] [-type <if_type>] ]
Use the setif keyword to store a new interface. For example, to store the interface hme0, with the subnet 187.188.130.0, as a global interface to be used as an interconnect for all the RAC instances in the cluster, use the command:
oifcfg setif -global hme0/187.188.130.0:cluster_interconnect
For a cluster interconnect that exists between only two nodes, for example aultlinux1 and aultlinux2, the eth1 interface could be created with the following commands, assuming 1.1.1.1 and 1.1.1.2 are the subnet addresses for the interconnect on aultlinux1 and aultlinux2:
oifcfg setif -node aultlinux1 eth1/1.1.1.1:cluster_interconnect
oifcfg setif -node aultlinux2 eth1/1.1.1.2:cluster_interconnect
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 the global and node-specific interfaces on all the nodes in the cluster, so be careful with this command. For example, the following command deletes the global interface named gif1 for the subnet 207.122.63.66:
oifcfg delif -global gif1/207.122.63.66
On the other hand, the next command deletes all the global interfaces stored with the OIFCFG utility:
oifcfg delif -global
The next section is an examination of the cluster registry and its management in Oracle Database 10g.
Recent Comments