Page 1 of 1

[Solved] host only interface, guest and host can't connect

Posted: 4. Aug 2009, 18:07
by johnnyxia
I am using VBox 3.0.2 r49928 on CentOS5. The guest OS is ubuntu 9.04 server edition.

I use the Host-only interface for the VM. After the guest OS is running, the guest OS gets an IP of 192.168.122.1, while the host OS gets an IP of 192.168.56.1. But I can't ping guest OS from host OS or ping host OS from guest OS.

I opened the File->Preferences->Network and enabled the DHCP server, and the DHCP server uses the ip of range from 192.168.56.101 to 192.168.56.254.

Any idea about this issue?

I am wondering why by default GuestOS and Host OS uses IP of different subnet.

Regards,
Johnny

Re: Using host only interface, but guest and host can't connect

Posted: 4. Aug 2009, 18:13
by johnnyxia
One more thing: I tried to set the host IP to 192.168.122.100 and also changed the DHCP server's ip address to 192.168.122.200. But the issue is still there. I tried to ping DHCP server's IP from host OS, also gets the error "Destination Host Unreachable"

It seems that the vboxnet0 NIC doesn't forward the packets to guest OS's NIC. Is there anything I missed here?

Re: Using host only interface, but guest and host can't connect

Posted: 10. Aug 2009, 03:51
by johnnyxia
This issue is resolved. The root cause is that when the Guest Linux is running, the eth1 interface is disabled. After I enabled the interface manually, the interface gets an IP from VirtualBox DHCP server and I can communicate between the Guest Linux and Host Linux. However, I don't know why the interface is disabled by default. And it is tricky its interface is eth1 not eth0. Anyway, it is resolved. Hope this info is helpful.

Regards,
Johnny

Re: [Solved] host only interface, guest and host can't connect

Posted: 10. Aug 2009, 05:46
by baf
Remove /etc/udev/rules/70-persistent-net.rules and reboot the guest