How to use TAP adapters in 2.1.0

Discussions related to using VirtualBox on Linux hosts.
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

How to use TAP adapters in 2.1.0

Post by TiCPU »

How can I use TAP adapters with 2.1.0 just like the 2.0 series? I was sometime using them for routing, and never liked VMWare because of their all-integrated interfaces which were completely independent from the rest of the system.
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Havent tried it. But i think, you must create it as before and set it as host adapter instead of eth0.
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

Post by TiCPU »

The new version offers a list of selection instead of allowing you to type a name, and my vbox0 interface which is created and UP isn't showing in :(
It was even configured just like before I upgraded to 2.1.0 the first time I started it and it popped me an error about the network.

Edit:
Here's the error I recreated by modifying the xml file to force vbox0;

Code: Select all

Failed to open/create the internal network 'HostInterfaceNetworking-vbox0' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
Unknown error creating VM (VERR_SUPDRV_COMPONENT_NOT_FOUND).


Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
Console
Interface: 
IConsole {e3c6d4a1-a935-47ca-b16d-f9e9c496e53e}
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Is "ifconfig" showing the device? Do you need VBOX-Commands in a Script?
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

Post by TiCPU »

I have vbox0 in my machine's startup configuration, so in fact it creates the interface using tunctl -t vbox0 -u 1000 and then ifconfig vbox0 up for me on startup.

Code: Select all

MobileCPU ~ # ifconfig vbox0
vbox0     Link encap:Ethernet  HWaddr c2:c3:63:cd:eb:fe  
          inet6 addr: fe80::c0c3:63ff:fecd:ebfe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:58 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
It was working 2 hours ago before I upgraded to 2.1.0, didn't even reboot yet, just reloaded the vboxdrv modules, but even after rebooting 2.0.6 was always working anyway.
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

Sorry, no idea. For me the standard solution eth0 is working good.
ingo2
Posts: 192
Joined: 28. Feb 2008, 14:15
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: OS/2, WinXP-10, Linux
Location: Germany

Post by ingo2 »

I also vote for building the bridge on the host-PC (as tun/tap) instead of putting all into VirtualBox.

Imagine how many different host systems might be used to run VBox on. All this must be taken into account by the VBox-software. On the other hand, setting up a bridge by means of the host system should be far more reliable, as this has been extensively testet by the authors of the host-OS.

Exactly on this item I had continous troubles with Parallels-Workstation for almost a year, until I gave up an moved to VBox. Parallels was not willing to adopt the VBox-solution (bridge on the host system).

It is really sad to see that VBox moves away from a well proven and stable solution - why???

Happy New Year,
Ingo
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 »

If you want the old fashioned way, you have to create the interfaces yourself. VBox no longer supplies the utilities itself, so you have to create the bridge and TAP interfaces with uml-utilities and bridge-utils.
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.
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

Post by TiCPU »

Yes that is very right, TAP interfaces work much better when you want to make routing and firewalling using the Host network capabilities, anyway, why reinvent the wheel by remaking an Ethernet bridge, except maybe for the wireless. I was even starting the develop a solution for this, and anyway, NAT works perfectly for an out-of-the-box solution :).
ingo2
Posts: 192
Joined: 28. Feb 2008, 14:15
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: OS/2, WinXP-10, Linux
Location: Germany

Post by ingo2 »

@Sasquatch

> VBox no longer supplies the utilities itself, so you have to create the bridge and TAP interfaces with uml-utilities and bridge-utils.

Great - that's what I did here anyhow, using the UML and bridge-utilities. I do attach VBox host networking directly to my 'tap0' created by means of the host (Ubuntu-8.04 amd64).

But this does not prevent VBox from building an internal bridge on top of my bridge in host-networking mode?
Or did I get that wrong?

Happy New Year,
Ingo
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 »

But this does not prevent VBox from building an internal bridge on top of my bridge in host-networking mode?
Or did I get that wrong?
No, VB hooks itself to the interface, talking to it directly instead of using the Host to do the talking. It does the same as it did in the old way, but you no longer need a bridge to use the physical interfaces, you can now use them directly. As the devvers stated here before, the old way is still working.
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.
ingo2
Posts: 192
Joined: 28. Feb 2008, 14:15
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: OS/2, WinXP-10, Linux
Location: Germany

Post by ingo2 »

> the old way is still working

The very same way?
To my knowledge the bridge on the host (with interfaces eth0 and tap0) connects the devices on the ethernet-level, i.e tap0 does not get assigned an IP-address from the host. Instead the VBox-guest assigns it. This way is absolutely protocol independent.

How are things now when using the 'old-fashined' way with VBox 2.1, does this also work on ethernet-level, or does it connect on the higher IP-level?

Ingo
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 »

In the old way, you would add a virtual adapter, set an IP on it, put it in the VM config and put an IP on the Guest side of the interface. You would then have Host <> Guest communications without limitations. This is still the case. The choice off which interface to use is now better, as you can connect to the physical interfaces directly.

Please, try it before asking more questions. We can discuss this till the end of time, but if you never going to test it, it's pointless.
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.
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

Bug Ticket

Post by TiCPU »

Finally I submitted a ticket as TAP networking is really useful and Host network is unstable at the moment anyway.
http://www.virtualbox.org/ticket/2933
TiCPU
Posts: 7
Joined: 29. Dec 2008, 18:38

Post by TiCPU »

How come all those topics and my bug report are left dead and abandoned already?
Did everyone return to 2.0.6 in hope it gets fixed by itself? I don't ask to go back in the past and stop the evolution of VirtualBox, I would just have liked to have both TAP Interface networking and Host/Bridged networking, it's not that much, the code is still there somewhere.

It was stable, fully functional, harder to use / for experts, and did not need any kernel module which can cause problem for compiling when changing kernel.

Is it really too much?
I'll leave you with all those topics I said were never fully answered, in hope that we will all get an answer, including all those bug report I didn't search for. If you include the number of views of all those topics, that means something too.


Problem Virtualbox 2.1 in Debian and Bridge mode
http://forums.virtualbox.org/viewtopic.php?t=13030

hostif networking 2.1
http://forums.virtualbox.org/viewtopic.php?t=12923

VirtualBox 2.1.0 Network adapter bridging GSM device / ppp0
http://forums.virtualbox.org/viewtopic.php?t=12724

2.1.0 - Host Interface Networking on dummy0
http://forums.virtualbox.org/viewtopic.php?t=12354

Bug in 2.1 for Host Networking
http://forums.virtualbox.org/viewtopic.php?t=12571
Post Reply