DBA Sensation

February 2, 2009

Change IP address for oracle RAC public and VIP interfaces

Filed under: [RAC] — Tags: — zhefeng @ 4:33 pm

My company is doing massive re-ip project. So our Oracle RAC ip address has to be changed as well. Fortunately, we don’t need to change hostname, otherwise the story will be more complicated.

1. Current Environment
1). Machine IP:
Node1: vmrac01
Node2: vmrac02

## eth1-Public
10.50.96.101 vmrac01 vmrac01.test.com
10.50.96.102 vmrac02 vmrac02.test.com
## eth0-Private
192.168.199.1 vmracprv01 vmracprv01.test.com
192.168.199.2 vmracprv02 vmracprv02.test.com
## VIP
10.50.96.103 vmracvip01 vmracvip01.test.com
10.50.96.104 vmracvip02 vmracvip02.test.com

2). cluster information:
cluster name — vm10cls
database name — v10c
Instance 1 — v10c1
Instance 2 — v10c2
Node1 — vmrac01
Node2 — vmrac02

2. New IP changing map(different subnet mask too):
10.50.96.101/255.255.255.0 vmrac01 –> 10.50.99.41/255.255.252.0
10.50.96.102/255.255.255.0 vmrac02 –> 10.50.99.42/255.255.252.0
10.50.96.103/255.255.255.0 vmracvip01 –> 10.50.99.43/255.255.252.0
10.50.96.104/255.255.255.0 vmracvip02 –> 10.50.99.44/255.255.252.0

3. steps 1 — change RAC IP settings
1). bring service down, make sure everything was offline except css daemon
bash-3.1$ srvctl stop database -d v10c
bash-3.1$ srvctl stop nodeapps -n vmrac01
bash-3.1$ srvctl stop nodeapps -n vmrac02
bash-3.1$ crs_stat -t
Name Type Target State Host
————————————————————
ora.v10c.db application OFFLINE OFFLINE
ora….c1.inst application OFFLINE OFFLINE
ora….c2.inst application OFFLINE OFFLINE
ora….SM1.asm application OFFLINE OFFLINE
ora….01.lsnr application OFFLINE OFFLINE
ora….c01.gsd application OFFLINE OFFLINE
ora….c01.ons application OFFLINE OFFLINE
ora….c01.vip application OFFLINE OFFLINE
ora….SM2.asm application OFFLINE OFFLINE
ora….02.lsnr application OFFLINE OFFLINE
ora….c02.gsd application OFFLINE OFFLINE
ora….c02.ons application OFFLINE OFFLINE
ora….c02.vip application OFFLINE OFFLINE

2). backup OCR and Voting disks
bash-3.1$ ocrcheck|grep -i file
Device/File Name : /dev/raw/raw1
bash-3.1$ crsctl query css votedisk
0. 0 /dev/raw/raw2
located 1 votedisk(s).

#dd if=/dev/raw/raw1 of=/database/temp/ocr_vote_bk/ocr.bak
#dd if=/dev/raw/raw2 of=/database/temp/ocr_vote_bk/vote.bak

3). get current config:
bash-3.1$ oifcfg getif
eth0 10.50.96.0 global public –current network for public
eth1 192.168.199.0 global cluster_interconnect –we are not going to change this

4). delete current public ip:
bash-3.1$ oifcfg delif -global eth0

5). change to new network:
bash-3.1$ oifcfg setif -global eth0/10.50.99.0:public

6). change vip address:
a. check current one
bash-3.1$ srvctl config nodeapps -n vmrac01 -a
VIP exists.: /vmracvip01/10.50.96.103/255.255.255.0/eth0
bash-3.1$ srvctl config nodeapps -n vmrac02 -a
VIP exists.: /vmracvip02/10.50.96.104/255.255.255.0/eth0
b. Modify VIP component (has to be the css owner, “root” usually)
#srvctl modify nodeapps -n vmrac01 -A 10.50.99.43/255.255.252.0/eth0
#srvctl modify nodeapps -n vmrac02 -A 10.50.99.44/255.255.252.0/eth0
c. double verify the changes
bash-3.1$ srvctl config nodeapps -n vmrac01 -a
VIP exists.: /vmracvip01/10.50.99.43/255.255.252.0/eth0
bash-3.1$ srvctl config nodeapps -n vmrac02 -a
VIP exists.: /vmracvip02/10.50.99.44/255.255.252.0/eth0

