一般情况下,RAC中public与private的子网掩码都为255.255.255.0,所以通过oifcfg setif -global进行设置时,常看到以下的形式:

oifcfg setif -global e1000g0/171.197.26.0:public

其中171.197.26.0代表一个网段,当子网掩码不为255.255.255.0的时候,这里可能就不再是设置为171.197.26.0了,具体的该设置为多少,可以通过官方文档“How to calculate the correct subnet for an interface [ID 1059759.1]”中的方法来计算。

How to calculate the correct subnet for an interface [ID 1059759.1]文档内容如下:

In this Document

Goal

Fix

Applies to:

Oracle Server - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]

Information in this document applies to any platform.

Goal

How to calculate the correct subnet to use in oifcfg, etc.

oifcfg requires you to enter the subnet used for public and cluster_interconnect networks.

However, ifconfig usually shows the IP and the netmask, but not the subnet.

This note will show how to determine the subnet to be used with oifcfg.

More generally, it also applies to the general question of determining the subnet for a given interface, given the IP address and netmask.

Fix

Suppose that the interface to be used for public network is e1000g0 with ip address 171.197.26.137 and netmask ffffffc0.

In ifconfig -a output we will see this:

e1000g0:

flags=209040843

mtu 1500 index 2

inet 171.197.26.137 netmask ffffffc0 broadcast 171.197.26.191

groupname prod

ether 0:14:4f:95:39:9a

Note that the netmask is displayed as ffffffc0 in hex. (In some platforms it is displayed in decimal rather than hex.)

This netmask ffffffc0 = ff.ff.ff.c0 = 255.255.255.192 .

In binary notation this is 11111111.11111111.11111111.11000000

Another common way you may see to represent the netmask is as a simple 2-digit number like "26", to get this number, simply add up the digits:

11111111.11111111.11111111.11000000

=> (1+1+1+1+1+1+1+1) + (1+1+1+1+1+1+1+1) + (1+1+1+1+1+1+1+1) + (1+1+0+0+0+0+0+0)

= 8+8+8+2 = 26

A fast way to find the subnet, given the network address (171.197.26.137) and the netmask (255.255.255.192), is to use an IP calculator.

Free IP calculators are available online. In this example, I used the calculator at http://jodies.de/ipcalc. Many others are available.

Plugging the address (171.197.26.137) and the netmask (255.255.255.192) into the calculator at http://jodies.de/ipcalc gives this output:

Result:

Address:  171.197. 26.137       10101011.11000101.00011010.10 001001

Netmask:  255.255.255.192 = 26  11111111.11111111.11111111.11 000000

Wildcard:   0.  0.  0. 63       00000000.00000000.00000000.00 111111

=>

Network:  171.197. 26.128/26    10101011.11000101.00011010.10 000000 (Class B)

Broadcast:171.197. 26.191       10101011.11000101.00011010.10 111111

HostMin:  171.197. 26.129       10101011.11000101.00011010.10 000001

HostMax:  171.197. 26.190       10101011.11000101.00011010.10 111110

Hosts/Net: 62

=> note how that gives the network 171.197.26.128/26

Ignore the /26 in this output, the "subnet" needed for oifcfg is 171.197.26.128.

Another way to get this information is to do a bit-AND on each bit of the address and netmask:

171.197. 26.137 => 10101011.11000101.00011010.10 001001

255.255.255.192 => 11111111.11111111.11111111.11 000000

& ------------------------------------

10101011.11000101.00011010.10 000000 => 171.197.26.128

Yet another way to get this information is from oifcfg itself.

The command oifcfg iflist shows the interface name and subnet for each interface:

$ ./oifcfg iflist

e1000g0 171.197.26.128

e1000g2 171.197.26.128

e1000g3 10.241.6.0

So now you see where that 128 is coming from in oifcfg iflist. For each interface, oifcfg iflist shows the subnet for that interface.

So to enter this into oifcfg as the public network, you would use this syntax:

oifcfg setif -global e1000g0/171.197.26.128:public

