You are on page 1of 6

How to Modify Public Network Information including VIP in Oracle Clusterware (Doc ID 276434.

1)
Modified: 06-Feb-2014 Type: BULLETIN

In this Document Purpose Scope Details Case I. Changing public hostname Case II. Changing public IP only without changing interface, subnet or netmask Case III. Changing public network interface, subnet or netmask Case IV. Changing VIPs associated with public network change Planning for VIP changes Gathering Current VIP Configuration Stopping Resources Modifying VIP and Its Associated Attributes Restarting Resources Others Case V. Change SCAN VIP associated with public network change References

APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.0 [Release 10.1 to 11.2] Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.3 [Release 11.2] Information in this document applies to any platform.

PURPOSE
The purpose of this note is to illustrate how to change a public hostname, public IP, a Virtual IP Address (VIP), VIP hostname or other VIP attributes in an Oracle Clusterware/Grid Infrastructure environment.

SCOPE
Oracle Database 10g and 11g use VIPs (Virtual IP) in clustered environments for clients to connect to the database. These VIPs are static IP addresses associated with (virtual) hostnames and resolved through DNS (except when using 11gR2 GNS). During the installation of the Oracle Clusterware users are prompted to enter a Virtual IP and Virtual hostname for each of the node in the cluster. These are stored within the OCR (Oracle Cluster Registry) and different components within the HA framework depend on these VIPs. If for some reason the need arises to change either the VIP, the VIP hostname, or the subnet, netmask etc, this procedure should be followed. For changes associated with private network/cluster interconnect, please refer to Note 283684.1

DETAILS
Case I. Changing public hostname
Public hostname is recorded in OCR, it is entered during installation phase. It can not be modified after the installation. The only way to modify public hostname is by deleting the node, then add the node back with a new hostname, or reinstall the clusterware.

Case II. Changing public IP only without changing interface, subnet or netmask
If the change is only public IP address and the new ones are still in the same subnet, nothing needs to be done on clusterware layer, all changes need to be done at OS layer to reflect the change. 1. Shutdown Oracle Clusterware stack 2. Modify the IP address at network layer, DNS and /etc/hosts file to reflect the change 3. Restart Oracle Clusterware stack Above change can be done in rolling fashion, eg: one node at a time.

Case III. Changing public network interface, subnet or netmask


If the change involves different subnet(netmask) or interface, delete the existing interface information from OCR and add it back with the correct information is required. In the example here, the subnet is changed from 10.2.156.0 to 10.2.166.0 via two separate commands - first a 'delif' followed by a 'setif':
%$ C R S _ H O M E / b i n / o i f c f g / o i f c f gd e l i fg l o b a l< i f _ n a m e > [ / < s u b n e t > ] %$ C R S _ H O M E / b i n / o i f c f g / o i f c f gs e t i fg l o b a l< i f _ n a m e > / < s u b n e t > : p u b l i c F o re x a m p l e : %$ C R S _ H O M E / b i n / o i f c f gd e l i fg l o b a le t h 0 / 1 0 . 2 . 1 5 6 . 0 %$ C R S _ H O M E / b i n / o i f c f gs e t i fg l o b a le t h 0 / 1 0 . 2 . 1 6 6 . 0 : p u b l i c

Make the change at OS layer and restart Oracle Clusterware. This can be done in rolling fashion. Once public network is changed, its associated VIP and SCAN VIP are also required to change, refer to CASE IV and CASE V.

Case IV. Changing VIPs associated with public network change


Planning for VIP changes In general, a complete outage is only required for pre-10.2.0.3 release. From 10.2.0.3 onwards, the ASM/database instance dependency on the VIP resource is removed, so the VIP could be modified without having to take down the ASM/database instance, only client connections to the database will be affected when VIP is down. If the modification is a node specific, then only connection to that node will be affected during the time of change. Please follow Case III to ensure public network changes are made first. Gathering Current VIP Configuration

1. Gather the existing setup for 10g and 11gR1, as Oracle Clusterware owner:
$s r v c t lc o n f i gn o d e a p p sn< n o d e >a e g : $s r v c t lc o n f i gn o d e a p p snr a c n o d e 1a V I Pe x i s t s . :/ r a c n o d e 1 v i p / 1 0 1 . 1 7 . 8 0 . 1 8 4 / 2 5 5 . 2 5 5 . 2 5 4 . 0 / e t h 1

for 11gR2, as Grid Infrastructure owner:


