Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been trying to find on how to disable address sorting in named.conf. Basically the issue is, if I have a bunch of A records on round robin in my zone file, and if I request a page from that domain from a machine from that list, it will always return the address of that machine. Example: I have a list of machines in my zone file:

IN A 255.255.255.0
IN A 255.255.255.1
IN A 255.255.255.2 

if I try to connect from any machine I will get a random IP from the list, however if I use machine with IP 255.255.255.1, the dns will always resolve to 255.255.255.1. How do I change this behavior?

share|improve this question
1  
Probably, you have the machine name in your /etc/hosts file. Have you checked this? –  Marco Ramos Apr 13 '11 at 17:28
    
So the response from the DNS includes all records and my machine picks out itself? Makes sense then. I assume to avoid this issue(without changing hosts file on my machine), I would have to somehow make my named service return one record? –  AlRa Apr 13 '11 at 17:47
    
If it is the hosts file, DNS is NEVER queried. No amount of changing the DNS records in bind will make any difference. In some operating systems, you can change the search provider order to list DNS above hosts, or completely exclude the hosts file, but doing so may also come at a price. –  TheCompWiz Apr 13 '11 at 18:23

2 Answers 2

That probably has nothing to do with the DNS server. The "search-order" your machine uses to resolve names, probably does not start with DNS. Typically they will start with the "hosts" file, and then on to other methods... finally ending up with DNS. As this machine probably has an entry in the hosts file to resolve itself, it will always find the entry in hosts first and skip the rest of the lookup process.

share|improve this answer

This probably isn't the server, rather the DNS Client code. It should always prefer a "local" address when one is presented in the list.

share|improve this answer

Your Answer

 
discard

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.