Solved

NS Records - are they queried in order or randomly?

Posted on 2008-10-07
18
1,277 Views
Last Modified: 2012-05-05
Hi all,

I'm trying to find the answer to a fairly simple question ( I think its simple ) - NS Records - are they queried in order or randomly?

For example, lets say a DNS query comes through for my domain, four nameservers are listed:
ns1.myDomain.com
ns2.myDomain.com
ns3.myDomain.com
ns4.myDomain.com

Will ns2, ns3 and ns4 only be queried if ns1 is down?

I'd remember reading that it was random and this method could be used to provide simple load balancing for the DNS queries.

Thanks in advance!
0
Comment
Question by:Mango-Man
  • 7
  • 6
  • 4
  • +1
18 Comments
 
LVL 8

Expert Comment

by:sstone55423
ID: 22660716
I am pretty sure they are of equal priortity, and so they round robin.
0
 
LVL 8

Expert Comment

by:sstone55423
ID: 22660738
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22660804
Hi both,

Thanks for the responses - I may be wrong here but doesn't Round Robin ( and the link sstone55423 sent ) apply to HOST records within a domain?  ( so provide load balancing for the servers the host record resolves to as opposed to the actual nameserver them selves? )

What I'm trying to determine is if I have two name servers thus:

ns1.myDomain.com
ns2.myDomain.com

But ns2 is on a fairly poor internet connection, are 50% of the queries going to get a poor response OR is that name server only going to be queried if NS1 is down.

As far as I know this will not be specific to a platform ( Windows, BIND, etc ) because any flavour server returns all nameservers so it must be down to the querying server to choose from the list of options.

Or am I barking up the wrong tree completely?

I've upped the pointage of the question!
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22660843
wheb answer is returned back to requester it is rotated by replying server in round robin fashion
requester will use the first one in the list unless it is not responding or TTL expire
0
 
LVL 8

Expert Comment

by:sstone55423
ID: 22660867
Omar:  Which one is it?  You said it is rounbd robin, and then you said it was not.
 
I am pretty sure that NS record is round robin.  MX records are prioritized, and only round robin if they have the same priority.
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22660878
Thanks omarfarid,

So basically the DNS servers that a requestor needs to query (for A, CNAME, MX resolution, etc)  are returned in a random order?

Sorry - just trying to get a definitive simply answer!

Thanks again
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22660907
yes
0
 
LVL 8

Accepted Solution

by:
sstone55423 earned 225 total points
ID: 22660913
No, not random order, round robin.  
ns1.myDomain.com
ns2.myDomain.com
gives ns1, ns2, ns1, ns2, ns1, ns2, etc.
 
For three ns, it would be ns1, ns2, ns3, ns1, ns2, ns3, etc.
I gave references supporting that on botj Windows and Bind DNS servers (about 98% of all DNS servers)
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 225 total points
ID: 22661004
the responding dns server will use round robin while replaying to requesters queries which is random for the requesters.

if for example requester 1 request 1st time, reply may be sent like ns1, ns2, ns3
then if requester 2 request , then reply sent like ns2, ns3, ns1
then if requester 1 request 2nd time, reply sent like ns3, ns1, ns2

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 1

Author Comment

by:Mango-Man
ID: 22661025
sstone55423,

Thanks - I did see you references but the Microsoft one specifically seems to refer to Round Robin load balancing for host records ( which is a given ); ie:

multihomed   IN  A  10.0.0.1
multihomed   IN  A  10.0.0.2
multihomed   IN  A  10.0.0.3

My question is regarding the balancing between the name servers before you get to that point.
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22661036
Ultimately however I have my answer - the secondary DNS server is just as likely to get queried as the primary.

Thanks everyone!!
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22661065
Actually - just to clarify sstone55423,

You do know that I'm not talking about alias records right?

Sorry all - I'm giving advice to a client based on this so I need to be sure.

I'm upping the points and will split accordingly.
0
 
LVL 70

Assisted Solution

by:Chris Dent
Chris Dent earned 50 total points
ID: 22661110

> You do know that I'm not talking about alias records right?

Alias records, that is CNAME records, cannot use Round Robin. Use of more one CNAME for the same resource is illegal.

But it is completely right to say that Round Robin applies to A Records, NS Records, and quite a lot of others (including PTR, SRV, TXT, etc, etc).

Chris
0
 
LVL 8

Expert Comment

by:sstone55423
ID: 22661539
We all endeavor to get that "A" grade.  The "B" grade should only be given if someone answers only a portion of your question.  In this question it would seem that your question was answered completely, and with references to support the answer.
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22661637
Sorry sstone55423,

I'm haven't used EE since the grading system came in so I'm not sure what the standard is - I graded based purely on what I though reflected how easy was to get the answer.

I will re-think my grading in future.
0
 
LVL 1

Author Comment

by:Mango-Man
ID: 22661643
Do you know - Can I change the grade after I've accepted a solution?
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22662072
you can request through the community zone to reopen the question and then change grade
0
 
LVL 8

Expert Comment

by:sstone55423
ID: 22662690
I apologize, I didn't mean to give you a difficult time.  I meant it more as a gentle nudge.  It is not that big of a deal for one isolated support event.  Good luck with EE in the future, I hope that I will be able to assist you then.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DNS on-premise and on-cloud 15 118
Which domain should I use? 3 51
Sharepoint 2012 site not live after migration 7 55
Windows Server DNS Recursion and Forwarders 12 90
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now