oracle 掩码,oracle RAC 修改子网掩码如何计算subnet相关推荐

  1. Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)方法

    Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)方法 场景:Oracle 12.2 RAC修改IP ...

  2. Oracle之 11gR2 RAC 修改监听器端口号的步骤

    Oracle 11gR2 RAC 修改监听器端口号的步骤 说明: 192.168.188.181 为public ip1 192.168.188.182 为public ip2 192.168.188 ...

  3. Oracle 11g RAC 修改IP

    Oracle 11g RAC 修改IP 在RAC环境下修改ip地址,会造成数据库停机,所以在搭建.配置RAC前,必须做好ip规划,而主机名是不允许修改的,如果修改必须重新安装CRS. 系统环境: 操作 ...

  4. oracle服务器修改机器名,Oracle 11g R2 RAC环境下修改主机名

    Oracle 10g RAC修改主机名可参考:http://www.linuxidc.com/Linux/2013-01/78628.htm 相关平台:aix 6106+oracle 11203修改主 ...

  5. Oracle RAC 修改 IP 地址

    RAC 修改IP 这个操作本身也只有几步操作, 但是它涉及到OCR. 所以要格外小心.一般来说,如果不是必须要修改的话,尽量不要去修改OCR 的东西. 稳定第一. 在做之前,要手动的OCR 进行一个备 ...

  6. oracle 10g rac 修改sga_target不生效,Oracle Rac 修改SGA_TARGET值无变化

    Oracle Rac 修改SGA_TARGET值无变化 发布时间:2020-08-13 23:02:13 来源:ITPUB博客 阅读:93 作者:dmcatding 系统: Red Hat Enter ...

  7. Oracle 11g RAC 修改服务器各类ip地址【转载】

    此文转载自"架构君" ,地址:https://javajgs.com/archives/72358 此文说明较为详细,所以留作参考,详细内容如下. Oracle 11g RAC 修 ...

  8. oracle单节点加入rac,实验:Oracle单节点RAC添加节点

    环境:RHEL 6.5 + Oracle 11.2.0.4 单节点RAC 需求:单节点RAC添加新节点 1.添加节点前的准备工作 参考Oracle官方文档: Oracle® Clusterware A ...

  9. Oracle 11G R2 RAC中的scan ip 的用途和基本原理【转】

    Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个 ...

最新文章

  1. 突发流量引发的Dubbo拥堵,该怎么办?
  2. 线程: ReentrantLock类
  3. 机器学习中的逻辑回归
  4. java 工具类sort_Java 通用排序工具类ListSortUtils
  5. 两大流量“黑洞”联姻了:让你在支付宝上刷微博,在微博上用支付宝买单
  6. SpringCloud学习笔记018---SpringBoot前后端分离_集成_SpringSecurity_简单实现
  7. oracle 查看 统计更新时间,oracle查看和更新统计表的信息
  8. 学习python的好处
  9. antd-vue中的form表单label标签for导致点击文字触发输入框解决方案
  10. React Native For Android 架构初探
  11. Coin3D三维可视化教程3
  12. 一种计算机显卡保护装置,一种计算机显卡辅助支撑装置制造方法及图纸
  13. 计算机桌面字体咋调整,如何调整电脑桌面字体的大小
  14. linux命令整理(三)
  15. Unity中下载图片、音频和视频
  16. 免费ftp上传工具,三款免费的ftp上传工具
  17. 教你用Python感受量子霸权
  18. 乐事薯片:价格涨了,质量降了,年轻人的快乐没有了
  19. 【干货】2019年最新高级前端视频教程,速度收藏!!
  20. VS2017错误:未将对象引用设置到对象的实例

热门文章

  1. qt跨平台Linux到windows,Qt实现软件从Windows到Linux跨平台
  2. word输入时自动会删除后面的内容
  3. 智能ERP 交接班统计异常的解决方法
  4. Unyielding
  5. JDK19 版本的重要特性
  6. jquery 监听元素滚动_jQuery在滚动时保持元素在视图中
  7. 用C语言实现“7-8 超速判断”,基础编程由此开始(第八节)
  8. 天涯明月刀自动演奏器,弹琴脚本,易语言开发,实现键盘映射
  9. 线性栈实现中缀表达式计算器
  10. hb100 微波雷达arduino_HB100微波模块SOP.PDF