7). change the hosts file(on both nodes):
## eth1-Public
10.50.99.41 vmrac01 vmrac01.test.com
10.50.99.42 vmrac02 vmrac02.test.com
## eth0-Private
192.168.199.1 vmracprv01 vmracprv01.test.com
192.168.199.2 vmracprv02 vmracprv02.test.com
## VIP
10.50.99.43 vmracvip01 vmracvip01.test.com
10.50.99.44 vmracvip02 vmracvip02.test.com

8). if the listener is using any IP address, it also needs to be changed.

4. Steps 2 — change OS IP settings
1). change IP
[root@vmrac01]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.50.99.41
NETMASK=255.255.252.0
HWADDR=00:50:56:BD:05:14
ONBOOT=yes

[root@vmrac02]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.50.99.42
NETMASK=255.255.252.0
HWADDR=00:50:56:BD:3E:08
ONBOOT=yes

2). change the default gateway on both nodes (if needed, here since they are in same vlan so i didn’t change them)
[root@vmrac01 ~]# cat /etc/sysconfig/network
NETWORKING_IPV6=yes
HOSTNAME=vmrac01
NETWORKING=yes
NISDOMAIN=nis
GATEWAY=10.50.96.1 <– here is the default gateway to be changed

3) Change the IP Address’es on the known_hosts ssh config files for oracle user
$ su – oracle
$ cd .ssh
$ cp known_hosts known_hosts.bak
$ modify the old IP’s to the new IP’s

4). restart network (on both node)
#service network restart

5). restart crs daemon (on both node)
#crsctl stop crs
#crsctl start crs

5. Step3 — verify everything

reference:
1. "How to Change Interconnect/Public Interface IP or Subnet in Oracle Clusterware", Doc ID: 283684.1
2. "Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node", DOC ID: 276434.1
3. "How to change Public and VIP component address in case of RAC?" http://orcl-experts.info/index.php?name=FAQ&id_cat=9

Advertisements

