Configure Dnsmasq for Oracle Linux for RAC scan address Configured

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarAshiwini
  • 12 Jun, 2024
  • 0 Comments
  • 1 Min Read

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.

# Public
192.168.56.71 node1.localdomain node1
192.168.56.72 node2.localdomain node2
# Private
192.168.10.1 node1-priv.localdomain node1-priv
192.168.10.2 node2-priv.localdomain node2-priv
# Virtual
192.168.56.81 node1-vip.localdomain node1-vip
192.168.56.82 node2-vip.localdomain node2-vip
# SCAN
192.168.56.91 node-scan.localdomain node-scan
192.168.56.92 node-scan.localdomain node-scan
192.168.56.93 node-scan.localdomain node-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 node-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 node-scan
[root@node1 ~]# nslookup node-scan
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: node-scan.localdomain
Address: 192.168.56.91
Name: node-scan.localdomain
Address: 192.168.56.92
Name: node-scan.localdomain
Address: 192.168.56.93

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.91 node-scan.localdomain node-scan
192.168.56.92 node-scan.localdomain node-scan
192.168.56.93 node-scan.localdomain node-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@node1 ~]# chattr +i /etc/resolv.conf
6. Start the Service of dnsmasq and check nslookup command

service dnsmasq restart

nslookup rac-scan