Sie sind auf Seite 1von 5

How to change Public VIP Address in 11gR2 RAC

Public VIP Address: An interface that can be used for communication with compone
nts external to Oracle RAC instances, such as Oracle Net and Virtual Internet Pr
otocol (VIP) addresses.
We can change VIP with any outage. We will change it node by node.
Step 1: Check which service is running on current which VIP , we want to change
[oracle@test1 ~]$ srvctl status service -s <database>
[oracle@test1 ~]$ srvctl status service -d orcl
Service dev is running on instance(s) orcl1
Service taxi is running on instance(s) orcl1
Service web is running on instance(s) orcl1
Step 2: Stop these services
[oracle@test1 ~]$ srvctl stop service -d <DB_NAME> -s <Service_name1,Service_nam
e2> -n <hostname>
[oracle@test1 ~]$ srvctl stop service -d orcl -s dev,taxi,web -n test1
Step 3: Find VIP address:
[oracle@test1 ~]$ srvctl config vip -n <host_name>
[oracle@test1 ~]$ srvctl config vip -n test1
VIP exists: /test1-vip/192.168.1.106/192.168.1.0/255.255.255.0/eth0, hosting nod
e test1
Step 4: Stop VIP of current node
[oracle@test1 ~]$ srvctl stop vip -n <host_name>
[oracle@test1 ~]$ srvctl stop vip -n test1
PRCR-1014 : Failed to stop resource ora.test1.vip
PRCR-1065 : Failed to stop resource ora.test1.vip
CRS-2529: Unable to act on ora.test1.vip because that would require stopping or re
locating ora.LISTENER.lsnr , but the force option was not specified.
CRS-2529: There is some dependent services on VIP of this node.
Stop VIP forcefully on this node.
[oracle@test1 ~]$ srvctl stop vip -n test1 -f
(-f :: forcefully)
Step 5: Verify VIP is down:
[oracle@test1 ~]$
[oracle@test1 ~]$ /sbin/ifconfig -a | egrep (eth0|Mask)
eth0
Link encap:Ethernet HWaddr 00:0C:29:39:72:AD
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
inet addr:172.16.0.10 Bcast:172.16.255.255 Mask:255.255.0.0
inet addr:169.254.250.202 Bcast:169.254.255.255 Mask:255.255.0.0
inet addr:127.0.0.1 Mask:255.0.0.0
Step 6: Modify VIP
[oracle@test1 ~]$ srvctl modify nodeapps -n test1 -A 192.168.1.115/255.255.255.0
/eth0
Step 7: Make changes into /etc/hosts file on all nodes and domain name server,
New IP address with their respective host name.
Step 8: Start VIP

[oracle@test1 ~]$ srvctl start vip -n test1


Step 8: Verify VIP
[oracle@test1 ~]$ /sbin/ifconfig -a | egrep (eth0|Mask)
eth0
Link encap:Ethernet HWaddr 00:0C:29:39:72:AD
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
eth0:1
Link encap:Ethernet HWaddr 00:0C:29:39:72:AD
inet addr:192.168.1.115 Bcast:192.168.1.255 Mask:255.255.255.0
inet addr:172.16.0.10 Bcast:172.16.255.255 Mask:255.255.0.0
inet addr:169.254.250.202 Bcast:169.254.255.255 Mask:255.255.0.0
inet addr:127.0.0.1 Mask:255.0.0.0
Step 9: Start dependent services
[oracle@test1 ~]$ srvctl start service -d orcl -s dev,taxi,web
Check services status
[oracle@test1 ~]$ srvctl status service -d orcl -s dev,taxi,web
Service dev is running on instance(s) orcl1
Service taxi is running on instance(s) orcl1
Service web is running on instance(s) orcl1
Step 10: Repeat step-1 to step-9 on the other nodes.
Step 11: Verify Node connectivity between all nodes:
[oracle@test1 ~]$ cluvfy comp nodecon -n all -verbose
Verifying node connectivity
Checking node connectivity
Checking hosts config file
Node Name
Status
Comment
test2
passed
test1
passed
Verification of the hosts config file successful
Interface information for node test2?
Name IP Address
Subnet
Gateway
s
MTU

Def. Gateway

HW Addres

eth0 192.168.1.107 192.168.1.0