$s r v c t lc o n f i gn o d e a p p sa e g : $s r v c t lc o n f i gn o d e a p p sa N e t w o r ke x i s t s :1 / 1 0 1 . 1 7 . 8 0 . 0 / 2 5 5 . 2 5 5 . 2 5 4 . 0 / e t h 1 ,t y p es t a t i c V I Pe x i s t s :/ r a c n o d e 1 v i p / 1 0 1 . 1 7 . 8 0 . 1 8 4 / 1 0 1 . 1 7 . 8 0 . 0 / 2 5 5 . 2 5 5 . 2 5 4 . 0 / e t h 1 ,h o s t i n gn o d e r a c n o d e 1 V I Pe x i s t s :/ r a c n o d e 2 v i p / 1 0 1 . 1 7 . 8 0 . 1 8 6 / 1 0 1 . 1 7 . 8 0 . 0 / 2 5 5 . 2 5 5 . 2 5 4 . 0 / e t h 1 ,h o s t i n gn o d e r a c n o d e 2

2. Verify VIP status


1 0 . 2a n d1 1 . 1 : $c r s _ s t a tt 1 1 . 2 : $c r s c t ls t a tr e st -i ts h o u l ds h o wV I P sa r eO N L I N E $i f c o n f i ga ( n e t s t a ti nf o rH Pa n di p c o n f i g/ a l lf o rW i n d o w s ) -V I Pl o g i c a li n t e r f a c ei sb o u n dt ot h ep u b l i cn e t w o r ki n t e r f a c e

Stopping Resources 3. Stop the nodeapps resources (and all dependent resources ASM/DB only if required): 10g and 11gR1, as Oracle Clusterware owner:
$s r v c t ls t o pi n s t a n c ed< d b _ n a m e >i< i n s t _ n a m e > $s r v c t ls t o pa s mn< n o d e _ n a m e > $s r v c t ls t o pn o d e a p p sn< n o d e _ n a m e > e g , $s r v c t ls t o pi n s t a n c edR A C D BiR A C D B 1 $s r v c t ls t o pa s mnr a c n o d e 1 $s r v c t ls t o pn o d e a p p snr a c n o d e 1 ( o p t i o n a lf o r1 0 . 2 . 0 . 3 + ) ( o p t i o n a lf o r1 0 . 2 . 0 . 3 + )

11gR2, as Grid Infrastructure owner:

$s r v c t ls t o pi n s t a n c ed< d b _ n a m e >n< n o d e _ n a m e > $s r v c t ls t o pv i pn< n o d e _ n a m e >f e g , $s r v c t ls t o pi n s t a n c edR A C D Bnr a c n o d e 1 $s r v c t ls t o pv i pnr a c n o d e 1f

( o p t i o n a l )

Note 1: The -f option is required for 11gR2 to stop listener resource, otherwise following error will occur: PRCR-1014 : Failed to stop resource ora.racnode1.vip PRCR-1065 : Failed to stop resource ora.racnode1.vip CRS-2529: Unable to act on 'ora.racnode1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified ...

4. Verify VIP is now OFFLINE and the interface is no longer bound to the public network interface
$c r s _ s t a tt( o r$c r s c t ls t a tr e stf o r1 1 g R 2 ) $i f c o n f i ga ( n e t s t a ti nf o rH Pa n di p c o n f i g/ a l lf o rw i n d o w s )

Modifying VIP and Its Associated Attributes 5. Determine the new VIP IP/subnet/netmask or VIP hostname, make the network change on OS first, ensure the new VIP is registered in DNS or modified in /etc/hosts (for Unix/Linux) and \WINDOWS\System32\drivers\etc\hosts file (for Windows). If the network interface is changed, ensure the new interface is available on the server before proceeding with the modification.
F o re x a m p l e : N e wV I Pi s :1 1 0 . 1 1 . 7 0 . 1 1r a c n o d e 1 n v i p n e ws u b n e ti s1 1 0 . 1 1 . 7 0 . 0 n e wn e t m a s ki s2 5 5 . 2 5 5 . 2 5 5 . 0 n e wi n t e r f a c ei se t h 2

6. Modify the VIP resource, as root user:


#s r v c t lm o d i f yn o d e a p p sn< n o d e >A< n e w _ v i p _ a d d r e s so r n e w _ v i p _ h o s t n a m e > / < n e t m a s k > / < [ i f 1 [ i f 2 . . . ] ] > e g : #s r v c t lm o d i f yn o d e a p p snr a c n o d e 1Ar a c n o d e 1 n v i p / 2 5 5 . 2 5 5 . 2 5 5 . 0 / e t h 2

* A special case for 11gR2 modifying the VIP hostname only without changing the IP address.
F o re x a m p l e :o n l yV I Ph o s t n a m ec h a n g e sf r o mr a c n o d e 1 v i pt or a c n o d e 1 n v i p ,I Pa n do t h e r a t t r i b u t e sr e m a i ns a m e .

