vagrant private_network with osx host/centos guest using virtualbox host-only networking

1

I cannot get host-only networking to work from host to guest or guest to host using e.g. ping, netcat or ssh. Sshing fails timing out. No packets are seen when starting wireshark on the host interface vboxnet0. I can ping my guest ip (192.168.33.10) from the guest, but cannot ping my host vboxnet0 ip (192.168.33.1) from the host. What should I do to debug this?

Host configuration

$ VBoxManage --version
4.3.14r95030

$ vagrant --version
Vagrant 1.6.3

$ grep -v '#' Vagrantfile 
VAGRANTFILE_API_VERSION = "2"    
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|    
  config.vm.box = "puppetlabs/centos-6.5-64-puppet"
  config.vm.network "private_network", ip: "192.168.33.10"
end

$ VBoxManage list hostonlyifs
Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.33.1
NetworkMask:     255.255.255.0
IPV6Address:     
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

$ ifconfig vboxnet0
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 0a:00:27:00:00:00 
    inet 192.168.33.1 netmask 0xffffff00 broadcast 192.168.33.255

$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              5   338845     lo0
129.55.201.50      192.168.1.1        UGHWIi          1    26649     en0
192.168.1          link#5             UCS             0        0     en0
192.168.33         link#13            UCS             0        0 vboxnet
224.0.0/4          lo0                UmCS            0        0     lo0

Guest configuration

$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 08:00:27:84:29:25  
          inet addr:192.168.33.10  Bcast:192.168.33.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe84:2925/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:552 (552.0 b)

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.2.0        *               255.255.255.0   U     0      0        0 eth0
192.168.33.0    *               255.255.255.0   U     0      0        0 eth1
link-local      *               255.255.0.0     U     1002   0        0 eth0
link-local      *               255.255.0.0     U     1003   0        0 eth1
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0

Host and guest firewalls are turned off.

eaubin

Posted 2014-08-24T01:31:30.593

Reputation: 703

No answers