Page 1 of 1

DNS not working on Windows XP guest

Posted: 6. Dec 2009, 10:47
by vb_newbie
Dear forum,
My Windows-xp guest is unable to resolve DNS requests. For example, when I type http://www.google.com on any browser (IE, Chrome), the site does not open. However, if I type the equivalent IP address, the site does open. I did go through the FAQ...

Host information
---------------------------
OS: Fedora 11
/etc/resolv.con: nameserver 192.168.1.1
[linuxsri@srilaptop ~]$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:1F:3A:16:11:BA
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0

VirtualBox version 3.0.12
----------------------------

Guest information
----------------------------
OS: Windows XP SP-3

Here are somethings I tried at the command prompt:

C:\Documents and Settings\Sriram>ipconfig /all
Windows IP Configuration

Host Name . . . . . . . . . . . . : windows
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . :
Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 T Server Adapter
Physical Address. . . . . . . . . : 08-00-27-83-2C-76
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.0.2.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2
DHCP Server . . . . . . . . . . . : 10.0.2.2
DNS Servers . . . . . . . . . . . : 198.168.1.1
Lease Obtained. . . . . . . . . . : Sunday, December 06, 2009 1:16:33 P

Lease Expires . . . . . . . . . . : Monday, December 07, 2009 1:16:33 P

C:\Documents and Settings\Sriram>nslookup http://www.google.com
*** Can't find server name for address 192.168.1.1: Non-ex
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1

Non-authoritative answer:
Name: http://www.l.google.com
Addresses: 209.85.231.104, 209.85.231.147, 209.85.231.99
Aliases: http://www.google.com

C:\Documents and Settings\Sriram>tracert http://www.google.com
Unable to resolve target system name http://www.google.com.

Network information
-------------------------------
Host connects to ADSL wireless router via DHCP.
And the host DNS server 192.168.1.1 correctly shows up on the guest.
C:\Documents and Settings\Sriram>tracert 192.168.1.1

Tracing route to Host_DNS_Server [192.168.1.1]
over a maximum of 30 hops:

1 1 ms <1 ms <1 ms 10.0.2.2
2 502 ms 2 ms 2 ms Host_DNS_Server [192.168.1.1]

To state the obvious, I would love to have the websites opened by name :). Any help appreciated.

Re: DNS not working on Windows XP guest

Posted: 6. Dec 2009, 13:04
by MarkCranness
vb_newbie wrote:Non-authoritative answer:
Name: http://www.l.google.com
Addresses: 209.85.231.104, 209.85.231.147, 209.85.231.99
Aliases: http://www.google.com
That proves that DNS lookup does occasionally work: nslookup gave you an IP for www.google.com (I don't know how it worked with a URL though... read below.)
vb_newbie wrote:C:\Documents and Settings\Sriram>nslookup http://www.google.com
*** Can't find server name for address 192.168.1.1: Non-ex
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1
Hmmm. This means that it didn't work for 192.168.1.1... The first thing nslookup.exe does is a reverse DNS lookup of the nameserver IP, ON that same nameserver.
vb_newbie wrote:C:\Documents and Settings\Sriram>tracert 192.168.1.1
Tracing route to Host_DNS_Server [192.168.1.1]
over a maximum of 30 hops:
1 1 ms <1 ms <1 ms 10.0.2.2
2 502 ms 2 ms 2 ms Host_DNS_Server [192.168.1.1]
The first thing that tracert does with an IP is a reverse lookup, and in this case it WORKED for 192.168.1.1

So, DNS lookup is flakey.
DNS for IE and firefox is cached in the dnsclient service, which will cache a negative DNS lookup for some time, so if it doesn't work once for IE that's it for a while: no connection.

Sorry I don't have suggested fix for you...

I note that the forum mangled your www.google.com to -> http://www.google.com ... as it did for me.

Re: DNS not working on Windows XP guest

Posted: 6. Dec 2009, 15:04
by Hachiman
vb_newbie wrote: C:\Documents and Settings\Sriram>nslookup http://www.google.com
*** Can't find server name for address 192.168.1.1: Non-ex
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1
nslookup tries to find "http://www.google.com" but not http://www.google.com as it probably supposed.

Code: Select all

nslookup http://www.google.com
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find http://www.google.com: NXDOMAIN

Code: Select all

nslookup www.google.com
Server:         192.168.1.1
Address:        192.168.1.1#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 74.125.77.147
Name:   www.l.google.com
Address: 74.125.77.99
Name:   www.l.google.com
Address: 74.125.77.104

Re: DNS not working on Windows XP guest

Posted: 7. Dec 2009, 14:32
by MarkCranness
Hachiman wrote:nslookup tries to find "http://www.google.com" but not http://www.google.com as it probably supposed.
vb_newbie entered in the domain name correctly (without http://) , but the forum auto-adds the 'http://' on the front, making it look like vb_newbie is entering strange parameters, but he is not.

Re: DNS not working on Windows XP guest

Posted: 10. Dec 2009, 10:10
by Hachiman
MarkCranness wrote:
Hachiman wrote:nslookup tries to find "http://www.google.com" but not http://www.google.com as it probably supposed.
vb_newbie entered in the domain name correctly (without http://) , but the forum auto-adds the 'http://' on the front, making it look like vb_newbie is entering strange parameters, but he is not.
so probably I need [http://www.virtualbox.org/wiki/Network_tips pcap file] and log. vb_newbie, could you please attach log here and send pcap file to me vasily _dot_ levchenko _at_ Sun _dot_ COM?

Re: DNS not working on Windows XP guest

Posted: 11. Dec 2009, 02:26
by vb_newbie
Log file attached.

Thank you.

Re: DNS not working on Windows XP guest

Posted: 11. Dec 2009, 14:44
by mightyteegar
I would just change your DNS servers to 4.2.2.1 and 4.2.2.2.

Re: DNS not working on Windows XP guest

Posted: 12. Dec 2009, 03:38
by vb_newbie
Mightyteegar,
Did you refer to the guest DNS or the host DNS?