方案:选择同一网段,不同ip地址
需求:需要网络工程师规划两组ip(一组用于备库rac,另一组用于修改ip时,将报表库的ip替换出来,本次迁移建议不做私有ip的修改)
-------------------------------------------------------------------以一节点修改public ip实验测试------------------------------------------------------------------------
源:192.168.56.20 rc1
将现有ip:192.168.56.20替换成ip:192.168.56.51
参考metalink 文档 ID 276434.1
If the change is only public IP or VIP address and the new ones are still in the same subnet, same interface, or if the change is only for public IP MAC address, IP/interface/subnet/netmask all remain the same, nothing needs to be done at clusterware layer, all changes need to be done at OS layer to reflect the change.
操作:
1、crsctl stop crs
2、/etc/hosts
3、修改物理网卡的ip地址
####setup设置网卡网络:/etc/sysconfig/network-scripts/ifcfg-eth0
4、修改ip后需要重新连接打开新的窗口
测试结果:成功,风险小
------------------------------------------------------------------修改 VIP-----------------------------------------------------------------------------------------------
参考文档:metalink ID 276434.1
测试:192.168.56.21 替换成192.168.56.28
1、获取vip配置信息(Grid Infrastructure owner:)
$ srvctl config nodeapps -a
2、确认vip状态是 ONLINE
$ crsctl stat res -t
3、Stop the nodeapps resources
as Grid Infrastructure owner:
$ srvctl stop instance -d RACDB -n racnode1 —确认db以切换到另一节点
$ srvctl stop vip -n racnode1 -f
4、Verify VIP is now OFFLINE
$crs_stat -t
5、确认新的vip地址,并提前将vip信息更新的/etc/hosts内(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)
6、修改vip as root user(以grid环境变量,root执行)
srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2
7、验证是否修改成功
$ srvctl config nodeapps -n racnode1 -a
Restarting Resources
8. Start the nodeapps and the other resources
eg,
$ srvctl start vip -n racnode1
$ srvctl start listener -n racnode1
$ srvctl start instance -d RACDB -n racnode1
10、同样的步骤修改其他节点
------------------------------------------------------------------修改 scan ip-----------------------------------------------------------------------------------------------
参考文档:metalink 文档 ID 952903.1
A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:
$ nslookup sales-scan.example.com
Server: dns1.example.com
Address: 10.100.10.70#53
Name: sales-scan.example.com
Address: 10.100.10.123
Name: sales-scan.example.com
Address: 10.100.10.122
Name: sales-scan.example.com
Address: 10.100.10.121
Stop the SCAN listener and the SCAN VIP resources:
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
The SCAN VIP resources still show the old IP addresses:
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.83
Now tell CRS to update the SCAN VIP resources:
To verify that the change was successful, check the SCAN configuration again:
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.123
Start SCAN and the SCAN listener: