Below mentioned is a summarized procedure which explains how to modify or change the Oracle Real Application Cluster public IP , virtual IP and scan IP in separate sections.
In the procedure mentioned , user tries to change the IP network details from 10.10.20* series to 10.0.1.*
Verify the existing Existing IP range in /etc/hosts file:
===============================================================
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.10.20.57 db1.test.com db1
10.10.20.58 db2.test.com db2
192.168.70.57 db1-priv.test.com db1-priv
192.168.70.58 db2-priv.test.com db2-priv
10.10.20.59 db1-vip.test.com db1-vip
10.10.20.60 db2-vip.test.com db2-vip
10.10.20.61 db-scan.test.com db-scan
Edit the New IP range in /etc/hosts file:
===================================================================
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 lab57 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.0.1.122 db1.test.com db1
10.0.1.123 db2.test.com db2
192.168.70.57 db1-priv.test.com db1-priv
192.168.70.58 db2-priv.test.com db2-priv
10.0.1.124 db1-vip.test.com db1-vip
10.0.1.125 db2-vip.test.com db2-vip
10.0.1.126 db-scan.test.com db-scan
Note: Modify the network interfaces on server with the required IP.
=======================================================================================================================
a) Stop database instances before executing the steps using the command
srvctl stop database -d testdb
b) Verify DB instances are stopped using command.
srvctl status database -d testdb
========================================================================
Change Public IP:
===================
a) Login as grid user . Collect the existing IP details using oifcfg command.
[root@db1 ~]# cd /opt/grid/11.2.0/grid/bin/
[root@db1 bin]# ./oifcfg getif
eth0 10.10.20.0 global public
eth1 192.168.70.0 global cluster_interconnect
b) Delete the existingpublic IP interface details.
[root@db1 bin]# ./oifcfg delif -global eth0
[root@db1 bin]# ./oifcfg getif
eth1 192.168.70.0 global cluster_interconnect
c) Set the new public IP interface details. (/etc/hosts to be edited with required IP before this)
[root@db1 bin]# ./oifcfg setif -global eth0/10.0.1.0:public
[root@db1 bin]# ./oifcfg getif
eth1 192.168.70.0 global cluster_interconnect
eth0 10.0.1.0 global public
Check the status from DB2:
[root@db2 bin]# ./oifcfg getif
eth1 192.168.70.0 global cluster_interconnect
eth0 10.0.1.0 global public
========================================================================
VIP change:
============
a) Login as grid user. Collect the existing IP details using srvctl.
[root@db1 bin]# srvctl config nodeapps -a
Network exists: 1/10.10.20.0/255.255.255.0/eth0, type static
VIP exists: /db1-vip/10.10.20.59/10.10.20.0/255.255.255.0/eth0, hosting node db1
VIP exists: /db2-vip/10.10.20.60/10.10.20.0/255.255.255.0/eth0, hosting node db2
[root@db1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE db1
ora....ER.lsnr ora....er.type ONLINE ONLINE db1
ora....N1.lsnr ora....er.type ONLINE ONLINE db2
ora.asm ora.asm.type ONLINE ONLINE db1
ora.testdb.db ora....se.type OFFLINE OFFLINE
ora.cvu ora.cvu.type OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE db1
ora....B1.lsnr application ONLINE ONLINE db1
ora.db1.gsd application OFFLINE OFFLINE
ora.db1.ons application ONLINE ONLINE db1
ora.db1.vip ora....t1.type ONLINE ONLINE db1
ora....SM2.asm application ONLINE ONLINE db2
ora....B2.lsnr application ONLINE ONLINE db2
ora.db2.gsd application OFFLINE OFFLINE
ora.db2.ons application ONLINE ONLINE db2
ora.db2.vip ora....t1.type ONLINE ONLINE db2
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE db1
ora.oc4j ora.oc4j.type ONLINE ONLINE db1
ora.ons ora.ons.type ONLINE ONLINE db1
ora....ry.acfs ora....fs.type ONLINE ONLINE db1
ora.scan1.vip ora....ip.type ONLINE ONLINE db2
b) Stop VIP resource.
[root@db1 bin]# srvctl stop vip -n db1 -f
[root@db1 bin]# srvctl stop vip -n db2 -f
[root@db1 bin]# ./crs_stat -t |grep vip
ora.db1.vip ora....t1.type OFFLINE OFFLINE
ora.db2.vip ora....t1.type OFFLINE OFFLINE
ora.scan1.vip ora....ip.type ONLINE ONLINE db2
c) Modify the VIP. (/etc/hosts to be edited with required IP before this)
[root@db1 bin]# srvctl modify nodeapps -n db1 -A db1-vip.test.com/255.255.255.0/eth0
[root@db1 bin]# srvctl modify nodeapps -n db2 -A db2-vip.test.com/255.255.255.0/eth0
d) Start VIP resource.
[root@db1 bin]# srvctl start nodeapps -n db1
PRKO-2421 : Network resource is already started on node(s): db1
PRKO-2422 : ONS is already started on node(s): db1
[root@db1 bin]# srvctl start nodeapps -n db2
PRKO-2421 : Network resource is already started on node(s): db2
PRKO-2422 : ONS is already started on node(s): db2
[root@db1 bin]# ./crs_stat -t |grep vip
ora.db1.vip ora....t1.type ONLINE ONLINE db1
ora.db2.vip ora....t1.type ONLINE ONLINE db2
ora.scan1.vip ora....ip.type ONLINE ONLINE db2
========================================================================
SCAN IP:
==========
Login as grid user.
a) Verify the existing configuration.
[root@db1 bin]# srvctl config scan
SCAN name: db-scan, Network: 1/10.0.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /10.10.20.61/10.10.20.61
b) Stop SCAN services.
[root@db1 bin]# srvctl stop scan_listener
[root@db1 bin]# srvctl stop scan
[root@db1 bin]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
[root@db1 bin]# srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
c) Modify the SCAN IP. (/etc/hosts to be edited with required IP before this)
[root@db1 bin]# srvctl modify scan -n db-scan.test.com
[root@db1 bin]# srvctl config scan
SCAN name: db-scan.test.com, Network: 1/10.0.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /db-scan.test.com/10.0.1.126
d) Start SCAN services.
[root@db1 bin]# srvctl start scan
[root@db1 bin]# srvctl start scan_listener
[root@db1 bin]# srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node db2
[root@db1 bin]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node db2
========================================================================
Hope this helps to some oracle RAC enthusiasts.