I have a strange situation and I can't figure out what the problem is.
I have VirtualBox networking as Host-Only, all guests get assigned the vboxnet0 virtual NIC. vboxnet0 IP is 192.168.56.1/28 which at the same time is VirtualBox DHCP. Naturally, there is no guest running on 192.168.56.1/28.
Host has routing defined and PF takinng care of NAT. My routing table entries:
Now I'll start my Windows-XP guest and usually the traffic flows normally from the vboxnet0 subnet to where ever the destination is. I can ping and receive traffic from my jails (on different virtual subnet) and internet. Sometimes this guest is also unable to ping vboxnet0, but it somehow corrects its self after I mess around with some pinging, tracert or god knows what.
After the Windows-XP guest gets traffic flow, the Debian-based Linuxes are now able to ping to outside of vboxnet0 subnet and respond to pings from host. After this, the Linux guests are able contact the outside domains (update the OS, etc.) It's almost like routing fails for the Linuxes untill some other OS creates the necessary routing rule for the subnets.
Document explaining network types in VirtualBox: http://www.virtualbox.org/manual/ch06.html. Basically, Host-Only is about creating a virtual switch and router, which allows host to communicate with the VM. No need for port forwarding, because host is actually directly "plugged" into that virtual switch with its own IP/subnet.
Regards.
I have VirtualBox networking as Host-Only, all guests get assigned the vboxnet0 virtual NIC. vboxnet0 IP is 192.168.56.1/28 which at the same time is VirtualBox DHCP. Naturally, there is no guest running on 192.168.56.1/28.
Host has routing defined and PF takinng care of NAT. My routing table entries:
Code:
Destination Gateway Flags Netif Expire
default 192.168.1.1 UGS re0
127.0.0.1 link#3 UH lo0
192.168.1.0/24 link#1 U re0
192.168.1.10 link#1 UHS lo0
192.168.2.0/26 link#2 U re1
192.168.2.1 link#2 UHS lo0
192.168.56.0/28 link#6 U vboxnet0
192.168.56.1 link#6 UHS lo0
- As VM guests, I have several Debian-based Linuxes, Winows-XP and FreeNAS. I get network problems only with the Debian-based Linuxes. The problems I describe below do not happen with FreeNAS nor Windows-XP:
- Linux guests can ping or traceroute each other, but not vboxnet0 interface. This also prevents traffic from leaving the vboxnet0 subnet. Typical message is "no route to host"
- Cannot ping Linux guests on the vboxnet0 subnet from host.
- VM guest Debian_Jessie is unable to obtain IP via VirtualBox's DHCP. tcpdump just repeats below message. The MAC ending with 66:31 is the Debian VM, but I have no idea what f5:16 belongs to - it's not the vboxnet0 MAC either.
Code:
00:00:00.000173 08:00:27:77:66:31 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:77:66:31, length 300
00:00:00.000005 08:00:27:18:f5:16 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 192.168.56.1.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
Now I'll start my Windows-XP guest and usually the traffic flows normally from the vboxnet0 subnet to where ever the destination is. I can ping and receive traffic from my jails (on different virtual subnet) and internet. Sometimes this guest is also unable to ping vboxnet0, but it somehow corrects its self after I mess around with some pinging, tracert or god knows what.
After the Windows-XP guest gets traffic flow, the Debian-based Linuxes are now able to ping to outside of vboxnet0 subnet and respond to pings from host. After this, the Linux guests are able contact the outside domains (update the OS, etc.) It's almost like routing fails for the Linuxes untill some other OS creates the necessary routing rule for the subnets.
Document explaining network types in VirtualBox: http://www.virtualbox.org/manual/ch06.html. Basically, Host-Only is about creating a virtual switch and router, which allows host to communicate with the VM. No need for port forwarding, because host is actually directly "plugged" into that virtual switch with its own IP/subnet.
Regards.