You are not logged in.

#1 2008-01-17 12:58:24

vik
Member
Registered: 2005-04-06
Posts: 20

VirtualBox and Bridging [SOLVED]

OK, I'm having some strange issues.   I have virtualbox set up nicely for a bridged connection.  That part works fine.  VBox running winxp gets an ip fine over my wired connection through the bridged connection.  However, the host archlinux doesn't get an ip for some reason.  Obviously, the vbox has the tap0 host interface, but is there any reason why the host OS isn't able to connect?  What interface should it be using?  It's not using eth0 because it's set up in promiscuous mode to enable the bridging.

Last edited by vik (2008-01-17 16:07:51)

Offline

#2 2008-01-17 14:46:28

twhayes
Member
Registered: 2007-10-09
Posts: 27

Re: VirtualBox and Bridging [SOLVED]

sounds like the same problem I described in this post - http://bbs.archlinux.org/viewtopic.php?id=41996.

so far, no one has offered any solutions.:(

maybe we'll get lucky with your post??:)

Offline

#3 2008-01-17 15:02:12

Alethos
Member
Registered: 2006-01-05
Posts: 84

Re: VirtualBox and Bridging [SOLVED]

Here's a little *script* I made for setting up a bridged connection. It's setup for dhcp, static is a little different, but not much.

sudo brctl addbr br0
sudo ifconfig eth0 0.0.0.0 promisc
sudo brctl addif br0 eth0
sudo dhclient br0
sudo chmod 0666 /dev/net/tun
sudo tunctl -t tap0 -u *username*
sudo ifconfig tap0 up
sudo brctl addif br0 tap0

Necessary packages are: bridge-utils; uml_utilities; dhclient.
Add "tun" and "bridge" to modules in /etc/rc.conf

Last edited by Alethos (2008-01-17 15:03:21)

Offline

#4 2008-01-17 16:05:45

vik
Member
Registered: 2005-04-06
Posts: 20

Re: VirtualBox and Bridging [SOLVED]

Well I figured out the problem.  I actually have two network interfaces on my laptop, a wired and wireless.  Further, I was using both networkmanager (gnome's network management app) with arch's network scripts.  I should have known better, but I like them both, too bad they can't work together.  Once I stopped networkmanager and did a "dhclient br0" again, it all works.  The reason I wanted to use networkmanager was to manage my wireless connections, which is much easier with that applet than with command-line wireless profiles (I guess I should check out netcfg2).  At any rate, my workaround is to use arch's network for this and replace it with networkmanager when I need wireless. 

On a side note, anyone know if it's easy to do a wireless bridge with virtualbox?  I think I read that wireless bridging is a bit tricker...

Last edited by vik (2008-01-17 16:06:58)

Offline

#5 2008-02-06 13:54:26

scottro
Member
From: NYC
Registered: 2002-10-11
Posts: 466
Website

Re: VirtualBox and Bridging [SOLVED]

Yes, it's possible.  I have a page on it as a matter of fact, and just added the ArchLinux section last night. smile

(The Arch section is at the end.  You can skip to the wireless section to get the idea--I'm going to have to put some internal links in there in the next few days.)

(Which is when I finally figured out why it wasn't working in Arch.)

http://home.nyc.rr.com/computertaijutsu/vboxbridge.html

In a nutshell, you have to get the parprouted program, (you actually won't even create a bridge) and do a bit of symlinking of the ip command, which is part of the iproute package. 
It's explained, hopefully in clear detail on the page.  Give it a whirl and let me know if it's unclear--I wrote pretty late at night.

Last edited by scottro (2008-02-06 13:56:08)

Offline

Board footer

Powered by FluxBB