Try resetting your router. Some folks have reported intermittent problems connecting after a Snow Leopard install. Resetting the router seems to have solved the problem for most.

Regards.

The problem seems to have cleared by itself. My *router* is an Ubuntu server. My iMac uses the Ubuntu server for its primary DNS and my firewall (ipCop) as its secondary. If the problem comes up again, I reboot both and report back.

I'm running the same setup; I have a Linux DNS server that serves out internal IP addresses for my own domains, and I have my wireless router configured to broadcast that as the primary DNS server, and my ISP-supplied DSL router as the secondary server.

Under Snow Leopard, almost universally, requests to my domains would end up getting the external IP address rather than the internal one. I deleted the secondary DNS server from my wireless router configuration, so that my Snow Leopard machines only get one DNS server supplied, the internal one. That fixed the problem, but it would be nice to be able to configure my backup DNS server again.

I am having the same problem. I upgraded my MacPro and my MacBook and they are both the same. My Primary internal dns is run off a xServe and secondary is my Smoothwall Firewall. I have restarted both, and the issue remains.

I've seen this broken DNS situation on a number of machines upgraded to SL, on various kinds of home and corporate-style networks. It's definitely a bug in SL.

The symptom that I see is simply that a dig will work on a DNS name just fine, returning the proper IP address. However any other command that uses the DNS name (curl, ping, any GUI app like Safari, etc) will claim that the DNS name won't resolve. Obviously bogus and a bug.

I tried various things, including dscacheutil -flushcache, fooling with the network settings, Locations, etc, and some would provide a temporary workaround, usually with some disruption.

However, I happened across a Parallels support topic that provided what seems like a sure-fire workaround, either temporary or longer-lasting, until Apple fixes this bug.

The basic workaround is to issue the command sudo killall mDNSResponder at the Terminal prompt when this issue occurs, and all starts working properly.

