XP guest can't reach host (bridged networking)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Muts
Posts: 39
Joined: 20. Jul 2008, 16:55
Contact:

XP guest can't reach host (bridged networking)

Post by Muts »

Hi all!

I've been using VMware player for about 2 years now, but installed Virtualbox 1.6.2 today because it has amd-v support and now I don't need to edit config files for changing iso mounts etc. I immediately noticed Virtualbox is immensely faster, thanks to amd-v. (I have an Athlon 64 2X 6000+.)

I have set up my kubuntu 7.10 with a static ip address in our home network (192.168.2.xxx), and always give the guest static addresses as wel. I then share my kubuntu root ( / ) with samba, and do the same with the C drive in the XP image.

The problem here is that (because of the bridging) going from the host to the guest is ok but trying to connect from the guest to the host fails. Please note that NAT is (I think) not a solution for me, because I need to access the guest directly (for the file sharing).
Not even ping works. I did a manual setup of my network interfaces for this virtualbox install.

This is very inconvenient, it seemed to work fine with vmware.

Code: Select all

cat /etc/network/interfaces
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0


iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1

auto eth0

#virtualbox bridged network interface
iface tap1 inet manual
  tunctl_user muts

iface br0 inet dhcp
  bridge_ports eth0 tap1
  pre-up ip link set eth0 promisc on

auto tap1 br0
dependency hell? => /bin/there/done/that
moppel
Posts: 2
Joined: 20. Jul 2008, 18:46

Post by moppel »

Are shared folders a possible solution for you?

Remark: http://forums.virtualbox.org/viewtopic.php?t=8052
Muts
Posts: 39
Joined: 20. Jul 2008, 16:55
Contact:

Post by Muts »

moppel wrote:Are shared folders a possible solution for you?
I knew there was something like that, but I wanted to use the pure samba sharing system at first, since there have been vulnerabilities in the past with such addon mechanisms.

I enabled my linux root as a shared folder, and I'm surprised it works so seamless. :)
Since I only need to be able to acces the host for filesharing, I guess it's allright. If I would need to access other services, this would not have been a good solution.

I would still consider this a bug though, I would guess that the guest needs to be able to connect to the host (in all the ways possible).

Thanks for your suggestion, now I'm all set to abandon vmware. :D
dependency hell? => /bin/there/done/that
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

Post by Sasquatch »

Muts, your problem is that you need to set the IP address on the bridge, not the physical interface. Set eth0 to manual, the bridge with the proper address settings and it should work just fine. I have the same setup and I can access my Host from the Guest with Samba shares just fine.

ps.
Put code blocks around network configs, makes it a bit easier to see and read that it's about configurations.
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.
Muts
Posts: 39
Joined: 20. Jul 2008, 16:55
Contact:

Post by Muts »

Thanks a lot, Sasquatch, that fixed my problem! :)

Hopefully this might help other people as well with such a problem in the future. :P
dependency hell? => /bin/there/done/that
sonntagssegler
Posts: 1
Joined: 21. Jul 2008, 17:29

Post by sonntagssegler »

Hi
I am a kind of a beginner in this field.

Do you mind to quote your optimized "interfaces" file as a kind of template?
So I do not all have to start from scratch.

THX. :-)
Muts
Posts: 39
Joined: 20. Jul 2008, 16:55
Contact:

Post by Muts »

Sure! :)

Here's my config file for a bridge setup and a static ip address

Code: Select all

#standard stuff
auto lo
iface lo inet loopback
  address 127.0.0.1
  netmask 255.0.0.0


iface eth0 inet manual

auto eth0

#new things for bridging support
iface tap1 inet manual
  tunctl_user muts #put your username here instead of 'muts'

iface br0 inet static
  bridge_ports eth0 tap1
  pre-up ip link set eth0 promisc on

  address 192.168.2.100  #these three lines are pretty standard, adjust them for your system
  netmask 255.255.255.0
  gateway 192.168.2.1


auto tap1 br0
You should always make sure that your install also uses eth0 as it's primary network interface though!

The only problem I had so far are NAT problems with azureus/vuze, but I'm on the right path to fix this. :)
dependency hell? => /bin/there/done/that
Post Reply