NAT network adapter is not working

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Platen
Posts: 4
Joined: 24. Sep 2009, 22:27
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

NAT network adapter is not working

Post by Platen »

I use VirtualBox for a couple of months and it works fine for me. I use VirtualBox 3.0.6 with a WindowsXP VM and a Debian Lenny host with a 2.6.30 backport kernel.

For networking I use network bridges and host-only adapters without any problems. Due to a specific requirement a configured a NAT network adapter as the first adapter. I configured the Adapter in the WindowsXP client to use DHCP as desired. The network status shows, that Windows tries to receive a network adress without any success. Other networks are deactivated at this time. Trying to ping 10.0.2.2 times out.

While I searched in this forum for a solution, I recognised in other VBox.log files, that the used IP-Adresses are logged in the logfile. In my logfile I think there are hints, that the network is started (Windows also recognises the network adapter), but I cannot find any information about the internal DHCP-Server or used IP-Adresses. Perhaps the network adapter is not started correctly (I cannot ping the host) and therefore the DHCP server fails somehow.

Any ideas? How can I find more information to analyse the problem? Is the problem known and I did not find the solution?

Thank you for your help. Lutz
VBox.log
(63.69 KiB) Downloaded 15 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: NAT network adapter is not working

Post by Perryg »

If you are using NAT and nothing else at the time you will not be able to ping or see the host. It will not be in your private network.
So can you surf the Internet? If you need specific things like web servers you will need to forward the ports in NAT before they will work or setup another adapter with host-only..
Platen
Posts: 4
Joined: 24. Sep 2009, 22:27
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

Re: NAT network adapter is not working

Post by Platen »

Perry, I cannot surf within VM using NAT. The Windows network card is configured to derive the ip-adress and the DNS-server adress automatically. But as you can see in the result of the ipconfig, all settings remains to default values, because the DHCP server does not answer the Windows request.

Code: Select all

C:\>ipconfig /all

Windows-IP-Konfiguration

        Hostname. . . . . . . . . . . . . : lucy
        Primäres DNS-Suffix . . . . . . . :
        Knotentyp . . . . . . . . . . . . : Broadcast
        IP-Routing aktiviert. . . . . . . : Nein
        WINS-Proxy aktiviert. . . . . . . : Nein

Ethernetadapter NLAN:

        Verbindungsspezifisches DNS-Suffix:
        Beschreibung. . . . . . . . . . . : Ethernetadapter der AMD-PCNET-Familie
        Physikalische Adresse . . . . . . : 08-00-27-2B-BA-10
        DHCP aktiviert. . . . . . . . . . : Ja
        Autokonfiguration aktiviert . . . : Ja
        IP-Adresse. . . . . . . . . . . . : 0.0.0.0
        Subnetzmaske. . . . . . . . . . . : 0.0.0.0
        Standardgateway . . . . . . . . . :
        DHCP-Server . . . . . . . . . . . : 255.255.255.255

C:\>
I am not sure whether this is the problem or this is the result of problem (if the network adapter does not work correctly, the internal DHCP server does not receive the DHCP request of the Windows client and cannot answer).

Lutz
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: NAT network adapter is not working

Post by Perryg »

NAT should work right out of the BOX on the guest but there will be issues of accessing the host. See the section of the VBox manual below.
6.4. Network Address Translation (NAT) of the VBox Users Manual
Also look for Firewall issues.
Platen
Posts: 4
Joined: 24. Sep 2009, 22:27
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

Re: NAT network adapter is not working

Post by Platen »

Perry, the firewall is deactivated. I read the manual several times, otherwise I won't contact the forum. But because the NAT network is so simple, the question is, what can I do, if does not work right out the box?

Lutz
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: NAT network adapter is not working

Post by Perryg »

First thing to do is to find out whether the problem is the host or the guest.
Can you download a live CD of linux and setup a new VM in NAT and see if the live version can in fact get to the Internet?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: NAT network adapter is not working

Post by Sasquatch »

The log doesn't show any DHCP offers, so the Guest doesn't even bother to ask VB for one. Another option is that you don't have the first adapter enabled, but another one that's not attached to NAT. Can you verify that? I wasn't able to dissect the log to get the active NIC.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Platen
Posts: 4
Joined: 24. Sep 2009, 22:27
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WindowsXP

Re: NAT network adapter is not working

Post by Platen »

Nice idea! And NAT in the Live-DVD environment works. So I looked around WindowsXP and finally I found it. I deactivated the DHCP Client service ... . Terrible foul - sorry!

Thanks a lot, Lutz
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: NAT network adapter is not working

Post by Perryg »

Good, glad you found it. I shall mark this topic solved.
Post Reply