Elementor #13422
DNS Configuration for Oracle SCAN Complete Guide to Single Client Access Name Configuration in Oracle RAC Table of Contents 1. SCAN Overview and Architecture 2. Prerequisites and Requirements 3. DNS Server Configuration 4. Creating DNS Records 5. Verification and Testing 6. Grid Infrastructure Integration 7. Troubleshooting 8. Best Practices 1. SCAN Overview and Architecture Single Client Access Name (SCAN) is a critical component of Oracle Real Application Clusters (RAC) that provides a single network name for clients to access any Oracle database running in a cluster. SCAN eliminates the need for clients to change connection strings when nodes are added to or removed from the cluster. What is SCAN? SCAN is a fully qualified domain name (FQDN) registered in DNS that resolves to multiple IP addresses. By default, Oracle recommends configuring three SCAN IP addresses to provide high availability and load balancing for client connections. Key Benefits Simplified Client Configuration: Single name for all database connections regardless of cluster size High Availability: Multiple IP addresses provide redundancy and failover capability Load Balancing: Automatic distribution of client connections across SCAN listeners Scalability: Add or remove nodes without updating client connection strings Location Transparency: Clients remain unaware of cluster topology changes SCAN Architecture SCAN Architecture Diagram Client Applications → DNS Server → SCAN Name (3 IPs) → SCAN Listeners → RAC Nodes Component Description Quantity SCAN Name Fully qualified domain name (FQDN) 1 per cluster SCAN IP Addresses Virtual IP addresses assigned to SCAN 3 (recommended) SCAN Listeners Oracle listeners running on SCAN IPs 3 (one per SCAN IP) DNS Server Resolves SCAN name to multiple IPs 1 or more (HA) SCAN Resolution Process Client application requests connection to database using SCAN name DNS server resolves SCAN name to 3 IP addresses (round-robin) Client attempts connection to first IP address returned by DNS SCAN listener accepts connection and redirects to appropriate node listener Node listener establishes database connection on local instance If SCAN listener unavailable, client tries next IP address automatically 2. Prerequisites and Requirements Network Requirements Public network configured and operational on all cluster nodes Three available IP addresses in the same subnet as public network IP addresses must not be in use or reserved by other systems Network switches and routers configured to allow SCAN traffic Firewall rules permitting traffic on port 1521 (or custom listener port) DNS Requirements Critical Requirement: DNS server must support round-robin resolution for multiple A records with the same hostname. This is essential for SCAN functionality. DNS server installed and operational (BIND, Microsoft DNS, or other) Forward lookup zone configured for domain Reverse lookup zones configured for IP subnets (recommended) Appropriate permissions to create/modify DNS records DNS server configured in /etc/resolv.conf on all nodes Oracle Grid Infrastructure Requirements Oracle Grid Infrastructure 11.2.0.1 or higher Three SCAN VIP resources will be created during installation Three SCAN listener resources will be created automatically Cluster nodes must have DNS resolution working properly Pre-Configuration Checklist Item Requirement Verification Command DNS Resolution Working DNS on all nodes nslookup google.com Domain Name FQDN decided for SCAN Example: rac-scan.example.com IP Addresses 3 IPs allocated and available ping <ip_address> (should fail) Subnet Match Same subnet as public network ifconfig or ip addr show DNS Server Access Admin credentials Login to DNS management console 3. DNS Server Configuration Supported DNS Servers Oracle SCAN supports any DNS implementation that follows standard DNS protocols. Common implementations include: BIND (Berkeley Internet Name Domain): Most common on Linux/Unix systems Microsoft DNS: Integrated with Windows Active Directory dnsmasq: Lightweight DNS forwarder for smaller deployments PowerDNS: High-performance authoritative DNS server BIND DNS Server Configuration Install BIND (if not already installed) # RHEL/Oracle Linux/CentOS sudo yum install bind bind-utils -y # Ubuntu/Debian sudo apt-get install bind9 bind9utils -y # Verify installation named -v Configure BIND Main Configuration File Edit /etc/named.conf to define zones: # Edit named.conf sudo vi /etc/named.conf # Add or verify these options options { directory “/var/named”; dump-file “/var/named/data/cache_dump.db”; statistics-file “/var/named/data/named_stats.txt”; memstatistics-file “/var/named/data/named_mem_stats.txt”; allow-query { any; }; recursion yes; # Listen on all interfaces listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; # Forward requests for external domains forwarders { 8.8.8.8; 8.8.4.4; }; }; # Define forward lookup zone zone “example.com” IN { type master; file “example.com.zone”; allow-update { none; }; }; # Define reverse lookup zone (for 192.168.1.0/24) zone “1.168.192.in-addr.arpa” IN { type master; file “192.168.1.rev”; allow-update { none; }; }; Set Proper Ownership and Permissions # Set ownership sudo chown named:named /etc/named.conf # Set permissions sudo chmod 640 /etc/named.conf # Verify configuration syntax sudo named-checkconf /etc/named.conf Microsoft DNS Server Configuration Access DNS Manager Open Server Manager on Windows Server Navigate to Tools → DNS Connect to your DNS server Expand Forward Lookup Zones Configure Zone Right-click Forward Lookup Zones and select New Zone Select Primary Zone and click Next Enter zone name (e.g., example.com) and click Next Create new zone file and click Next Allow dynamic updates if required or select Do not allow dynamic updates Click Finish Round-Robin Configuration: Microsoft DNS enables round-robin by default. Verify this setting in DNS server properties under the Advanced tab. Ensure Enable round robin is checked. 4. Creating DNS Records Planning SCAN Configuration Parameter Example Value Description SCAN Name rac-scan Hostname portion of FQDN Domain example.com DNS domain name FQDN rac-scan.example.com Complete SCAN name SCAN IP 1 192.168.1.201 First SCAN IP address SCAN IP 2 192.168.1.202 Second SCAN IP address SCAN IP 3 192.168.1.203 Third SCAN IP address BIND DNS – Forward Zone Configuration Create Forward Zone File # Create zone file sudo vi /var/named/example.com.zone # Add the following content $TTL 86400 @ IN SOA ns1.example.com. admin.example.com. ( 2024011101 ; Serial (YYYYMMDDNN) 3600 ; Refresh (1 hour) 1800 ; Retry (30 minutes) 604800 ; Expire (1 week) 86400 ) ; Minimum TTL (1 day) ; Name server records @ IN NS ns1.example.com. ns1 IN A 192.168.1.10 ; SCAN records (critical for Oracle RAC) rac-scan IN A 192.168.1.201 rac-scan IN A 192.168.1.202 rac-scan IN A 192.168.1.203 ; Individual node records rac1 IN A 192.168.1.101
