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
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.
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....