DNS Issues - MacbookAir running Snow Leopard

It seems like it has been since the update to snow leopard when my dns issues started, but I'm not quite sure that is the problem.

I have a MBA, so all of my networking is done over my Wireless(AirPort)

I can connect to ANY Wireless Networks fine, grab a DHCP address just fine, and also grab 2/3 DNS servers from the DHCP server just fine.

My issue is that at random intervals my MBA will stop resolving addresses. It can continue to ping out to a DNS server via it's IP address, but will have a connection timeout on resolving the address for roughly 45 seconds. When the 45 seconds is up, it will begin to resolve addresses again. I have poked around google and found that it could be due to DNS sever priorities in Snow Leopard using the bottom DNS first instead of the top. I ruled out that issue by adding on one static DNS server (4.2.2.1)in my network configurations manually.

This happens on every network I am connected to that has a gateway to the internet. I have not tried to resolve local names on a local network, but I have tried resolving 'normal' addresses.

For now, I'm writing this post via remote desktop (windows machine) from my MBA with a static IP inserted as the address because if I stick a address that needs resolved first, every 3-10 minutes it will freeze and won't resolve the name, lose the connection until it can resolve the names again.

I have posted what I thought might help someone else diagnose the issue, because I am stump. Please take a look at my testing outputs here:

http://www.oregonstate.edu/~hillchri/dns

Check out the net testout.txt is where I did the following bash script:

#!/bin/bash
for i in {1..5000}
do
echo $(date)
ping -c 1 4.2.2.1 | grep ms
echo "nslookup www.google.com"
nslookup www.google.com
echo "nslookup www.yahoo.com"
nslookup www.yahoo.com
echo "dig @4.2.2.1 google.com"
dig @4.2.2.1 google.com
echo "------------------------------------------------"
done

Message was edited by: chillconsulting

Macbook Air, Mac OS X (10.3.x)

Posted on Apr 7, 2010 8:42 AM

Reply
16 replies

Apr 8, 2010 1:10 AM in response to chillconsulting

You might be interested in Google's new app called namebench. It hunts out the fastest DNS servers in your are. I have been running it about once or twice a week and each time it suggests DNS servers that it reports as 8 to 23 percent faster than my currently set DNS servers.

http://code.google.com/p/namebench/

Try running it. It takes about 5-8mins to complete. Then take the 3 DNS servers it suggests and add them to the top of your DNS list in Network Prefs --> Airport --> Advanced --> DNS.

Apr 11, 2010 11:03 PM in response to Glenn Carter

Glenn, I tried out namebench and enjoyed it for awhile and seemed to resolve names just fine for a couple days, but now Mac OSX has completely stopped resolving names except for nslookup and dig. I no longer can use any web browsers unless I specify the actual IP address of the website. I feel like this type of issue is unbelievable.. and I was always a PC guy until I feel in love with my Macbook - but now having these issues makes me want to move back to PC in the worst way. I'm a computer science major and cannot even figure out my own network issues, this is way pathetic - anyone have any ideas? I don't want to pay the single incident charge or whatever it is... that's ridiculous...

I'm using a MBA on Mac OSX 10.6.3:

chris-hills-macbook-air-4:~ chill$ dig www.google.com

; <<>> DiG 9.6.0-APPLE-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3893
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com. IN A

;; ANSWER SECTION:
www.google.com. 204298 IN CNAME www.l.google.com.
www.l.google.com. 214 IN A 72.14.213.105
www.l.google.com. 214 IN A 72.14.213.106
www.l.google.com. 214 IN A 72.14.213.104
www.l.google.com. 214 IN A 72.14.213.103
www.l.google.com. 214 IN A 72.14.213.147
www.l.google.com. 214 IN A 72.14.213.99

;; Query time: 21 msec
;; SERVER: 68.87.69.150#53(68.87.69.150)
;; WHEN: Sun Apr 11 22:59:53 2010
;; MSG SIZE rcvd: 148


ping www.google.com
ping: cannot resolve www.google.com: Unknown host

chris-hills-macbook-air-4:~ chill$ traceroute www.google.com
traceroute: unknown host www.google.com

Apr 11, 2010 11:45 PM in response to chillconsulting

