LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-01-2009, 11:54 AM   #1
botnet
Member
 
Registered: May 2009
Posts: 158

Rep: Reputation: 40
VirtualBox-2.2 - bridged networking on Slackware-12.2


As most of the documentation on the subject relates to older versions of VirtualBox and other distributions of GNU/Linux, I am having a hell of a time getting this to work.

NAT networking works just fine, however I want the VM to have a different IP than the host, and have it appear to be a separate machine connected to the network.

I have created br0 (brctl addbr br0)
Bridged br0 to eth0 (brctl addif br0 eth0)
But when I start VirtualBox (running XP) with bridged networkign attached to eth0 I get the:
Code:
"Failed to open/create the internal network 'HostInterfaceNetworking-eth0' (VERR_SUPDRV_INTERFACE_NOT_SUPPORTED)."
error

I have also tried creating br0 (brctl addbr br0)
Creating a tap interface (tunctl -t tap1 -u void) -- [void is my username]
Bridging the two (ifconfig tap1 up && brctl addif br0 tap1)
Putting current interface in promisc mode (ifconfig wlan0 0.0.0.0 promisc) and configuring it with my current address and interface (brctl addif br0 wlan0 && ifconfig br0 `ifconfig wlan0 | grep 'inet addr' | cut -d: -f2 | cut -d' ' -f1`)
Then adding my current gateway (route add default gw `route -n | grep UG | sed s/' *'/' '/g | cut -d' ' -f2`)

But still regardless of any interface I select in the VirtualBox Networking section (eth0 wlan0 br0 or tap1) I get the same error as above.

I connect to the internet via wlan0 and use dhcp to acquire an IP, if that affects anything.

I do not want to go back to using VMWare (with which setting this up was quite easy) because the latest version of VMWare's interface is horrible, it's not open source, and the kernel modules have trouble with my kernel (2.6.30)

Does anyone have any suggestion as to what I am missing?
 
Old 05-01-2009, 12:09 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
I think your problem is the wlan. I do this with eth0 and all I have to do is pick "Bridged Adapter" and "eth0" from the drop down. I would guess the same is true for wlan, but the radio signals may be limited to one connection (I don't know for sure, but wlan is a bit more complex than eth).

In any event, you will need to configure your vm to use your wireless adapter I would think, not an eth one.

I know that all of that brctl and tunctl stuff needed to be done in the past, but I don't think it does any more.

Anyway, sorry for not being more help,

Forrest
 
Old 05-01-2009, 12:18 PM   #3
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
It uses my wireless adapter just fine if I select NAT. If I select bridged and choose wlan0 i get the error from the first post, same if I select eth0 with or without adding bridges and tunnels and such.
 
Old 05-01-2009, 12:40 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Yes, but NAT is making only one link between your system and your WAP. It is translating your VM's IP into your wlan IP and then back for any communications. Using "Bridged Adapter" and wlan would be making TWO links between your system and your WAP. I don't know how successful this would be (though in theory it should work).

Are you connected via eth0 AND wlan0?

Forrest
 
Old 05-01-2009, 01:04 PM   #5
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
I connect only though wlan0

About a year ago I switched from using VirtualBox to VMware because networking was a lot easier to set-up on VMware. At the time I was able to create the virtual interface vmnet0 and bridge it to wlan0 allowing the VM to have a separate IP as the host. This was all done with the included scripts. Unfortunately, the new version of VMware is terrible, and the older versions will not compile on the latest kernels. But the point is that it is possible to bridge a virtual network interface to a wireless interface in such a way. It's just apparently not easy to do. I do not want to downgrade kernels and switch back to vmware if I don't have to.
 
Old 05-01-2009, 01:07 PM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, from your first post you say you bridged br0 to eth0. Have you tried bridging to wlan0?

Forrest
 
Old 05-01-2009, 01:19 PM   #7
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
Yes, I tried that at first, but read a post in reference to Ubuntu somewhere that the bridge needs to be made to eth0 even if I connect via wlan0
 
Old 05-01-2009, 01:28 PM   #8
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Have you tried a bridge with both eth0 and wlan0 and then using eth0 as VM device?

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
ifconfig br0 up

Forrest
 
Old 05-01-2009, 01:37 PM   #9
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
I just tried that

Same error
 
Old 05-01-2009, 10:12 PM   #10
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
Well, I got it to start after downgrading to 2.1.4_OSE

Though when I use Host interface networking on wlan0, I still get the same IP in the client as I do in the host...

If I create a bridge between wlan0 and, for example, vbox0, and start host networking on vbox0 interface, the client does not have internet access at all.
 
Old 05-02-2009, 01:56 AM   #11
botnet
Member
 
Registered: May 2009
Posts: 158

Original Poster
Rep: Reputation: 40
I guess I hadn't noticed earlier, but even though the internet sees the client and host on the same IP, I can still see the client as a separate host, which is all I wanted to be able to do.

Thanks for the help forrestt.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridged networking intermittently drops network connection besson3c Linux - Networking 0 09-17-2008 07:31 PM
VirtualBox Networking - Slackware 12 - Posted this in slack help instead of Networkin THCsphere Linux - Networking 1 06-21-2008 01:52 PM
VirtualBox and networking AQG Linux - Software 2 06-02-2008 12:50 PM
Bridged networking on Guest VISTA fails 1kyle General 1 02-25-2007 06:45 AM
LXer: OpenVZ Announces Support for IPv6 and Bridged Networking LXer Syndicated Linux News 0 06-08-2006 06:21 AM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration