For the public node name, use the primary host name of each node.
In my environment my one node name is racnode-1 and another node name is racnode-2. So I determine the public, private and virtual node name for node racnode-1 as racnode-1, racnode-1-priv and racnode-1-vip accordingly.
Similarly on racnode-2 as racnode-2, racnode-2-priv and racnode-2-vip accordingly.
2)Identify the interface names and associated IP addresses.
On racnode-1,
#/sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:76:B0:46:7D
inet addr:192.168.1.91 Bcast:192.168.15.255 Mask:255.255.240.0
inet6 addr: fe80::216:76ff:feb0:467d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:96114 errors:0 dropped:0 overruns:0 frame:0
TX packets:1769 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7704446 (7.3 MiB) TX bytes:215309 (210.2 KiB)
eth1 Link encap:Ethernet HWaddr 00:11:3B:0A:42:DC
inet addr:192.168.150.30 Bcast:192.168.150.255 Mask:255.255.255.0
inet6 addr: fe80::211:3bff:fe0a:42dc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27116 errors:0 dropped:0 overruns:0 frame:0
TX packets:48666 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7171014 (6.8 MiB) TX bytes:4353054 (4.1 MiB)
Interrupt:58 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1201 errors:0 dropped:0 overruns:0 frame:0
TX packets:1201 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3069384 (2.9 MiB) TX bytes:3069384 (2.9 MiB)
On racnode-2,
[root@racnode-2 ~]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:76:B2:EB:27
inet addr:192.168.1.92 Bcast:192.168.15.255 Mask:255.255.240.0
inet6 addr: fe80::216:76ff:feb2:eb27/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:104567 errors:0 dropped:0 overruns:0 frame:0
TX packets:1424 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8546472 (8.1 MiB) TX bytes:197747 (193.1 KiB)
Interrupt:169 Base address:0x6200
eth1 Link encap:Ethernet HWaddr 00:11:95:1F:02:09
inet addr:192.168.150.20 Bcast:192.168.150.255 Mask:255.255.255.0
inet6 addr: fe80::211:95ff:fe1f:209/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27495 errors:0 dropped:0 overruns:0 frame:0
TX packets:50130 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6697016 (6.3 MiB) TX bytes:4488642 (4.2 MiB)
Interrupt:177 Base address:0x8100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1203 errors:0 dropped:0 overruns:0 frame:0
TX packets:1203 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2857788 (2.7 MiB) TX bytes:2857788 (2.7 MiB)
Here I will use network interface eth0 for the public network and eth1 is for the private network. So, on racnode-1 IP address on public network will be 192.168.1.91 and IP address on private network will be 192.168.150.30. Similarly on racnode-2 IP address on public network will be 192.168.1.92 and IP address on private network is 192.168.150.20
3)On each node in the cluster, determine a third IP address that will serve as a virtual IP address which must not use currently in the network and its subnet must be same as on public network. I determine virtual IP address for racnode-1 as 192.168.1.95 and on racnode-2 as 192.168.1.96
4)After completing the network configuration, the IP address and network interface configuration should be as follows,
Node(Hostname) Node Name Type IP Address
racnode-1 racnode-1 public 192.168.1.91
racnode-1 racnode-1-vip virtual 192.168.1.95
racnode-1 racnode-1-priv private 192.168.150.30
racnode-2 racnode-2 public 192.168.1.92
racnode-2 racnode-2-vip virtual 192.168.1.96
racnode-2 racnode-2-priv private 192.168.150.20
5)In all nodes modify /etc/hosts file so that they contain the host IP addresses, virtual IP addresses, and private network IP addresses from both nodes in the cluster, as follows,
[root@racnode-2 ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.91 racnode-1
192.168.1.95 racnode-1-vip
192.168.150.30 racnode-1-priv
192.168.1.92 racnode-2
192.168.1.96 racnode-2-vip
192.168.150.20 racnode-2-priv
6)Verify the network configuration by using the ping command to test the connection.
ping -c 3 racnode-2
ping -c 3 racnode-2-vip
ping -c 3 racnode-2-priv
ping -c 3 racnode-1
ping -c 3 racnode-1-vip
ping -c 3 racnode-1-priv
Note that in this stage ping to the virtual ip address will fail until after Oracle Clusterware is installed and running. But ping to your private and public network address should work.
Great explaination with network settings,i have been reading it docs but there was confusion,it really cleared the air for me .
ReplyDeleteExcellent!!!!