I noticed this same exact problem on my MacPro yesterday. It was never an issue before 10.6. Changing the ttl on the DNS server fixed it for me (not much help if you don't have access to do that).

Here's the deal - one of our networks at work had ttl's of 5256000 seconds. I had trouble browsing to web servers on that network. Most other addresses worked fine, but had much lower ttl's. I asked our DNS administrator to adjust the ttl on one problem address down to 604800 and suddenly the problem is gone (for that one address). Then I had him change all records to be no more than 604800 (an arbitrary number on my part, 7 days vs 60 before). It seems totally fixed.

If you're seeing this on a home network, check if your router is doing dns caching or anything like that. If possible adjust the ttl or turn off the DNS caching and see if that fixes it.

To check if maybe this is your problem, use Network Utility to lookup the name. You'll see a line like this:
myserver.me.com 43200 IN A 10.10.10.15
That 43200 is the ttl (time to live, in seconds). I know from experience that 5256000 is too high an causes problems in SL, and that 604800 does work. Where exactly it breaks I'm not sure.

I noticed this same exact problem on my MacPro yesterday. It was never an issue before 10.6. Changing the ttl on the DNS server fixed it for me (not much help if you don't have access to do that).

Here's the deal - one of our networks at work had ttl's of 5256000 seconds. I had trouble browsing to web servers on that network. Most other addresses worked fine, but had much lower ttl's. I asked our DNS administrator to adjust the ttl on one problem address down to 604800 and suddenly the problem is gone (for that one address). Then I had him change all records to be no more than 604800 (an arbitrary number on my part, 7 days vs 60 before). It seems totally fixed.

If you're seeing this on a home network, check if your router is doing dns caching or anything like that. If possible adjust the ttl or turn off the DNS caching and see if that fixes it.

To check if maybe this is your problem, use Network Utility to lookup the name. You'll see a line like this:
myserver.me.com 43200 IN A 10.10.10.15
That 43200 is the ttl (time to live, in seconds). I know from experience that 5256000 is too high an causes problems in SL, and that 604800 does work. Where exactly it breaks I'm not sure.

I'm interested to hear if this fixes anyone else's problems.

Thanks for the hint. Same problem with my Macbook Pro after upgrade. Aside from sleep, applications will not resolve local domain hostnames after a few minutes after boot. Disabling and renabling DHPC in Snow Leopard would cure this problem until a few minutes later and same problem occurs.

Seems like Snow Leopard is not respecting DNS ttl value of 0 by not querying the DNS server? I use DNSMasq (in a dd-wrt router) and that is the ttl default for local domain hostnames. Use "dig myhostname any" to confirm. I modified DNSMasq ttl to 1 second by adding this option:
local-ttl=1

and I no longer experience this problem. I hope this information can help someone.

Thanks for the hint. Same problem with my Macbook Pro after upgrade. Aside from sleep, applications will not resolve local domain hostnames after a few minutes after boot. Disabling and renabling DHPC in Snow Leopard would cure this problem until a few minutes later and same problem occurs.

Seems like Snow Leopard is not respecting DNS ttl value of 0 by not querying the DNS server? I use DNSMasq (in a dd-wrt router) and that is the ttl default for local domain hostnames. Use "dig myhostname any" to confirm. I modified DNSMasq ttl to 1 second by adding this option:
local-ttl=1

and I no longer experience this problem. I hope this information can help someone.

never mind. my MBP slept overnight, and the problem is occuring again. urgh! i should have never upgraded to Snow Leopard.

This was extremely frustrating for me as well. I have two Macs in the house, a Mini and MacBook. The Mini had no problems, but the MacBook I was about ready to toss out the window. I was able to fix it just a few days ago (waited to post just to make sure that it was indeed fixed).

My Setup:
My primary DNS is running BIND on a Fedora 11 box, and I'd previously had my internet router as a secondary DNS. Both being pushed out via DHCP from that same Fedora 11 box.

On a whim I removed the internet router as a secondary DNS, so that I only had my BIND DNS from the Fedora 11 box being pushed out via DHCP. That seems to have done the trick.

I don't know the ultimate root cause, or if this solution may work for anyone else, but figured I'd pass it along for anyone else that landed here.

I'm having the same problems here on my 10.6.2 white Macbook, DNS stops working for my Airport card every now and then:
- it only happens for the Airport card (not the wired network card) => it's not a networking problem per se
- it happens shortly after waking, but can come back after "fixing" it at any time
- Disabling and reenabling the wireless card does help solving it (not permanently though)
- it happens when I use my router as DNS server as well as when I manually enter my ISP's, the OpenDNS or Google's DNS servers => it's not a problem with my router/home network
- connecting to a server based on the IP works like a charm => seems to be limited to DNS
- using dig (and the like) returns no result (timeout) => wtf?
- no other computer (Linux/Windows/iPhone) are affected

I thought about reinstalling SL, but then again I get the feeling that it isn't some sort of misconfiguration, but might be a bigger problem as so many of you guys are affected

I'm having the same problems here on my 10.6.2 white Macbook, DNS stops working for my Airport card every now and then:
- it only happens for the Airport card (not the wired network card) => it's not a networking problem per se
- it happens shortly after waking, but can come back after "fixing" it at any time
- Disabling and reenabling the wireless card does help solving it (not permanently though)
- it happens when I use my router as DNS server as well as when I manually enter my ISP's, the OpenDNS or Google's DNS servers => it's not a problem with my router/home network
- connecting to a server based on the IP works like a charm => seems to be limited to DNS
- using dig (and the like) returns no result (timeout) => wtf?
- no other computer (Linux/Windows/iPhone) are affected

I thought about reinstalling SL, but then again I get the feeling that it isn't some sort of misconfiguration, but might be a bigger problem as so many of you guys are affected

Hope there's a fix for that soon!
Holger

Have you ever got fix to this problem, my wifes mac mini is exactly the same. It looses name resolution also. I can ping things by IP and stuff but no DNS lookups work. If I turn off the airport and then turn it back on it fixes the problem, but its only temporary.