Can ping IP address and nslookup hostname but cannot ping hostname

Posted by jao on Server Fault See other posts from Server Fault or by jao
Published on 2010-12-18T09:42:58Z Indexed on 2010/12/21 7:55 UTC
Read the original article Hit count: 578

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

© Server Fault or respective owner

Related posts about networking

Related posts about windows-server-2003