LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-27-2015, 10:02 AM   #1
tesla75
LQ Newbie
 
Registered: May 2013
Posts: 15

Rep: Reputation: Disabled
How is the round-robin resolving acheived in this DNS setup ?


Version: Oracle Linux 6.6

With the help of volunteers in linuxquestions.org, I managed set up DNS for forward and reverse lookups. Special THANKS to Bathory

The domain I am trying to configure : openhex.com
DNS Server IP : 10.194.135.185

This is for Oracle RAC cluster build.
I want the hostname rac-scan.openhex.com to resolve to the following 3 IPs .
10.194.135.82
10.194.135.83
10.194.135.84

This is for the SCAN functionality in Oracle RAC

One of the requirements in resolving is that ; it should resolve in a round-robin fashion. . I managed to acheive it but I don't know how.

Demo:

As you can see below,
the 1st time I did the nslookup, it resolved to 10.194.135.84
the 2nd time I did the nslookup, it resolved to 10.194.135.82
the 3rd time, I did the nslookup, it resolved to 10.194.135.83

This round-robin cycle continues in the same sequence
[root@pravda178 ~]# nslookup rac-scan.openhex.com
Server: 10.194.135.185
Address: 10.194.135.185#53

Name: rac-scan.openhex.com
Address: 10.194.135.84
Name: rac-scan.openhex.com
Address: 10.194.135.82
Name: rac-scan.openhex.com
Address: 10.194.135.83

[root@pravda178 ~]#
[root@pravda178 ~]#
[root@pravda178 ~]# nslookup rac-scan.openhex.com
Server: 10.194.135.185
Address: 10.194.135.185#53

Name: rac-scan.openhex.com
Address: 10.194.135.82
Name: rac-scan.openhex.com
Address: 10.194.135.83
Name: rac-scan.openhex.com
Address: 10.194.135.84

[root@pravda178 ~]#
[root@pravda178 ~]# nslookup rac-scan.openhex.com
Server: 10.194.135.185
Address: 10.194.135.185#53

Name: rac-scan.openhex.com
Address: 10.194.135.83
Name: rac-scan.openhex.com
Address: 10.194.135.84
Name: rac-scan.openhex.com
Address: 10.194.135.82


How is the above mentioned round-robin acheived ? Is it some configuration in /etc/named.conf file or the forward zone file /var/named/openhex.com.zone ?


--- Following are the 2 configuration files I've used.

#### 1. /etc/named.conf

[root@oem12cdns185 etc]# cat /etc/named.conf
options {
listen-on port 53 {127.0.0.1; 10.194.135.185; };
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-recursion { localnets; localhost;};


dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

zone "openhex.com" IN {
type master;
file "openhex.com.zone";
allow-update { none; };
};

zone "135.194.10.in-addr.arpa." IN {
type master;
file "135.194.10.in-addr.arpa";
allow-update { none; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";



### 2. forward zone file
### /var/named/openhex.com.zone

[root@oem12cdns185 etc]#
[root@oem12cdns185 etc]# cat /var/named/openhex.com.zone
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS openhex.com.
;localhost IN A 127.0.0.1 ;;No needed
openhex.com. A 10.194.135.185
pravda178-oravip.openhex.com. IN A 10.194.135.217
pravda179-oravip.openhex.com. IN A 10.194.135.218
rac-scan.openhex.com. IN A 10.194.135.82
rac-scan.openhex.com. IN A 10.194.135.83
rac-scan.openhex.com. IN A 10.194.135.84
 
Old 05-27-2015, 02:17 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
When more then one IP is configure for a host DNS automatically does round robin. Please be aware that if one of these server fails DNS will still continue to send out the ip address as DNS is not aware that the server is down.
 
2 members found this post helpful.
Old 05-28-2015, 03:28 AM   #3
tesla75
LQ Newbie
 
Registered: May 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks LD.
That is some intelligent coding by the BIND developers. Who would have thought that there will be a requirement by which 1 hostname needs to be resolved to 3 IPs and in a Round-robin fashion !

I assume both solaris and AIX are using versions similair to Linux's BIND. For one of our new clients (an IBM Shop), the DNS is configured in an AIX server. We need to build several Oracle RAC clusters. Hope the AIX-equivalent of BIND also resolves in round-robin fashion. If it doesn't, then we need to get the System Admins to configure the DNS in a Linux server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
round robin dns linuxengineer Linux - Server 1 11-16-2010 03:55 AM
round robin dns linuxengineer Linux - Networking 1 11-16-2010 03:54 AM
How can I setup a round robin DNS server? Does bind 9 do it? abefroman Linux - Software 1 01-25-2006 02:20 AM
dns round-robin tzkolinux Linux - Networking 1 12-27-2004 03:49 AM
Round Robin DNS Lucsi Linux - Software 1 07-18-2002 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration