1

I can't ping from my Windows 10 host (192.168.12.1) to one specific IP address (192.168.12.2) on a VirtualBox host-only network. The packet is sent to the default gateway (192.168.101.4) rather than the local network (Confirmed using Wireshark). Virtual guests on 192.168.12.3 and 192.168.12.4 and be pinged/accessed just fine, but 192.168.12.2 is routed to the default gateway.

If I remove and re-add the Host-Only network in VirtualBox, the routing is correct, until I start the virtual machine using Vagrant.

Edit: I can trigger the issue by simply ping'ing an IP address that does not respond. After getting "ICMP: Destination unreachable" from the local host, the IP is routed to the gateway network. It doesn't correct itself after the IP address becomes available.

Edit 2: I can reproduce on a physical LAN - but it recovers pretty quickly after the host actually becomes available. With VirtualBox, I can remove the stall ARP entry using arp -d 192.168.12.3 (as Administrator), after which it works! Still very annoying.

Windows Firewall is completely disabled.

I wrote a program to query the routing table using GetBestRoute, and it confirms that packets for 192.168.12.2 are routed to my default gateway:

C:\>getbestroute.exe 192.168.12.2
Destination IPv4 address: 0.0.0.0
IPv4 subnet mask: 0.0.0.0
Next hop: 192.168.101.4
Interface index: 16
Forward type: remote route where the next hop is not the final destination (a remote destination)
Routing mechanism: A static route. (3)

When I query any other IP on the same (host-only) network, the packets are routed correctly as "Local packets". Only the 192.168.12.2 are routed to the gateway.

C:\>getbestroute.exe 192.168.12.3
Destination IPv4 address: 192.168.12.0
IPv4 subnet mask: 255.255.255.0
Next hop: 0.0.0.0
Interface index: 27
Forward type: local route where the next hop is the final destination (a local interface)
Routing mechanism: A local interface. (2)

There are no special entries in the routing table:

    Network Destination        Netmask          Gateway       Interface  Metric
              0.0.0.0          0.0.0.0    192.168.101.4  192.168.100.176     10
            127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
            127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
      127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
         192.168.12.0    255.255.255.0         On-link      192.168.12.1    266
         192.168.12.1  255.255.255.255         On-link      192.168.12.1    266
       192.168.12.255  255.255.255.255         On-link      192.168.12.1    266
        192.168.100.0    255.255.254.0         On-link   192.168.100.176    266
      192.168.100.176  255.255.255.255         On-link   192.168.100.176    266
      192.168.101.255  255.255.255.255         On-link   192.168.100.176    266

This is my setup:

Host LAN: 192.168.100.x/23, gateway=192.168.101.4
Private network: 192.168.12.0/24
  Host: 192.168.12.1
  Virtual Guests: 192.168.12.2, 192.168.12.3, 192.168.12.4

Here's what vboxmanage says about the network:

c:\>vboxmanage list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter #3
GUID:            f5719972-9d34-4c5c-8ee2-c02bb924da58
DHCP:            Disabled
IPAddress:       192.168.12.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80:0000:0000:0000:4c17:74df:cba8:4977
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:1b
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.