host-only networking debug (10.9.4 and centos)

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
ethan412
Posts: 2
Joined: 23. Aug 2014, 03:36

host-only networking debug (10.9.4 and centos)

Post by ethan412 »

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. Any thoughts on what I can do to debug this? Does the configuration below look reasonable?


Host configuration

Code: Select all

    $ VBoxManage --version
    4.3.14r95030

    $ 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
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

Code: Select all

    $ 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)

$ netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.2.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.33.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
0.0.0.0         10.0.2.2        0.0.0.0         UG        0 0          0 eth0
Host and guest firewalls are turned off.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: host-only networking debug (10.9.4 and centos)

Post by Perryg »

The ip address is not the default one used for VirtualBox host-only. Did you change it? Also is DHCP set properly and are you using it or static?
ethan412
Posts: 2
Joined: 23. Aug 2014, 03:36

Re: host-only networking debug (10.9.4 and centos)

Post by ethan412 »

I setup the vm using vagrant

Code: Select all

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "puppetlabs/centos-6.5-64-puppet"
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.network "private_network", ip: "192.168.33.10"
end
If I use

Code: Select all

  config.vm.network "private_network", type: "dhcp"
The vm gets an ip 172.28.128.3 and the host has a new vboxnet1 interface (ip 172.28.128.1), but the behavior is the same as the static configuration.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: host-only networking debug (10.9.4 and centos)

Post by Perryg »

Sorry but we don't support vagrant. They change too many things and use special scripts that are unknown to us making it too time consuming to diagnose.

vagrant support
Post Reply