Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I querie ns server on a .NET servers, answers are always in the same order :

dig ns +short

If I don't use .net server anwser is rotated :

dig ns +short
dig ns +short

com. servers seems to work like net. servers (no rotate), but org. servers and all other I tried seems to rotate answers.

Why net. and com. servers don't rotate their answers ?

share|improve this question
up vote 2 down vote accepted

Short answer could be "why should they ?" or "why are the other doing it ?", but what's the fun of a short answer ?

It mainly depends on the software configuration running on the server, BIND has a configuration directive named rrset-order which does just that, for instance, if you have :

rrset-order {order fixed;};

BIND will always return the resource records in the order they are in the zone file.

With :

rrset-order {order random;};

the records will be returned in a random order.

The thing with randomness is that it does not exist in a computer. Operating systems go to a gread deal of effort to create pseudo-randomness by harvesting "random" events like interrupts, network trafic, keyboard or mouse events, and so on.

But the more you call random(3), the less it gives really random values and the more it's results can be predicted.

In our case, the randomness of results to a DNS query, the servers for com. and net. will never (well, they could, but you don't want to mess with the glue) be used to return results for, say,, that's's name servers business, so, it does not hurt to always returns's name servers in the same order, once your recursive name server gets them, it'll use them in a round robin order to make queries anyway.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.