Configuration of network for virtualbox and RAC is always making a lot of trouble and raises many questions. In this article I’ll show how to setup network for RAC 11G, 12C using dnsmasq.
Objectives to complete:
- full network setup for RAC
- public network
- private network
- SCAN settings resolved by dnsmasq
- full access to internet from each RAC hosts
- internet network
- configure dnsmasq
In my articles for RAC I usually have three network cards for each of my node with following settings on VirtualBox
Adapter1 – used for public RAC interface
Adapter2 – used for private RAC interface
Adapter3 – used for internet connections
and two host machines with following settings
- rac1.dbaora.com
- rac2.dbaora.com
public | private | vip | |
rac1 | 192.168.0.50 | 192.168.56.60 | 192.168.0.70 |
rac2 | 192.168.0.51 | 192.168.56.61 | 192.168.0.71 |
with single client access name (SCAN) address
public | |
rac-scan | 192.168.0.20 192.168.0.21 192.168.0.22 |
My WIFI router generates ip adress like 192.168.1.X so it doesn’t interfere with RAC public, private and SCAN. It’s important to have your internet network on separate subnet.
So my entry in β/ect/hostsβ looks following. As you can notice SCAN entries are commented and will be resolved via dnsmasq.
127.0.0.1 localhost.localdomain localhost #public 192.168.0.50 rac1 rac1.dbaora.com 192.168.0.51 rac2 rac2.dbaora.com #private 192.168.56.60 rac1-priv rac1-priv.dbaora.com 192.168.56.61 rac2-priv rac2-priv.dbaora.com #virtual 192.168.0.70 rac1-vip rac1-vip.dbaora.com 192.168.0.71 rac2-vip rac2-vip.dbaora.com #scan #192.168.0.20 rac-scan rac-scan.dbaora.com #192.168.0.21 rac-scan rac-scan.dbaora.com #192.168.0.22 rac-scan rac-scan.dbaora.com
Install and configure dnsmasq
1. To install dnsmasq run as root following command
yum install dnsmasq
2. Configure dnsmasq
create new file “/etc/racdns” with settings for SCAN
[root@rac1 ~]# cat /etc/racdns #scan 192.168.0.20 rac-scan rac-scan.dbaora.com 192.168.0.21 rac-scan rac-scan.dbaora.com 192.168.0.22 rac-scan rac-scan.dbaora.com
modify dnsmasq default configuration file “/etc/dnsmasq.conf”. One parameter addn-hosts should be changed to point to file “/etc/racdns”.
[root@rac1 ~]# cat /etc/dnsmasq.conf | grep addn-hosts addn-hosts=/etc/racdns
3. Start dnsmasq
service dnsmasq start chkconfig dnsmasq on
4. Next step is to resolve problem with file “/etc/resolv.conf”
I’m using third network card as NAT with DHCP so each time you restart network card or reboot host the file is overwritten with automatically generated settings. Nameserver points for 192.168.1.1 which is required to resolve internet entries but not enough to resolve SCAN settings via dnsmasq.
[root@rac1 ~]# cat /etc/resolv.conf # Generated by Networkmanager search dbaora.com nameserver 192.168.1.1
As default dnsmasq is running on ip adress 127.0.0.1 so it requires following settings in “/etc/resolv.conf”.
[root@rac1 ~]# cat /etc/resolv.conf # Generated by Networkmanager nameserver 127.0.0.1 search dbaora.com nameserver 192.168.1.1
You must protect the file from being automatically overwritten by host reboot, network card restart etc.
[root@rac1 ~]# chattr +i /etc/resolv.conf
Verification
It’s just running nslookup to verify all is working fine
rac-scan
[root@rac1 ~]# nslookup rac-scan Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac-scan.dbaora.com Address: 192.168.0.22 Name: rac-scan.dbaora.com Address: 192.168.0.20 Name: rac-scan.dbaora.com Address: 192.168.0.21 [root@rac1 ~]# nslookup rac-scan Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac-scan.dbaora.com Address: 192.168.0.20 Name: rac-scan.dbaora.com Address: 192.168.0.21 Name: rac-scan.dbaora.com Address: 192.168.0.22 [root@rac1 ~]# nslookup rac-scan Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac-scan.dbaora.com Address: 192.168.0.21 Name: rac-scan.dbaora.com Address: 192.168.0.22 Name: rac-scan.dbaora.com Address: 192.168.0.20
rac1, rac2, rac1-priv, rac2-priv, rac1-vip, rac2-vip
[root@rac1 ~]# nslookup rac1 Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac1.dbaora.com Address: 192.168.0.50 [root@rac1 ~]# nslookup rac2 Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac2.dbaora.com Address: 192.168.0.51 [root@rac1 ~]# nslookup rac1-priv Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac1-priv.dbaora.com Address: 192.168.56.60 [root@rac1 ~]# nslookup rac2-priv Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac2-priv.dbaora.com Address: 192.168.56.61 [root@rac1 ~]# nslookup rac1-vip Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac1-vip.dbaora.com Address: 192.168.0.70 [root@rac1 ~]# nslookup rac2-vip Server: 127.0.0.1 Address: 127.0.0.1#53 Name: rac2-vip.dbaora.com Address: 192.168.0.71
Have a fun π
Tomasz
Superb method, do we need to configure dnsmasq on all Rac Nodes?
yes on each rac node π
Thanks you are my saviour
π
Hi,
I’m trying to create an ora rac lab using three Vmware fusion machines:
– dnsmasq (OEL 6.5) dnsserver
– oragrid + ora rdbms (RHEL 5.5) node 1
– oragrid + ora rdbms (RHEL 5.5) node 1
– mac os (Virtual disk – NFS)
I’ve the following error when I try to install Ora Grid Infrastructure:
INS-40922 Invalid Scan Name – Unresolvable to IP address
127.0.0.1 localhost.localdomain localhost
#### public
192.168.0.31 racnode1 racnode1.rafadomain
192.168.0.32 racnode2 racnode2.rafadomain
#### private
192.168.56.1 racnode1-priv racnode1-priv.rafadomain
192.168.56.2 racnode2-priv racnode2-priv.rafadomain
#### virtual
192.168.0.41 racnode1-vip racnode1-vip.rafadomain
192.168.0.42 racnode2-vip racnode2-vip.rafadomain
#### scan
#192.168.0.20 rac-scan rac-scan.rafadomain
#192.168.0.21 rac-scan rac-scan.rafadomain
#192.168.0.22 rac-scan rac-scan.rafadomain
Tks
Rafael
Have you verified ip address on each node using nslookup ? Remember dnsmasq must be installed on each node. On each node each ipadrees must be resolveable.
Regards
Tomasz
you are a gem, for last many days i am unsuccessful… but with this i get it done in 10mins
u make my day…. Many many thanks
i didn’t mention the named server in /etc/resolv.conf as i don’t connect to outer world from the vm. is it going to be any problem?
If test pings work then all should work
Nice Article. Thanks. Really helped!
Partha
Cool π
Pingback: Configuring a private DNS server on Openfiler for use with Oracle RAC 12C on Virtual Boxes | Jobacle
This was a great workaround to get a lab rac running with SCAN , thanks
I have created a similar setup. And I read somewhere that we shouldnt be able to ping from node1 to node2 or viceversa using the virtual IP’s before installing the grid software.
1) I got the following error while I was about to install Oracle grid software on node 1.
INS-40912] Virtual host name: rac2-vip.localdomain is assigned to another system on the network.
this is my network setup
27.0.0.1 localhost.localdomain localhost
# Public
192.168.0.111 ol6-112-rac1.localdomain ol6-112-rac1
192.168.0.112 ol6-112-rac2.localdomain ol6-112-rac2
# Private
192.168.1.111 ol6-112-rac1-priv.localdomain ol6-112-rac1-priv
192.168.1.112 ol6-112-rac2-priv.localdomain ol6-112-rac2-priv
# Virtual
192.168.0.113 ol6-112-rac1-vip.localdomain ol6-112-rac1-vip
192.168.0.114 ol6-112-rac2-vip.localdomain ol6-112-rac2-vip
# SCAN
192.168.0.115 ol6-112-scan.localdomain ol6-112-scan
192.168.0.116 ol6-112-scan.localdomain ol6-112-scan
192.168.0.117 ol6-112-scan.localdomain ol6-112-scan
i am not able to ping to 192.168.0.113, but able to ping to 192.168.0.114 from both the nodes. I have tried emulating your dnsmasq setup but the error still persists. could you help ?
correct , it is
127.0.0.1 localhost.localdomain **
hi
how can I use these network settings in vmware workstation 9 ?
I mean ( internal network = ? in workstaion9)
thx in advance
I’m not using workstation but I believe settings should be quite similar to virtual box.
Regards
Tomasz
Excellent Article….
great notes. I followed as described as solved my issue.
Thanks for your notes. I got stressed to setup dns in my Vbox, but I see your notes, its easy to understand and follow..
I am installing Oracle 11.2.0.3 Single Node RAC on RHEL 5.3.
I configured DNS as you suggested, but getting following error when run runcluvfy.
“PRVF-5636 : The DNS response time for an unreachable node exceeded “15000” ms on following nodes: RAC-A
My guess is you have slow network or computer that causes such issues.
I checked on another forum, they suggested to install bind-* packages and start named service. I installed these packages but when start named service, giving this error.
rndc: connect failed: 127.0.0.1#953: connection refused
named is stopped
named.conf not present in /etc and /var/named/chroot/etc locations. Very strange.
How can I solve this problem to clean install? Otherwise, it will install cluster but with failure of some components/warnings.
Thanks a lot your a STAR!
Superb!! Thanks a lot..
Thank you very much π
Great…. the simplest and easiest method.
Many thanks…
After lot of effort i got this ..Thanks for post man…
After setting 127.0.0.1 to namedserver my internet is not working,can you please help on this.
Thanks
Thanks,got it fixed…
Nice article…..I have been working on the scan issues for 2 days with out any success….your article and explanation save me time and resolved the issue……..Good work….
You are excellent and you are making many life easy.. please post as many as.. I really think people as GOD when they teach things easy and share it with others.
Thank you for the simplicity in configuring the DNS for rac installation. Like the other comments left you made my day. My greetings.
Hi,
After configuring the DNS with dnsmasq ,should the SCAN entries remain commented in the /etc/hosts file?
Thanks!
You can keep them
Regards
Tomasz
GREAT WORK!
THIS MESSAGE IS PRINTED FOR A REASON, TO SHOW MY APPRECIATION FOR YOUR WORK.
I HAVE BEEN TRY TO INSTALL RAC FOR ALMOST ONE YEAR NOW.
Good work man!
Thanks for u
Hello,
One of the most valuable piece of information in installing Oracle RAC!!
It made RAC network configuration very simple.
Thanks a lot for this awesome contribution.
Regards,
Abdul
Idk how all you guys are able to connect. I am still having trouble with the networking. I have been at this for a week now. I followed your steps and tried to imitate you and put three NIC cards with the first two internal and the last NAT and I cannot connect to the internet now. Not sure what’s going on. Do you have any advice or youtube videos?
testing..not sure if my last post worked..
hello, very good writeup and i have followed the steps but when i check the dnsmasq service it shows failed.
[root@pluto-rac1 ~]# chkconfig dnsmasq on
Note: Forwarding request to ‘systemctl enable dnsmasq.service’.
Created symlink from /etc/systemd/system/multi-user.target.wants/dnsmasq.service to /usr/lib/systemd/system/dnsmasq.service.
[root@pluto-rac1 ~]# service dnsmasq status
Redirecting to /bin/systemctl status dnsmasq.service
β dnsmasq.service – DNS caching server.
Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-04-16 23:24:20 +08; 1min 27s ago
Main PID: 3157 (code=exited, status=2)
Apr 16 23:24:20 pluto-rac1.blueorigin.com systemd[1]: Started DNS caching server..
Apr 16 23:24:20 pluto-rac1.blueorigin.com dnsmasq[3157]: dnsmasq: failed to create listening socket for port 53: Address already in use
Apr 16 23:24:20 pluto-rac1.blueorigin.com systemd[1]: dnsmasq.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 16 23:24:20 pluto-rac1.blueorigin.com systemd[1]: Unit dnsmasq.service entered failed state.
Apr 16 23:24:20 pluto-rac1.blueorigin.com systemd[1]: dnsmasq.service failed.
Can you guide how to create a statis ip address in dnsmasq instead of 127.0.0.1?
dnsmasq: failed to create listening socket for 192.168.0.1: Cannot assign requested address
Great article! Thanks a lot!
PRVG-11826 : DNS resolved IP addresses “” for SCAN name “sqascan” not found in the name service returned IP addresses “10.226.147.202” Β – Cause:Β The name resolution setup check for the indicated SCAN name failed because one or more of the indicated IP addresses obtained from DNS could not be found in the IP addresses obtained from the name service on the system as configured in the ”/etc/nsswitch.conf” configuration file.
Got this issue while installing 12C grid . I have sqascan ip entries in /etc/hosts and /etc/resolve.conf but this is not resolving