Solved

NS Records - are they queried in order or randomly?

Posted on 2008-10-07
18
1,256 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
Comment Utility
I am pretty sure they are of equal priortity, and so they round robin.
0
 
LVL 8

Expert Comment

by:sstone55423
Comment Utility
0
 
LVL 1

Author Comment

by:Mango-Man
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
yes
0
 
LVL 8

Accepted Solution

by:
sstone55423 earned 225 total points
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:Mango-Man
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility

> 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
Comment Utility
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
Comment Utility
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
Comment Utility
Do you know - Can I change the grade after I've accepted a solution?
0
 
LVL 40

Expert Comment

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

Expert Comment

by:sstone55423
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article explains how a domain name may be inadvertently appended to all DNS queries. This exhibits as described below. (CODE)And / Or: (CODE) Cause This issue can occur in either of these two scenarios. EITHER 1. A Primary DNS S…
I will assume you are running a non-server version of some sort of Windows throughout this article. There are many flavors of Windows since Windows Server 2000 - 2008, XP Home & Pro, Vista Home & Pro, and Windows 7 Starter, Home, Pro, Ultimate, etc.…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

9 Experts available now in Live!

Get 1:1 Help Now