Page 1 of 1
Having trouble setting up Host Interface Networking
Posted: 11. Dec 2008, 14:20
by flit
Hi, I'm trying to set up host<>guest networking using a Host Interface, but am stuck. I've read the manual, and lots of forum posts but can't seem to get it working. Probably because I don't know much about networking.
I'm using VB 2.0.6, Windows XP host and Ubuntu 8.04 (server) guest.
I've successfully added a host interface on the host, and added the network adapter on the guest VM settings. The guest eth0 IP is 10.0.2.15 and I set the IP on the host adapter to 10.0.2.16 (also tried setting both in the 192.168 range). Both have mask 255.255.255.0
But no pinging is successful. I've read various things, and run out of ideas. Hopefully I'm missing something obvious to someone who understands networking better than me.
Many thanks for help!
Posted: 11. Dec 2008, 22:22
by Sasquatch
It seems that you didn't attach the VM to Host Interface, but used NAT instead.
If you did set it properly, then there is no real reason why it shouldn't work. Maybe your Host firewall is blocking access. The default Windows firewall blocks ping by default.
If you can't get it to work, please post your network settings (both Host and Guest) and the VM settings.
Posted: 12. Dec 2008, 14:29
by flit
Done a bit more investigating...
I see now that eth0 refers to the NAT connection, and that HIF should appear as vbox0.
I'm certain that the HIF adapter is attached to the VM (in addition to the NAT adapter), because I can watch the windows network HIF connection 'cable' change from 'unplugged' to 'plugged' as I start and stop the VM (it sends some packets, none return).
Curiously, I just tried unattaching the NAT adapter from the VM so only the HIF adapter was attached (same outcome). But after reattaching the NAT, that has stopped working (eth0 has disappeared)!
Ubuntu ifconfig now just shows the local loopback, since NAT stopped working.
Windows IP config:
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.***
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.***
Ethernet adapter VirtualBox Host Interface 1:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.0.2.16
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
VM settings:
I just tried a fresh VM install of ubuntu, same result.
Posted: 12. Dec 2008, 14:33
by flit
Forget to mention, I did make sure windows firewall turned off.
Posted: 12. Dec 2008, 15:09
by flit
So thinking about it, the problem seems to be that the second ethernet card isn't properly configured on the ubuntu VM.
lspci shows two ethernet controllers, so ubuntu seems to be aware that the card exists, but for some reason the HIF it is not configured or something. Is there some way I can manually configure perhaps?
Posted: 12. Dec 2008, 18:42
by flit
This gets increasingly strange. After some experimenting I took the following steps with clean VM
- added NAT and HIF adapters
- set the host interface IP to 10.0.0.1 and mask to 255.0.0.0
- started the VM, did ifconfig, observed eth0 (NAT) is up with IP 10.0.2.15 and working properly, but eth1 (HIF) is down
- started the VM's HIF adapter with "ifconfig eth1 up", noticed it had no IP so set it to 10.0.0.2 with ifconfig
Am now able to ping from host to guest, but not the other way around. Also, when guest is running, host internet stops working, except for google (other requests appear to be directed to the HIF connection for some reason)!
Tried messing with the VM network settings, nothing helped, but was able to return to previously described state. Out of frustration I tried randomly turning on bridging, which didn't work.
But after turning off bridging (with no other changes), suddenly it works properly. Now, I am finally able to ping between host and guest, but host's internet connection is still not working, with requests appears to go to the HIF. If I turn off the VM, internet works again.
If this makes any sense to anyone, I'd be very grateful, because my head hurts.
Posted: 12. Dec 2008, 19:11
by paddyoloughlin
I am having the same problem.
I've been using VirtualBox intermittently with an Ubuntu guest on a Windows Host using HIF and Windows Networking Bridging to connect it to my company network and it's worked perfectly.
For the past while, I've been using Ubuntu 8.04 (Hardy) and was working fine, but recently the network connection has stopped working.
The Windows Networking Control Panel tells me that the Network Cable on the HIF Adapter is unplugged.
I've tried deleting the adapter and recreating a new one, but it wont work.
But... if I don't have the HIF Adapter in a Windows Network Bridge, once I start up the guest OS, Windows detects that the HIF Adapter cable is connected...
So it appears, to my uneducated eye, like a recent update of VirtualBox has introduced problems into Host Interface Networking when used with Windows Network Bridging.
What do you guys think? and does anyone have a recommended solution or symptom analysis procedure?
I'll retry with and without Bridging later, once I've got this work done and I can afford to have my PC's Network Adapter lose connection

Posted: 12. Dec 2008, 22:30
by Sasquatch
If you want to use HIF and NAT at the same time, don't set HIF in the same subnet range as NAT. So don't use the Class A private network 10.0.0.0 / 8. Use either the Class B 172.16.0.0 - 172.31.0.0 / 16 or Class C 192.168.0.0 / 24.
Re: Having Same Network Issue
Posted: 13. Dec 2008, 15:09
by houstonpcguy
Hello Everyone,
I am trying to get an Ubuntu Server 8.10 working on a Windows XP Host
PC Configuration:
4 gb memory
1 gb Nvidia NForce NIC
NVidia GeForce 8200 GS
AMD x64 Dual Core 3800+
300 GB Sata HD
LightScribe DVD/CD Burner
As you can See I have plenty of PC for this.
However when I create my Ubuntu Host I am getting no network connectin even with nat I do get an IP 10.0.2.15 However no connection to host or inet.
Please give me some Ideas I have tried to connect to host, internal and the likes via the Virtual Host Interface attached, bridged and more. the Version of VirtualBox I am using is 2.0.6.
Thanks in Advance.
Posted: 13. Dec 2008, 17:02
by flit
Sasquatch wrote:If you want to use HIF and NAT at the same time, don't set HIF in the same subnet range as NAT. So don't use the Class A private network 10.0.0.0 / 8. Use either the Class B 172.16.0.0 - 172.31.0.0 / 16 or Class C 192.168.0.0 / 24.
Many thanks Sasquatch! That fixed the last of my problems. Now have NAT and HIF working like a charm.
Re: Having Same Network Issue
Posted: 15. Dec 2008, 21:29
by Sasquatch
houstonpcguy wrote:Hello Everyone,
I am trying to get an Ubuntu Server 8.10 working on a Windows XP Host
PC Configuration:
4 gb memory
1 gb Nvidia NForce NIC
NVidia GeForce 8200 GS
AMD x64 Dual Core 3800+
300 GB Sata HD
LightScribe DVD/CD Burner
As you can See I have plenty of PC for this.
However when I create my Ubuntu Host I am getting no network connectin even with nat I do get an IP 10.0.2.15 However no connection to host or inet.
Please give me some Ideas I have tried to connect to host, internal and the likes via the Virtual Host Interface attached, bridged and more. the Version of VirtualBox I am using is 2.0.6.
Thanks in Advance.
How do you test your internet and host connectivity? Do you ping google.com or something? See the
VirtualBox FAQ as why it doesn't work. Just run a
sudo apt-get update and it should grab new headers from the server. If it doesn't, see the FAQ for a solution. It's probably your primary DNS server.