Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Networking > How does Mac OS X deal with DNS server queries?

How does Mac OS X deal with DNS server queries?
Thread Tools
Eug
Clinically Insane
Join Date: Dec 2000
Location: Caught in a web of deceit.
Status: Offline
Reply With Quote
Feb 7, 2012, 01:59 AM
 
I used to think that the manually specified DNS server addresses were queried in the order specified in the network configuration.

For example, my three DNS servers are:

Google: 8.8.4.4
295.ca: 208.72.120.204
OpenDNS: 208.67.222.222

I used to assume that all DNS queries would go to Google first, and then if that fails, to 295.ca, etc.

However, this page suggests they're all used equally.

Why? Also, how long does it wait before it consider a query to have failed?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 7, 2012, 11:28 AM
 
DNS lookups in OS X are completely messed up.

It used to be that /etc/hosts was respected first (as it should be), this changed at some point but only for certain apps. This could be fixed in 10.7.3, it seems at least improved, but I'm not certain of this.

I think the server order is round robin. The overall timeout value depends on several factors. If you are trying to get a certain result I'd rely on your /etc/hosts file for that, assuming this is indeed fixed in 10.7.3.
     
Cold Warrior
Moderator
Join Date: Jan 2001
Location: Polwaristan
Status: Offline
Reply With Quote
Feb 7, 2012, 08:12 PM
 
The article seems correct for 10.6. I recall doing some packet capture to see what dns was doing. It generally respected my manually input choices but would use other ones (e.g., dhcp-supplied) during high volume lookups.

I just tested 10.7 and it does the same thing. You can see the transition from google dns (first manually input dns) to opendns (second).

Attached Images
File Type: png dns.png (80.0 KB, 307 views)
     
   
 
Forum Links
Forum 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 On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:56 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,