Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On a windows 2003 server I can nslookup www.google.com which returns

Server:  localhost
Address:  127.0.0.1

Non-authoritative answer:
Name:    www.l.google.com
Addresses:  74.125.79.104, 74.125.79.147, 74.125.79.99
Aliases:  www.google.com

I can then ping 74.125.79.104:

Pinging 74.125.79.104 with 32 bytes of data:

Reply from 74.125.79.104: bytes=32 time=16ms TTL=54
Reply from 74.125.79.104: bytes=32 time=32ms TTL=54
Reply from 74.125.79.104: bytes=32 time=15ms TTL=54
Reply from 74.125.79.104: bytes=32 time=15ms TTL=54

Ping statistics for 74.125.79.104:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 15ms, Maximum = 32ms, Average = 19ms

But I cannot ping www.google.com:

Ping request could not find host www.google.com. 
Please check the name and try again.

(this one is different from the other question in that this one has a TLD, it is not a local domain.)

Update: I am running a dns server at localhost (127.0.0.1). Even when I change it to use for example opendns, it still can nslookup hostname and ping ip address, but not ping hostname. So what is wrong?

*Update 2: *

here is the ipconfig /all result:

Windows IP Configuration

   Host Name . . . . . . . . . . . . : SERVER
   Primary Dns Suffix  . . . . . . . : NETWORK.local
   Node Type . . . . . . . . . . . . : Unknown
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : NETWORK.local

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #2
   Physical Address. . . . . . . . . : 00-0F-1F-56-3B-AA
   DHCP Enabled. . . . . . . . . . . : No
   IP Address. . . . . . . . . . . . : 192.168.7.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.7.1
   DNS Servers . . . . . . . . . . . : 127.0.0.1

Update 3:

Thanks everyone for their help and suggestions. I appreciate that.

Ipconfig /flushdns returns: Sucessfully flushed the DNS resolver cache

Ipconfig /displaydns returns:

2.7.168.192.in-addr.arpa
----------------------------------------
Record Name . . . . . : 2.7.168.192.in-addr.arpa.
Record Type . . . . . : 12
Time To Live  . . . . : 0
Data Length . . . . . : 4
Section . . . . . . . : Answer
PTR Record  . . . . . : webserver.mydomainname.com


1.0.0.127.in-addr.arpa
----------------------------------------
Record Name . . . . . : 1.0.0.127.in-addr.arpa.
Record Type . . . . . : 12
Time To Live  . . . . : 0
Data Length . . . . . : 4
Section . . . . . . . : Answer
PTR Record  . . . . . : localhost

Update 4:

Wireshark shows the following:

3   11.540542   208.67.220.220  192.168.7.2 DNS Standard query response A 74.125.79.99 A 74.125.79.104 A 74.125.79.147

6   42.056794   192.168.7.2 192.168.7.255   NBNS    Name query NB WWW.GOOGLE.COM<00>

which is weird: when I ping, it sends a packet to 192.168.7.255 instead of asking the DNS server for an address

Update 5:

This is what netdig had to say:

opcode: Query, status: NoError, id: 42
flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

QUESTION SECTION:
www.google.com.                 IN      A       

ANSWER SECTION:
www.google.com.         86324   IN      CNAME   www.l.google.com.
www.l.google.com.       224     IN      A       74.125.79.99
www.l.google.com.       224     IN      A       74.125.79.104
www.l.google.com.       224     IN      A       74.125.79.147

Query time: 0 ms
Server    : 192.168.7.2:53 udp (192.168.7.2)
When      : 1/6/2011 12:33:50 PM
Size rcvd : 100
share|improve this question

migrated from superuser.com Dec 21 '10 at 7:41

This question came from our site for computer enthusiasts and power users.

    
What does "ipconfig /all" show? –  Matt Dec 20 '10 at 8:26
    
@Matt H It's worth saying what you're looking for from ipconfig /all, otherwise analysis is hidden away in your mind and that's not as useful as stating what you'd be looking for from ipconfig /all. –  barlop Dec 20 '10 at 13:33
    
you could try to wireshark the ping and the nslookup, and compare the results. try to find the packets in which ping tries to resolve the hostname to an ip address (dns uses udp port 53) –  Weltenwanderer Dec 20 '10 at 13:44
    
@Weltenwanderer, thanks. See Update 4 above. –  jao Dec 20 '10 at 17:46
    
@jao its broadcasting a request to resolve the name in the local subnet. i think its the Primary Dns Suffix . . . . . . . : NETWORK.local thats preventing a dns lookup here. check your tcpip settings for the dns suffixes which should be empty –  Weltenwanderer Dec 20 '10 at 18:11
show 2 more comments

2 Answers

up vote 3 down vote accepted

You are using yourself (127.0.0.1) as the DNS... Do you really meant it? nslookup will work if your own machine is running a DNS server service.

Make sure the DNS is set correctly at the network adapter.

share|improve this answer
    
+1 I don't understand why this was down-voted. There is surely a DNS problem with localhost. –  harrymc Dec 18 '10 at 15:56
    
The problem is not DNS. If you read carefully you would've seen that I can nslookup a hostname and that ping to the IP address works. However, pinging to the hostname does not work and accessing the URL in the browser does not work. accessing the URL by IP does work. –  jao Dec 20 '10 at 8:13
1  
I guess most of us read careful enough before we reply here, and if we are not enthusiastic about helping others we won't be here either. Anyways, try ipconfig /flushdns, then ipconfig /displaydns, then try to use netdig and show us the outputs... –  bubu Dec 20 '10 at 10:19
    
thank you so far. I've updated my question with the requested data. however i could not find a command 'netdig' (or netdiag or net diag) –  jao Dec 20 '10 at 13:21
    
google netdig. it's a diagnostic tool for DNS problems –  bubu Dec 20 '10 at 15:51
show 2 more comments

Just curious, have you set the DNS on the server to 127.0.0.1 because you are using a DNS on the server and have set DNS forwarder that point to your ISP's DNS servers?

If that is the case, you can try a test like this. Set the DNS on the servers adapter to point directly to your ISP's DNS servers. At that point you can do a ipconfig /flushdns and / or reboot and try again. You might get some more information that way....

share|improve this answer
    
I've changed the DNS to the ISP's one, however I still have the same problem. –  jao Dec 20 '10 at 15:41
add comment

protected by Tom O'Connor Jul 18 '13 at 21:40

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.