39:72:AD 1500
eth0 192.168.1.116 192.168.1.0
39:72:AD 1500
eth1 172.16.0.11
172.16.0.0
39:72:B7 1500
eth1 169.254.250.202 169.254.0.0
39:72:B7 1500
Interface information for node test1?
Name IP Address
Subnet
s
MTU

0.0.0.0

192.168.1.1

00:0C:29:

0.0.0.0

192.168.1.1

00:0C:29:

0.0.0.0

192.168.1.1

00:0C:29:

0.0.0.0

192.168.1.1

00:0C:29:

Gateway

Def. Gateway

HW Addres

eth0 192.168.1.105
F9:B9:1C 1500
eth0 192.168.1.109
F9:B9:1C 1500
eth0 192.168.1.115
F9:B9:1C 1500
eth1 172.16.0.10
F9:B9:26 1500
eth1 169.254.41.177
F9:B9:26 1500

192.168.1.0

0.0.0.0

192.168.1.1

00:0C:29:

192.168.1.0

0.0.0.0

192.168.1.1

00:0C:29:

192.168.1.0

0.0.0.0

192.168.1.1

00:0C:29:

172.16.0.0

0.0.0.0

192.168.1.1

00:0C:29:

169.254.0.0

0.0.0.0

192.168.1.1

00:0C:29:

Check: Node connectivity of subnet 192.168.1.0


Source
Destination
Connected?
test2[192.168.1.107]
test2[192.168.1.116]
yes
test2[192.168.1.107]
test1[192.168.1.105]
yes
test2[192.168.1.107]
test1[192.168.1.109]
yes
test2[192.168.1.107]
test1[192.168.1.115]
yes
test2[192.168.1.116]
test1[192.168.1.105]
yes
test2[192.168.1.116]
test1[192.168.1.109]
yes
test2[192.168.1.116]
test1[192.168.1.115]
yes
test1[192.168.1.105]
test1[192.168.1.109]
yes
test1[192.168.1.105]
test1[192.168.1.115]
yes
test1[192.168.1.109]
test1[192.168.1.115]
yes
Result: Node connectivity passed for subnet 192.168.1.0 with node(s) test2,test1
Check: TCP connectivity of subnet 192.168.1.0
Source
Destination
Connected?
test1:192.168.1.105
test2:192.168.1.107
passed
test1:192.168.1.105
test2:192.168.1.116
passed
test1:192.168.1.105
test1:192.168.1.109
passed
test1:192.168.1.105
test1:192.168.1.115
passed
Result: TCP connectivity check passed for subnet 192.168.1.0
Check: Node connectivity of subnet 172.16.0.0
Source
Destination
Connected?
test2[172.16.0.11]
test1[172.16.0.10]
yes
Result: Node connectivity passed for subnet 172.16.0.0 with node(s) test2,test1
Check: TCP connectivity of subnet 172.16.0.0
Source
Destination
Connected?
test1:172.16.0.10
test2:172.16.0.11
passed
Result: TCP connectivity check passed for subnet 172.16.0.0
Check: Node connectivity of subnet 169.254.0.0
Source
Destination
Connected?
test2[169.254.250.202]
test1[169.254.41.177]
yes
Result: Node connectivity passed for subnet 169.254.0.0 with node(s) test2,test1
Check: TCP connectivity of subnet 169.254.0.0
Source
Destination
Connected?
test1:169.254.41.177
test2:169.254.250.202
passed
Result: TCP connectivity check passed for subnet 169.254.0.0
Interfaces found on subnet 192.168.1.0 that are likely candidates for VIP are:
test2 eth0:192.168.1.107 eth0:192.168.1.116
test1 eth0:192.168.1.105 eth0:192.168.1.109 eth0:192.168.1.115
Interfaces found on subnet 169.254.0.0
test2 eth1:169.254.250.202
test1 eth1:169.254.41.177
Interfaces found on subnet 172.16.0.0
erconnect are:
test2 eth1:172.16.0.11
test1 eth1:172.16.0.10

that are likely candidates for VIP are:

that are likely candidates for a private int

Result: Node connectivity check passed


Verification of node connectivity was successful.
================
Changing Public IP, VIP and SCAN IP in 11gR2 RAC

