Oracle Interface Configuration Tool (OIFCFG) 命令参考

2018-01-25 oracle 宅必备

这节讲集群中OIFCFG工具的一些东西


1. 关于OIFCFG

OIFCFG 是Oracle用来定义和管理网络接口的工具,你可以使用OIFCFG用来:

在使用之前我们我们需要确保集群软件至少在一个节点启动

如果使用-global 参数则需要全部节点都启动

做global更改后必须重启所有成员节点

命令位置为:

Grid_home/bin/

Alt text


2. OIFCFG命令格式及参数

oifcfg iflist [-p [-n]]

oifcfg setif {-node nodename | -global} {if_name/subnet:if_name}...

oifcfg getif [-node nodename | -global] [ -if if_name[/subnet] [-type if_type]]

oifcfg delif {{-node nodename | -global} [ -if if_name[/subnet]] [-force] | -force}

oifcfg [-help]

2.1 oifcfg iflist

该命令获取节点上网卡的列表

2.2 oifcfg setif

该命令设定网卡的类型(public 或 cluster interconnec)

2.3 oifcfg getif

该命令获取通过setif命令设定的网卡的信息

2.4 oifcfg delif

该命令删除 global类型或 类型node-specific 网卡配置

可以使用-force命令强制删除所有网卡信息而无需指定具体类型的网卡


3. OIFCFG命令参数

3.1 -node nodename

我们可以通过olsnodes 命令查找节点的名称

3.2 -global

指定global类型网卡

一个网卡的可以被定义为global接口和 node-specific 接口

Oracle 目前不支持非global类型

3.3 -if if_name

指定网卡的名称

3.4 subnet

网卡子网的名称

3.5 -type if_type

type可以为public 或cluster_interconnect.

3.6 -help

显示帮助


4. OIFCFG命令举例

4.1 获取节点网卡列表

使用如何命令获取该节点所有网卡的列表

包含了网卡的类型和掩码信息

 oifcfg iflist

Alt text Alt text

4.2 获取节点网卡信息

oifcfg getif

Alt text Alt text

4.3 设置网卡信息


oifcfg setif -global eth0/172.19.141.0:cluster_interconnect

上面设置eth0网卡,子网为172.19.141.0,类型为global cluster_interconnect

4.4 删除网卡信息

如果不指定具体网卡则删除所有网卡的信息

oifcfg delif -global eth1/172.21.65.0

上面删除 global网卡 eth1的子网信息

oifcfg delif -global

上面删除所有global的网卡信息