[Solved] guest OS network issue

Discussions related to using VirtualBox on Windows hosts.
Post Reply
VampireFE
Posts: 2
Joined: 21. Sep 2009, 13:09
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

[Solved] guest OS network issue

Post by VampireFE »

Hello,

I have windows XP host with Ubuntu guest OS installed on VBox.

XP has these network settings:

Code: Select all

IP Address. . . . . . . . . . . . : 192.168.1.78
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 10.0.2.13
Subnet Mask . . . . . . . . . . . : 255.255.255.0
And some other IP addresses added.

I have a device with IP address 10.0.2.1 on the local net that I have to access from Ubuntu.
I can't use NAT option for its network, since the subnet I'm using matches VBox default NAT subnet so I tried bridge setup. I can access 10.0.2.13, 192.168.1.78 and I have internet access as well. However ping to 10.0.2.1 timeouts. I googled all over to find a way to get it working. I tried with DHCP, static IPs, also tried to set up routes through host OS, but I suppose it's not meant to work like that.

Atm it's set to this (DHCP):

Code: Select all

eth1      Link encap:Ethernet  HWaddr 08:00:27:16:f1:08  
          inet addr:192.168.1.127  Bcast:192.168.1.255  Mask:255.255.255.0
I can also ping it from my host.

Can you guys point me to the right direction how to get it working?
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: guest OS network issue

Post by Sasquatch »

If you bridged the network as you state, then you still need both IP addresses on the Guest, not just the Host. By default, Network Manager takes care of the network configuration, but it lacks some functionality like double IP's on one interface. Instead, remove the program and enter the configuration manually through /etc/network/interfaces. I'm assuming here that your 192.168 network has DHCP, and the 10.0.2 network has static only. With that, your interfaces file will look like this:

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

iface eth0:0 inet static
  address 10.0.2.14
  netmask 255.255.255.0
Enter a gateway for the 10.0.2 range if it's needed.
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.
VampireFE
Posts: 2
Joined: 21. Sep 2009, 13:09
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: guest OS network issue

Post by VampireFE »

Oh, thank you :) It's working now.

I had been trying to add 2nd IP address before, however not through /etc/network/interfaces, but using Preferences->Network Connections.

Once again - thanks.
Post Reply