The post list the steps for changing the public IP, VIP and SCAN IP. It must be
mentioned that only the IPs are changed in this case. The subnet mask, the publi
c and VIP interface all remain the same. Also private interconnect is not part o
f the change. Steps were tested on the 11gR2 RAC on RHEL 6
The IP change is as follows. The SCAN IP is set up in /etc/hosts (not supported
by Oracle).
Name
Old IP New IP
rhel6m1 192.168.0.85
192.168.0.93
rhel6m2 192.168.0.86
192.168.0.94
rhel6m-scan
192.168.0.91
192.168.0.92
The steps could be done parallel (on all nodes) or in a rolling fashion on each
node. Steps executed on one node is shown here and changes were done parallel on
all nodes. Since the information modified is stored in OCR it is better to take
a manual backup of the OCR before proceeding.
1. First step is to change the VIP configuration. Current VIP configuration is
srvctl config nodeapps
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.89/192.168.0.0/255.255.255.0/eth0, hosting no
de rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.90/192.168.0.0/255.255.255.0/eth0, hosting no
de rhel6m2
2. Stop the database instance and the VIP resource
[oracle@rhel6m1 ~]$ srvctl stop instance -d std11g2 -i std11g21
[grid@rhel6m1 ~]$ srvctl stop vip -n `hostname -s` -f
3. Verify VIP resource is down by using ifconfig on the OS and using crsctl
crsctl stat res -t
ora.rhel6m1.vip
1
OFFLINE OFFLINE
ora.rhel6m2.vip
1
OFFLINE OFFLINE
4. Add the new IP information to /etc/hosts (and DNS) and proceed to modifying t
he VIP. The modify command must be run as root user
[root@rhel6m1 grid]# srvctl modify nodeapps -n rhel6m1 -A 192.168.0.97/255.255.2
55.0/eth0
Verify that changes are taken effect
[grid@rhel6m2 ~]$ srvctl config nodeapps -a
Network exists: 1/192.168.0.0/255.255.255.0/eth0, type static
VIP exists: /rhel6m1-vip/192.168.0.97/192.168.0.0/255.255.255.0/eth0, hosting no
de rhel6m1
VIP exists: /rhel6m2-vip/192.168.0.98/192.168.0.0/255.255.255.0/eth0, hosting no
de rhel6m2
If the VIP is now on a different network then do not start VIP until public IP a
nd SCAN IP is also changed into the same network.

5. Next is to update the SCAN IP information. Current SCAN IP configuration


srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.91
6. Stop the SCAN IP and the scan lister and verify it is stopped.
[root@rhel6m1 grid]# srvctl stop scan_listener
[root@rhel6m1 grid]# srvctl stop scan
[root@rhel6m1 grid]# srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running

[root@rhel6m1 grid]# srvctl status scan_listener


SCAN Listener MYLISTENER_SCAN1 is enabled
SCAN listener MYLISTENER_SCAN1 is not running
7. Modify the SCAN IP by executing the modify command as root user with the same
SCAN name. (It is assumed that if DNS is used, the SCAN name now resolve to new
IPs) This will pick up the new IP and update cluster records with the new SCAN
IP.
[root@rhel6m1 grid]# srvctl modify scan -n rhel6m-scan
8. Verify the changes have taken effect
[root@rhel6m1 grid]# srvctl config scan
SCAN name: rhel6m-scan, Network: 1/192.168.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /rhel6m-scan/192.168.0.92
If the SCAN IP is now on a different network than the public IP then don't start
the SCAN IP until the pubilc IP is also changed.
9. Updating public IP requires no cluster related work. Shutdown the cluster sta
ck
[root@rhel6m1 grid]# crsctl stop crs
10. Change IP address on OS (eg. editing ifcfg-eth*) files and restart the netwo
rk for the changes to take effect. Once the IP changes are made it maybe worthwh
ile to do ssh between nodes using the new IP so it is added to known host list a
nd no prompts are shown during the ssh between the nodes. As the final step rest
art the cluster stack with
# crsctl start crs
Useful metalink notes
How to update the IP address of the SCAN VIP resources (ora.scan.vip) [ID 952903
.1]
Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node [ID 27
6434.1]
How to Modify Public Network Information including VIP in Oracle Clusterware [ID
276434.1]
Related Posts
Changing Listener and SCAN Listener Port in 11gR2 RAC
Changing Listener and SCAN Listener Name in 11gR2 RAC

Das könnte Ihnen auch gefallen