Network Management on Oracle Database 11.2 RAC

Local Listener

~]$ srvctl add listener -l LISTENER -p 1521 -k 1
~]$ srvctl config listener
~]$ srvctl start listener

Modify Private IP

Node DNS Original Planning
node1 asm01-priv 100.100.100.151/24, ens224 10.10.10.151/24, ens224
node2 asm02-priv 100.100.100.152/24, ens224 10.10.10.152/24, ens224

Login as root:

# 1. backup the gpnp profile on all nodes.
~]# xmllint --format $GRID_HOME/gpnp/profiles/peer/profile.xml
~]# cp -a $GRID_HOME/gpnp/profiles/peer/profile.xml{,.`date +%Y%m%d`}

# 2. backup the ocr config.
~]# $GRID_HOME/bin/ocrconfig -manualbackup
~]# $GRID_HOME/bin/ocrconfig -showbackup

# 3. Add the planning cluster interconnect network.
~]# $GRID_HOME/bin/oifcfg iflist
ens192 192.168.3.0
ens224 100.100.100.0

~]# $GRID_HOME/bin/oifcfg getif
ens192 192.168.3.0 global public
ens224 100.100.100.0 global cluster_interconnect

~]# $GRID_HOME/bin/oifcfg setif -global ens224/10.10.10.0:cluster_interconnect
~]# $GRID_HOME/bin/oifcfg getif
ens192 192.168.3.0 global public
ens224 100.100.100.0 global cluster_interconnect
ens224 10.10.10.0 global cluster_interconnect

# 4. modify private nic ip on all nodes.
~]# $GRID_HOME/bin/crsctl stop crs

~]# nmcli con mod ens224 +ipv4.addr 10.10.10.151/24
~]# nmcli con mod ens224 -ipv4.addr 100.100.100.151/24
~]# nmcli con up ens224

~]# sed -i 's/100.100.100.151/10.10.10.151/' /etc/hosts
~]# sed -i 's/100.100.100.152/10.10.10.152/' /etc/hosts

# 5. start cluster on all nodes.
~]# $GRID_HOME/bin/crsctl start crs

# 6. delete the old cluster interconnect network.
~]# $GRID_HOME/bin/oifcfg getif
~]# $GRID_HOME/bin/oifcfg delif -global ens224/100.100.100.0

In the Oracle 11.2 Grid structure, private hostnames are no longer recorded in OCR and have no dependencies, so they can be freely changed in the /etc/hosts file.

Modify Virtual IP

Node DNS Original Planning
node1 rac01-vip 192.168.12.105/24, ens160 192.168.12.107/24, ens160
node2 rac01-vip 192.168.12.106/24, ens160 192.168.12.108/24, ens160
# 1. login as oracle, stop database and vip.
~]$ srvctl stop database -d orcl

~]$ srvctl stop listener -n oracle19c1
~]$ srvctl stop listener -n oracle19c2

~]$ srvctl stop vip -n oracle19c1 -f
~]$ srvctl stop vip -n oracle19c2 -f

~]# vi /etc/hosts # on all nodes

bin]# ./srvctl modify nodeapps -n oracle19c1 -A 192.168.12.107/255.255.255.0/ens160
bin]# ./srvctl modify nodeapps -n oracle19c2 -A 192.168.12.108/255.255.255.0/ens160
bin]# ./srvctl config nodeapps -a

bin]# systemctl restart NetworkManager

bin]# ./srvctl start vip -n oracle19c1
bin]# ./srvctl start vip -n oracle19c2

bin]# ./srvctl start listener -n oracle19c1
bin]# ./srvctl start listener -n oracle19c2

~]$ srvctl start listener -n oracle19c1
Listener LISTENER is enabled on node(s): oracle19c1
Listener LISTENER is running on node(s): oracle19c1

~]$ srvctl status listener -n oracle19c2
Listener LISTENER is enabled on node(s): oracle19c2
Listener LISTENER is running on node(s): oracle19c2

~]$ sqlplus / as sysasm
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.163)(PORT=1521))))' sid='+ASM1' scope=both;
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.164)(PORT=1521))))' sid='+ASM2' scope=both;
SQL> alter system register;

Cannot directly change the VIP hostname; you need to delete and recreate it.

Modify SCAN IP

Node DNS Original Planning
/ jzh-cluster-scan 192.168.1.205/24, eth0 192.168.1.206/24, eth0
~]# cd $GRID_HOME/bin
bin]# ./srvctl config scan
SCAN name: jzh-cluster-scan, Network: 1/192.168.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /jzh-cluster-scan/192.168.1.205

bin]# ./srvctl stop scan_listener
bin]# ./srvctl stop scan
bin]# ./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running

bin]# vi /etc/hosts
192.168.1.201 jzh1.oracle.com jzh1
192.168.1.203 jzh2.oracle.com jzh2
10.10.10.201 jzh1-priv
10.10.10.203 jzh2-priv
192.168.1.202 jzh1-vip
192.168.1.204 jzh2-vip
192.168.1.206 jzh-cluster-scan

bin]# ./srvctl modify scan -n jzh-cluster-scan
bin]# ./srvctl modify scan_listener -u

bin]# ./srvctl config scan
SCAN name: 192.168.1.206, Network: 1/192.168.1.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.1.206/192.168.1.206

bin]# ./srvctl start scan
bin]# ./srvctl start scan_listener

bin]# ping 192.168.1.206
PING 192.168.1.206 (192.168.1.206) 56(84) bytes of data.
64 bytes from 192.168.1.206: icmp_seq=1 ttl=64 time=1.78 ms
64 bytes from 192.168.1.206: icmp_seq=2 ttl=64 time=1.23 ms
64 bytes from 192.168.1.206: icmp_seq=3 ttl=64 time=0.444 ms
64 bytes from 192.168.1.206: icmp_seq=4 ttl=64 time=0.512 ms
64 bytes from 192.168.1.206: icmp_seq=5 ttl=64 time=0.891 ms

~]$ crs_stat -t | grep scan
ora.scan1.vip ora....ip.type ONLINE ONLINE jzh2

~]$ crs_stat -t | grep lsnr
ora....ER.lsnr ora....er.type ONLINE ONLINE jzh1
ora....N1.lsnr ora....er.type ONLINE ONLINE jzh2
ora....H1.lsnr application ONLINE ONLINE jzh1
ora....H2.lsnr application ONLINE ONLINE jzh2

The scan IP hostname can be changed.

Modify Host Name

How to rename the hostname in RAC