Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Lately, I've seen a few Mac computers that can a) see the wireless network, b) "connect" to the wireless network, and c) receive a valid IP address, yet when a web browser is launched it's stuck in an eternal loading loop, or when the ping utility is used, it returns with a connection timeout.

I've solved these problems in the past by making a new network location, but recently that alone hasn't seemed to fix it immediately. I'll make a new location being sure to hit 'Apply', even going so far as to restart the computer, but none of these things seem to work as I expect them to. Internet connectivity will "magically" return a ways into troubleshooting, and I wish I had a more concrete explanation as to why. Could anyone elaborate on these situations?

share|improve this question
    
Is this always the same network? It could legitimately be that the internet connection is dropping off, rather than your Mac being at-fault. –  Harv Apr 22 '11 at 3:17

2 Answers 2

It sounds like you're having DNS issues. Most Cocoa apps make DNS calls that are handled via mDNSResponder nowadays, so if the mDNSResponder process is having a problem, even traditional unicast DNS lookups will fail. Next time this happens, try...

sudo killall -9 mDNSResponder

...this is sure to kill mDNSResponder. Don't worry, launchd will automatically restart it.

It's possible that whatever was causing mDNSResponder to hang was cleared up by your troubleshooting steps, or maybe you triggered a network configuration change that cause mDNSResponder to reload itself.

There are still a few command-line tools that use traditional Unix DNS resolver libraries that don't leverage mDNSResponder. These include host, dig, and nslookup. Another way to see if it's just mDNSResponder and not DNS in general is to use one of those three tools to do a DNS lookup the next time the problem happens.

I also agree with another user's suggestion to ping a host by IP address. I would recommend that you do...

ping -n 8.8.8.8

...the -n tells ping not to try to do a reverse DNS lookup on the host you're pinging. 8.8.8.8 is a nice memorable IP address for one of Google's publicly-accessible resolving DNS servers.

share|improve this answer
    
Excellent answer here and everywhere else you've posted. I'll hope youre around next time I'm stumped on a networking issue! –  bmike Jul 16 '11 at 20:08

The obvious first thing to check is the routing tables. Next is to check DNS.

Would you fire up network utility and post the netstat info as well as check into traceroute and lookup for a few large sites that you know are generally working.

share|improve this answer
1  
Also try to send a ping to 8.8.8.8. That's Google's public DNS server (great high-uptime memory IP). If you can hit this but can't hit google.com with a ping, you know you're having DNS issues. –  wjl Apr 14 '11 at 3:14

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.