23 Comments »

  1. I have been studying oracle and this article is very useful to me.

    Comment by change ip — July 8, 2009 @ 5:50 am

  2. Hi
    Your notes “how to change public and vip interfaces” was very much helpful to solve my problem in one of my Oracle RAC on HP-Unix

    Thanks & Regards
    Ramanan M

    Comment by Ramanan M — July 9, 2009 @ 11:27 pm

  3. Many Many Thanks ! It saved me from lot of stress and not sure without this doc, how I had managed to change IP’s.

    Wonderful doc and very very helpful.

    God Bless you, buddy

    Comment by ORA_DBA — February 4, 2010 @ 9:54 pm

  4. excellant notes. Thanks a lot I am studying RAC and I was just curious about this scenario and just googled it and found your steps. I am now a little more confident about ipchanges just in case.

    Comment by vinay — February 26, 2010 @ 1:02 pm

  5. good tutorial… keep it up ..

    thanks

    Comment by Prasann Acharya — December 2, 2010 @ 5:24 am

  6. Great ! Its very Helpfull…

    Comment by Gagan Deep Wasan — May 23, 2011 @ 11:35 pm

  7. Hi,

    This was my exam question, still not sure about the answer.
    Any help is much appreciated

    You have a four node cluster with four node VIPS and three scan VIPS already in use after Grid infrastructure installation
    You plan to manage a customer-developed, web based application with the Oracle Grid Infrastructure to provide high availability.
    Which two statements are true about the vip application resource that must be created ?

    a-)The vip application must be active on the same subnet and ethernet adaptor as the interconnect
    b-)The vip application must be active on the same subnet and ethernet adaptor as the public ip address
    c-)The vip application must not be online on the same node as any of the scan vips.
    d-)The vip application must be active on a different node than the application depending on Che
    by using the dispersion start dependecy in the resource definition
    e-) The vip application must be enabled to run as the root user

    Comment by john — November 16, 2011 @ 6:44 pm

  8. After days of trial and error this article helped me to solve my problems immediately. I hope it’s okay that I bloged the similar content for my german audience as well (see http://streetkiter.wordpress.com/2011/11/23/andern-der-ip-adressen-in-einem-rac-cluster-unter-oracle-11g-release-2-11-2-0-3/)

    Thanks

    Johannes

    Comment by streetkiter — November 23, 2011 @ 4:29 am

  9. Wow, this piece of writing is nice, my sister is analyzing these things,
    thus I am going to tell her.

    Comment by Candy Crush Saga — August 26, 2013 @ 1:52 am

  10. Wow, this article is fastidious, my sister is analyzing such things,
    therefore I am going to inform her.

    Comment by Fun run multiplayer race hack — August 30, 2013 @ 9:24 am

  11. I’m not sure where you’re getting your info, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for magnificent information I was looking for this
    info for my mission.

    Comment by Simpsons Tapped Out Hack — September 28, 2013 @ 4:53 pm

  12. Well explained and very useful post. Thanks for sharing.

    Comment by Manash B. — October 9, 2013 @ 6:35 pm

  13. It’s just one of the earliest and most from depth simulation online games every
    released, makes it possible for you to set up and manage a complete city from this particular ground up.
    Probably the most demanding iphone software are iphone games.

    Comment by web page — January 7, 2014 @ 5:57 pm

  14. When it will come to figuring out all the ins and outs of a video match|specially the ones on your phone|you could spend hundreds of hrs on conclude making an attempt to defeat it this is why Candy Crush Saga Dwell Tool three.8.five was created!
    For you gamers to take gain of all the specific characteristic this device offers.

    Not only you will rewards from all these features but
    you will also aid oneself conquer each and every level the frustrated you for a
    although. No a lot more waiting around hours to get daily life
    or have a restricted amount of boosters. Now everything
    you wish has been provided in this resource and suitable
    with Facebook|Apple Gadgets (Ipod|Ipad|Iphones) and Android telephones also.

    Comment by candy crush saga keygen — January 13, 2014 @ 6:17 pm

  15. Or, those who are trying to sell their homes may need help with home staging, a service most interior decorators offer.
    She has successfully managed hundreds of company and product launches and public relations campaigns,
    beginning with the first digital network launch, the first commercial wireless phone and the
    first wireless data applications. This one is not so important,
    just reinforces to the search engines about what your
    page content is based on.

    Comment by sound beach marketing partners — August 20, 2014 @ 7:39 pm

  16. We are a bunch of volunteers and opening a new scheme in our community.
    Your web site offered us with valuable info to work on. You have performed an impressive job and our whole community
    can be thankful to you.

    Comment by http://urodakobiety2.Wordpress.com/ — August 23, 2014 @ 11:02 pm

  17. publicize

    Change IP address for oracle RAC public and VIP interfaces | DBA Sensation

    Trackback by publicize — September 6, 2014 @ 3:33 am

  18. I know this if off topic but I’m looking into starting my own weblog and was curious what
    all is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% sure. Any tips or advice would be greatly appreciated.
    Kudos

    Comment by http://eloyhfwg.wordpress.com — September 12, 2014 @ 2:30 pm

  19. These boxes are specially designed for shipping
    clothes, framed artwork and perilous materials. Numbers of professional packers and movers of Delhi also provide
    reliable and completely safe international shifting services.
    Professional removal agencies of Noida address this problem.
    For this reason many people make an effort to be brokers of freight companies.
    It’s tough for a property that has a cultural or time style that peaked 30 to
    40 years earlier to be competitive with its contemporaries.
    Once you hold this handset, you can feel you are touching
    elegance at the palm of your hands. Internet speed at Symphony is many times your present speed and also you can download and upload your video easily.
    They have taken up the steps to make the clients outsource to them.
    Other than working with all these made to order lanyards with regards to marketing,
    they can be made use of by lots of providers so that you can discern its team people.
    Time zones, office locations, will no longer be a
    deciding factor in the claims handling process.

    Comment by storage cable companies in queens ny — September 20, 2014 @ 1:29 am

  20. I love your blog.. very nice colors & theme.

    Didd you create this website yourseelf or did you hire someone to do it forr you?
    Plz answer back as I’m looking to design my own blog andd would like too know where u ggot this from.
    thanks a lot

    Comment by Selena Gomez Porn — September 20, 2014 @ 6:23 pm

  21. […] Change IP address for oracle RAC public and VIP interfaces […]

    Pingback by 오라클 이중화 자료모음 | IOTis — March 8, 2016 @ 8:01 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: