DNS Server Setup Guide for Oracle RAC Construction (Full Version)

English

This document explains the procedure for constructing a DNS server and configuring clients to meet the requirements of Oracle Real Application Clusters (Oracle RAC) / Grid Infrastructure (GI) in the following mixed OS environment.

  • DNS Server: Oracle Linux 7 (OL7)
  • RAC Nodes: Oracle Linux 8 (OL8)

1. Design Information

ItemSetting ValueRemarks
RoleDNS Server IP192.168.56.18
Domain Nameexample.localDomain for RAC environment
RAC Node 1 (Public)192.168.56.61OL8 (rac-26ai1)
RAC Node 2 (Public)192.168.56.62OL8 (rac-26ai2)
Virtual IP (VIP)192.168.56.63, 64Virtual IP for each node
SCAN IP192.168.56.65, 66, 67Common access IPs (Set of 3)

2. Construction of DNS Server Side (OL7: 192.168.56.18)

2.1 Installing BIND

yum install bind bind-utils -y

2.2 Main Configuration File (/etc/named.conf)

The directory "/var/named"; is a mandatory setting.

vi /etc/named.conf

[Configuration Content]

options {
    listen-on port 53 { 127.0.0.1; 192.168.56.18; };
    directory       "/var/named";
    allow-query     { localhost; 192.168.56.0/24; };

    recursion yes;
    dnssec-enable no;
    dnssec-validation no;

    bindkeys-file "/etc/named.root.key";
    managed-keys-directory "/var/named/dynamic";
    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";
};

zone "example.local" IN {
    type master;
    file "example.local.zone";
};

zone "56.168.192.in-addr.arpa" IN {
    type master;
    file "192.168.56.rev";
};

2.3 Creating the Forward Zone File

For SCAN, ensure that three IPs are registered with the same hostname.

vi /var/named/example.local.zone

[Configuration Content]

$TTL 86400
@   IN  SOA dns-server.example.local. root.example.local. (
        2025062201 ; Serial
        3600       ; Refresh
        1800       ; Retry
        604800     ; Expire
        86400 )    ; Minimum TTL
    IN  NS  dns-server.example.local.

dns-server  IN A   192.168.56.18

; --- Public IP ---
rac-26ai1   IN A   192.168.56.61
rac-26ai2   IN A   192.168.56.62

; --- Virtual IP (VIP) ---
rac-26ai1-vip IN A 192.168.56.63
rac-26ai2-vip IN A 192.168.56.64

; --- SCAN (Register 3 IPs) ---
rac-26ai-scan IN A 192.168.56.65
rac-26ai-scan IN A 192.168.56.66
rac-26ai-scan IN A 192.168.56.67

; --- Private IP (Optional) ---
rac-26ai1-pr IN A  192.168.57.61
rac-26ai2-pr IN A  192.168.57.62

2.4 Creating the Reverse Zone File

Describe PTR records without any omissions.

vi /var/named/192.168.56.rev

[Configuration Content]

$TTL 86400
@   IN  SOA dns-server.example.local. root.example.local. (
        2025062201 ; Serial
        3600       ; Refresh
        1800       ; Retry
        604800     ; Expire
        86400 )    ; Minimum TTL
    IN  NS  dns-server.example.local.

18  IN  PTR dns-server.example.local.
61  IN  PTR rac-26ai1.example.local.
62  IN  PTR rac-26ai2.example.local.
63  IN  PTR rac-26ai1-vip.example.local.
64  IN  PTR rac-26ai2-vip.example.local.
65  IN  PTR rac-26ai-scan.example.local.
66  IN  PTR rac-26ai-scan.example.local.
67  IN  PTR rac-26ai-scan.example.local.

2.5 Permission Settings and SELinux Application

Always re-execute these steps if you delete and recreate the files.

chown root:named /etc/named.conf /var/named/example.local.zone /var/named/192.168.56.rev
chmod 640 /etc/named.conf /var/named/example.local.zone /var/named/192.168.56.rev

restorecon -v /etc/named.conf
restorecon -Rv /var/named

named-checkconf -z /etc/named.conf
systemctl enable --now named
firewall-cmd --add-service=dns --permanent && firewall-cmd --reload

2.6 Checking DNS Server Operation and Status

# 1. Check service status
systemctl status named

# 2. Check detailed BIND operational status
rndc status

# 3. Check listening ports (53/UDP/TCP)
ss -antup | grep :53

# 4. Monitor real-time logs
journalctl -u named -f

3. Configuration of RAC Node Side (OL8 Client)

The following is the recommended procedure for persisting edits to /etc/resolv.conf on OL8.

3.1 Persistence via NetworkManager (nmcli)

Perform this on each node.

# 1. Check active connection names
nmcli connection show

# 2. Register DNS server and search domain
# Replace "Connection Name" with the name confirmed in step 1
nmcli connection modify "Connection Name" ipv4.dns "192.168.56.18"
nmcli connection modify "Connection Name" ipv4.dns-search "example.local"

# 3. Apply changes (This automatically updates /etc/resolv.conf)
nmcli connection up "Connection Name"

3.2 Final Confirmation of Settings

cat /etc/resolv.conf
# Success if "search example.local" and "nameserver 192.168.56.18" exist

4. Pre-installation Final Confirmation Checklist

  • SCAN Round Robin: Does the order of IPs change every time you execute nslookup rac-26ai-scan?
  • Short Name Connectivity: Do you get a response from ping rac-26ai2? (Verification of search settings).
  • Reverse Lookup Match: Does nslookup 192.168.56.65, etc., return the correct hostname?

5. FAQ (Frequently Asked Questions)

Q1: Why are three SCAN IPs necessary? A1: This is an Oracle best practice and a verification item for the Grid Infrastructure installer. Configuring three IPs achieves load balancing and high availability through DNS round-robin during client connections.

Q2: Why shouldn’t I edit /etc/resolv.conf directly? A2: In OL8, NetworkManager manages this file. Therefore, manual settings will be automatically overwritten (erased) during a reboot or network disconnection. Using nmcli saves the settings into the profile, ensuring persistence.

Q3: nslookup works, but ping does not. A3: Check if search example.local is described in /etc/resolv.conf. If it is missing, ping rac-26ai1 without the domain name will fail. Also, check if old entries remain in /etc/hosts, as the hosts: files dns order in /etc/nsswitch.conf may cause failures.

Q4: What happens if I forget to update the DNS server’s serial value? A4: Even if you modify the records, the changes may not be reflected unless you increment the Serial value and restart the service (or run rndc reload).

6. Summary

  • SCAN Configuration: Defining three A records for a single hostname using “DNS Round Robin” is the core of the RAC configuration.
  • Permissions and SELinux: Files under /var/named must have the named group as the owner, and the security context must be set correctly with restorecon; otherwise, named cannot read the files.
  • OL8 Network Management: Mastering nmcli commands for persistence on OL8 clients is the only way to prevent future issues (inability to resolve names after a reboot).

コメント

Copied title and URL