On my local Ubuntu 10.04 dev machine, if I do a wget for a web address such as "wget <http://www.google.com>", it gets stuck on "Resolving www.google.com" for up to 30 seconds before the response is received. If I type www.google.com into a browser, the response is near instant. 

I have a similar experience using urllib.urlopen() in python, and file\_get\_contents() in php.

The reason I want to fix this issue is for testing code that accesses web services on my local dev machine (web service requests always seem to take up to 30 seconds which makes development slow and painful)

Any clues as to what might be causing this?
How can I diagnose the problem?