this is what I found in the System log, which is my google search box trying to hit the internet:

Apr 11 23:42:59 chris-hills-macbook-air-4 Quick Search Box[249]: httpFetcher failed: Error Domain=NSURLErrorDomain Code=-1009 UserInfo=0x17a3b640 "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=0x18c0d3d0 "This computer’s Internet connection appears to be offline.") http://clients1.google.com/complete/search?complete=5&client=qsb-mac&types=t&hjs on=t&hl=en&q=%2Fvar%2Flog&spell=t&nav=1

Apr 11, 2010 11:53 PM in response to chillconsulting

I also found this while running software update... remember I have a constant internet connection... (I am using a remote desktop with a static ip right now because I cannot do anything with mac osx)

Software Update[6988]: Error Domain=NSURLErrorDomain Code=-1009 UserInfo=0x10016fa20 "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=0x100170b80 "This computer’s Internet connection appears to be offline.")

Apr 12, 2010 12:16 AM in response to Glenn Carter

Glenn,

I have done the assist me button before, but for the sake of argument I did re-did it again. The ISP light shows up green, but the internet and server part fail. However, I still have a constant internet connection... otherwise I would not be able to write this very message. It's just that normal resolving does not work outside of dig and nslookup.

Chris

Apr 12, 2010 12:24 AM in response to chillconsulting

Here is a thought Chris...Where are you putting the DNS #s?

Mac OS X defaults to looking at the DNS # entered in Network Prefs --> Airport --> Advanced --> DNS (This is where I have a comprehensive list of about 12 different DNS servers listed). Click "Apply" if you have made any changes.

However, it doesn't hurt to also have a couple of them added to Airport Utility --> Manual Setup --> Internet --> TCP/IP (I have 2 entered here since there is only room for 2). Click "Update" if you have made any changes.

Apr 12, 2010 12:49 PM in response to chillconsulting

Did you read the note at http://support.apple.com/kb/HT4030 ?

As of Snow Leopard, Apple does not directly use BIND but the utilities linked with BIND (such as dig and nslookup) still do:

Mac OS X NOTICE
The nslookup command does not use the host name and address resolution or the DNS query routing
mechanisms used by other processes running on Mac OS X. The results of name or address queries
printed by nslookup may differ from those found by other processes that use the Mac OS X native name
and address resolution mechanisms. The results of DNS queries may also differ from queries that use
the Mac OS X DNS routing library.

http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/m an1/nslookup.1.html


Instead, DNS lookup in commands such as ping and for applications such as Safari is handled by mDNSResponder, and the Apple Tech Note listed above describes how it works:

In Mac OS X v10.6 and later, the search order of DNS servers specificed in Network preferences is dynamic, so that servers that don't respond are moved to the end of the search order.


and:

In Mac OS X v10.6, the default DNS server searching behavior is that when a server does not return a result or when it returns SERV_FAIL for a query, and other servers are available to query, the server is temporarily disabled in the search order.

Jun 1, 2010 12:45 PM in response to chillconsulting

I'm having similar problems with my Macbook Air. Running Snow Leopard 10.6.3. Problems occur when I'm plugged in via Ethernet USB Dongle.

For no good reason, about 1-4 hours after startup in the morning, DNS seems to fail. I have tried the mDNSresponder kill script, and that had worked previously after sleep, however this seemed to be resolved in the most recent apple update.

Still having problems, but they only exist for about an hour. Then connectivity is restored.

Very strange. Any help is appreciated.
Steve

Jun 25, 2010 5:16 AM in response to chillconsulting

Hi,
Your problem is related to how applications resolve using mDNSResponder (not the dns). I tried a simple test, put "74.125.79.99 www.google.co.uk" in /etc/hosts and then open this url in your browser, it will work (although /var/log/system.log says your computers not connected to internet).

I am still trying to figure out why mDNSResponder can't communicate and resolve through the dns, but in the meanwhile, stop the mDNSResponder daemons and your internet will start working fine. (This is a workarround, which worked for me).

In terminal:

1. luanchctl
2. stop com.apple.mDNSResponder
3. quit

I am new to osx's world, therefore, if doing the above causes any issues, do let me know as well.

cheers
technocore

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

DNS Issues - MacbookAir running Snow Leopard

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.