Tag Archives: nslookup scan rac

Configure Dnsmasq for Oracle Linux for RAC scan address Configured

Configure Dnsmasq for Oracle Linux for RAC scan address Configured

1. Install the DNSMASQ on Oracle Linux

yum install dnsmasq

2. Configured if for automatic start on Linux reboot

chkconfig dnsmasq on

3. For configuring for Setup SCAN address for RAC Instances:
Dnsmasq is configured by altering the file “/etc/dnsmasq.conf” and “/etc/hosts”.
We make entries in /etc/hosts file for configuring the IP addresses used by RAC Environment.

cat /etc/hosts
# Public
192.168.56.101 rac1.localdomain rac1
192.168.56.102 rac2.localdomain rac2
# Private
192.168.1.101 rac1-priv.localdomain rac1-priv
192.168.1.102 rac2-priv.localdomain rac2-priv
# Virtual
192.168.56.103 rac1-vip.localdomain rac1-vip
192.168.56.104 rac2-vip.localdomain rac2-vip
# SCAN
192.168.56.105 rac-scan.localdomain rac-scan
192.168.56.106 rac-scan.localdomain rac-scan
192.168.56.107 rac-scan.localdomain rac-scan

4. Now configure the /etc/resolv.conf file.

cat /etc/resolv.conf
#domain localdomain
search localdomain
nameserver 192.168.56.1

5. Edit the /etc/dnsmasq.conf file:

local=/localdomain/

6. Start the dnsmasq process

service dnsmasq stop
service dnsmasq start
service dnsmasq restart

7. Test by nslookup commands as follows:

nslookup rac-scan
;; connection timed out; no servers could be reached

8. If nslookup gives timeout error then you need to modify the vi/etc/resolv.conf file.
Add one entry of local address because dnsmasq is running by default on 127.0.0.1 address

cat /etc/resolv.conf
#domain localdomain
nameserver 127.0.0.1
search localdomain
nameserver 192.168.56.1

9. Protect and Restart the dnsmasq process.

--Changes its attribute for changing in reboot.
chattr +i /etc/resolv.conf
-- Start the Service.
service dnsmasq restart

10. Check again the nslookup command, it works.

nslookup rac-scan
[root@rac1 ~]# nslookup rac-scan
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: rac-scan.localdomain
Address: 192.168.56.105
Name: rac-scan.localdomain
Address: 192.168.56.106
Name: rac-scan.localdomain
Address: 192.168.56.107

In upper case it is using the /etc/hosts file for resolve the name, if you want to configured own file instead for resolved the scan ip address in DNSMASQ

1. Install the dnsmasq and configured it for next reboot

yum install dnsmasq
chkconfig dnsmasq on

2. Create the new file having entry of SCAN ip address

cat /etc/scanipaddress
# SCAN
192.168.56.105 rac-scan.localdomain rac-scan
192.168.56.106 rac-scan.localdomain rac-scan
192.168.56.107 rac-scan.localdomain rac-scan

3. Modify one parameter addn-hosts in default configuration file ‘/etc/dnsmasq.conf’.

cat /etc/dnsmasq.conf | grep addn-hosts
addn-hosts=/etc/scanipaddress

4. Configure resolv.conf file as above steps:

cat /etc/resolv.conf
#domain localdomain
nameserver 127.0.0.1
search localdomain
nameserver 192.168.56.1

5. Protect file from overwritten by host reboot

[root@rac1 ~]# chattr +i /etc/resolv.conf

6. Start the Service of dnsmasq and check nslookup command

service dnsmasq restart
nslookup rac-scan

Advertisements