Centos 5.6
VirtualBox 4.0.8
eth0 has a statically configured IP (non-private address)
Guest setup:
Centos 5.6
Guest additions installed
Two NICs
eth0 - NAT interface with DHCP assigned IP
eth1 - Host only interface with statically assigned 192.168.56.10 (DHCP disabled on vboxnet0)
I would think with this setup the guest should be able to connect in/out to the world at large and the host system should be able to connect to the guest using for example ssh 192.168.56.10. However, I have been tearing my hair out as I just can't seem to get it to work.
From host:
# ping 192.168.56.10 gives PING 192.168.56.10 (192.168.56.10) 56(84) bytes of data. From 192.168.56.1 icmp_seq=2 Destination Host Unreachable From 192.168.56.1 icmp_seq=3 Destination Host Unreachable From 192.168.56.1 icmp_seq=4 Destination Host Unreachableand at this point on the host
# arp -n Address HWtype HWaddress Flags Mask Iface 192.168.56.10 (incomplete) vboxnet0 [my internet IP] ether 00:00:xx:xx:xx:xx C eth0 [my internet IP GW] ether 00:10:xx:xx:xx:xx C eth0Now the weird thing I found by chance is that if I ping from the guest to 192.168.56.1 firstly that works fine and now on the host
# arp -n Address HWtype HWaddress Flags Mask Iface 192.168.56.10 ether 02:00:02:00:AA:02 C vboxnet0 [my internet IP GW] ether 00:00:xx:xx:xx:xx C eth0and so now a ping from host to guest works as does ssh
# ping 192.168.56.10 PING 192.168.56.10 (192.168.56.10) 56(84) bytes of data. 64 bytes from 192.168.56.10: icmp_seq=1 ttl=64 time=0.123 ms 64 bytes from 192.168.56.10: icmp_seq=2 ttl=64 time=0.119 ms 64 bytes from 192.168.56.10: icmp_seq=3 ttl=64 time=0.117 msbut this only lasts along as a arp cache time (20mins or so)
Is there something wrong in my setup, or is this a VB bug?