DNS not working on Windows XP guest

Discussions about using Windows guests in VirtualBox.
Post Reply
vb_newbie
Posts: 14
Joined: 7. Oct 2008, 20:56

DNS not working on Windows XP guest

Post 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.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: DNS not working on Windows XP guest

Post 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.
Hachiman
Posts: 94
Joined: 18. Dec 2008, 21:04
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Solaris, NetBSD

Re: DNS not working on Windows XP guest

Post 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
--
Kind regards
Sr. Software Engineer
Oracle Corporation
Vasily Levchenko

PS. Happy VBoxing.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: DNS not working on Windows XP guest

Post 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.
Hachiman
Posts: 94
Joined: 18. Dec 2008, 21:04
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Solaris, NetBSD

Re: DNS not working on Windows XP guest

Post 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?
--
Kind regards
Sr. Software Engineer
Oracle Corporation
Vasily Levchenko

PS. Happy VBoxing.
vb_newbie
Posts: 14
Joined: 7. Oct 2008, 20:56

Re: DNS not working on Windows XP guest

Post by vb_newbie »

Log file attached.

Thank you.
Attachments
VBox.log
Log file DNS not working on Windows Guest
(60.19 KiB) Downloaded 30 times
mightyteegar
Posts: 4
Joined: 10. Dec 2009, 16:06
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Windows 7 Ultimate 32-bit, Debian Lenny, Ubuntu Server

Re: DNS not working on Windows XP guest

Post by mightyteegar »

I would just change your DNS servers to 4.2.2.1 and 4.2.2.2.
vb_newbie
Posts: 14
Joined: 7. Oct 2008, 20:56

Re: DNS not working on Windows XP guest

Post by vb_newbie »

Mightyteegar,
Did you refer to the guest DNS or the host DNS?
Post Reply