Page 1 of 1

Confusion about new HIF configuration

Posted: 23. Dec 2008, 00:02
by jester
I just upgraded to 2.1, and I'm confused about the new HIF configuration. It seems that it might be easier to set up, but it doesn't allow me to do what I need to do, which is described in this thread:

http://forums.virtualbox.org/viewtopic.php?t=11243

Basically I want to have access running between a guest and a host, but nowhere else. This is so that I can use my guest OS as a server that I can test from my host (which is a laptop). In the old system, I could set up a vbox0 in my host and set up HIF with that on one network card in my guest, while using a regular NAT interface with a separate network card in my guest so that the guest can have access to the outside network.

The point right now is that I don't want to have my HIF associated with any _real_ network interface in my host, because that interface may not be available and is certainly unnecessary. That is, my guest needs only to reach the host (and vice-versa), it doesn't need to reach the outside world, so I don't want to have to create a HIF interface that's associated with (say) wlan0 because if I shut off my wireless in the host, I still want to be able to reach my guest.

However, with the VBoxAddIF command no longer included, there's no way to create a vbox0.

How can I accomplish what I could before this upgrade?

Thanks.

Posted: 23. Dec 2008, 16:06
by Sasquatch
You can still create a new interface, called a TAP interface. You need some utilities on your Host to create them, but they essentially do the same as the VBoxAddIF command. You can select the virtual interface in the HIF list.

Posted: 23. Dec 2008, 19:30
by jester
Ah, thanks.

For anyone else trying to do this (it wasn't as obvious as I first thought), the trick is:

# tunctl -t tap0

to create the tap interface, and then carry on as before--select tap0 as an HIF interface in the VirtualBox networking settings screen, and in your host's networking file do something like:

# VirtualBox interface to guest VM
auto tap0
iface tap0 inet static
address 192.168.5.1
netmask 255.255.255.0

Thanks!

Posted: 30. Jan 2009, 02:42
by moon
I'm a noob at TUN/TAP so to do this, would I just need to download tunctl from this URL and follow the directions in jester's last post?

http://tunctl.sourceforge.net/

Is anything else needed to set up a TAP interface? Host is Ubuntu Hardy.

Sincere thanks,
Bill

Posted: 31. Jan 2009, 00:38
by Sasquatch
The command is part of the uml-utilities, which is shipped with most Linux distributions. Unless you have a good reason for it (like Host <> Guest communication only), the normal HIF system will work just fine.