I fI Pa d d r e s si sn o tc h a n g e d ,a b o v em o d i f yc o m m a n dw i l ln o tc h a n g et h eU S R _ O R A _ V I Pv a l u ei n ' c r s c t ls t a tr e so r a . r a c n o d e 1 . v i pp 'o u t p u t .T ow o r k a r o u n d : 1 .m o d i f yV I Pt ou s ea n o t h e rv a l i dh o s t n a m e ,f o re x a m p l en o d e 2V I Ph o s t : #s r v c t lm o d i f yn o d e a p p snr a c n o d e 1Ar a c n o d e 2 v i p / 2 5 5 . 2 5 5 . 2 5 5 . 0 / e t h 2 2 .m o d i f yV I Pa g a i nt ou s et h en e wV I Ph o s t n a m e #s r v c t lm o d i f yn o d e a p p snr a c n o d e 1Ar a c n o d e 1 n v i p / 2 5 5 . 2 5 5 . 2 5 5 . 0 / e t h 2 3 .V e r i f yt h ec h a n g e sf o rU S R _ O R A _ V I Pf i e l d : #c r s c t ls t a tr e so r a . r a c n o d e 1 . v i pp

Note 1: For Windows platform, the interface name needs to be in quote (") if there is a space in between, eg: As administrator user or software install user: > srvctl modify nodeapps -n racnode1 -A 110.11.70.11/255.255.255.0/"Local Area Connection 1" Note 2: Starting with 11.2, the VIP depends on network resource (ora.net1.network), the OCR only records the VIP hostname or the IP address associated with the VIP resource. The network attributes (subnet/netmask) is recorded with the network resource. From 11.2.0.2 onwards, if only subnet/netmask change is required, network resource can be modified directly via srvctl modify network command. as root user: # srvctl modify network -k <network_number>] [-S <subnet>/<netmask>[/if1[|if2...]] eg: # srvctl modify network -k 1 -S 110.11.70.0/255.255.255.0/eth2 There is no need to modify VIP or SCAN if other attributes are not changed.

7. Verify the change


$s r v c t lc o n f i gn o d e a p p sn< n o d e >a( 1 0 ga n d1 1 g R 1 ) $s r v c t lc o n f i gn o d e a p p sa( 1 1 g R 2 ) e g : $s r v c t lc o n f i gn o d e a p p snr a c n o d e 1a V I Pe x i s t s . :/ r a c n o d e 1 n v i p / 1 1 0 . 1 1 . 7 0 . 1 1 / 2 5 5 . 2 5 5 . 2 5 5 . 0 / e t h 2

Restarting Resources 8. Start the nodeapps and the other resources 10g and 11gR1, as Oracle Clusterware owner:
$s r v c t ls t a r tn o d e a p p sn< n o d e _ n a m e > $s r v c t ls t a r ta s mn< n o d e _ n a m e > $s r v c t ls t a r ti n s t a n c ed< d b a n m e >i< i n s t > e g :

( o p t i o n a lf o r1 0 . 2 . 0 . 3 + ) ( o p t i o n a lf o r1 0 . 2 . 0 . 3 + )

$s r v c t ls t a r tn o d e a p p snr a c n o d e 1 $s r v c t ls t a r ta s mnr a c n o d e 1 $s r v c t ls t a r ti n s t a n c edR A C D BiR A C D B 1

11gR2, as Grid Infrastructure owner:


$s r v c t ls t a r tv i pn< n o d e _ n a m e > $s r v c t ls t a r ti n s t a n c ed< d b _ n a m e >n< n o d e _ n a m e > e g , $s r v c t ls t a r tv i pnr a c n o d e 1 $s r v c t ls t a r ti n s t a n c edR A C D Bnr a c n o d e 1

( o p t i o n a l )

9. Verify the new VIP is ONLINE and bind to the public network interface
$c r s _ s t a tt( o r$c r s c t ls t a tr e stf o r1 1 g R 2 ) $i f c o n f i ga ( n e t s t a ti nf o rH Po ri p c o n f i g/ a l lf o rw i n d o w s )

10. Repeat the same steps for the rest nodes in the cluster only if the similar change is required. Others 11. Modify listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary.

Case V. Change SCAN VIP associated with public network change


With Grid Infrastructure 11gR2, SCAN and SCAN VIP are introduced for client connections. To modify the SCAN VIP, please refer to Note 952903.1 How to update the IP address of the SCAN VIP resources (ora.scan<n>.vip) Note 972500.1 How to Modify SCAN Setting or SCAN Listener Port after Installation

REFERENCES
NOTE:283684.1 - How to Modify Private Network Information in Oracle Clusterware NOTE:952903.1 - How to update the IP address of the SCAN VIP resources (ora.scan{n}.vip)

You might also like