Page 1 of 1

Unable to reach guest network from host (Host-Only setup)

Posted: 24. Apr 2020, 21:39
by tip2tail
Hi all,

I've spent the best part of a day looking at this and I'm stumped! Hopefully someone here can help! Based on what I've seen asked for on all the posts I've searched, I'll try and provide as much information here as I can, but happy to provide as much more as is needed.

This config was working perfectly, then suddenly the host only adapter changed from 192.168.56.* to a 169.*.*.* address. This happened in the middle of a day, without a reboot. Other users on my team use the same configuration.

I have subsequently uninstalled, reinstalled, disabled and re-enabled the network connection and the interal adapter in the properties. But still nothing.

Host Details
=================
Windows 10 v1909
VirtualBox 6.1.4

Host Network
=================
Currently working from home, so on the corporate VPN and hard wired into my home network.

Code: Select all

> ipconfig
Windows IP Configuration

Ethernet adapter AnyConnect VPN:

   Connection-specific DNS Suffix  . : xxx.corporate-domain-removed.
   IPv4 Address. . . . . . . . . . . : 172.31.224.22
   Subnet Mask . . . . . . . . . . . : 255.255.252.0
   Default Gateway . . . . . . . . . :

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::d9b5:2425:bc71:c99a%47
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter WiFi:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : lan

Wireless LAN adapter Local Area Connection* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : lan
   IPv6 Address. . . . . . . . . . . : 
   Temporary IPv6 Address. . . . . . : 
   Link-local IPv6 Address . . . . . : 
   IPv4 Address. . . . . . . . . . . : 192.168.1.62
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
Guest
=================
The same problem is happening on two different guests. Both are Linux - one Centos 6 and the other Centos 7.

Configuration of Guest networks here

On the guest itself - the config of the network is:

Code: Select all

$ ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:3b:45:d9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.106/24 brd 192.168.56.255 scope global noprefixroute dynamic enp0s3
       valid_lft 418sec preferred_lft 418sec
    inet6 fe80::d19e:ddea:253:53fb/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:7b:66:ee brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.15/24 brd 10.0.3.255 scope global noprefixroute dynamic enp0s8
       valid_lft 80359sec preferred_lft 80359sec
    inet6 fe80::7cdf:ec69:b0b1:c84b/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
-- I have screenshots of the VirtualBox settings but cannot post them due to Forum restrictions --

I can ping from the guest to internal corporate resources and the host PC on the 172.31.224.22 IP.

I cannot access the VM on 192.168.56.106 from the host, meaning I cannot access my running applications. This is the problem I need help to resolve!

Any and all help would be appreciated!!

M

Re: Unable to reach guest network from host (Host-Only setup)

Posted: 25. Apr 2020, 09:19
by Martin
Check with "route print" if your VPN connection creates a route into the VPN for the 192.168.56.0 network.
Maybe this subnet is also used somewhere in the company.

Re: Unable to reach guest network from host (Host-Only setup)

Posted: 25. Apr 2020, 18:16
by tip2tail
Martin wrote:Check with "route print" if your VPN connection creates a route into the VPN for the 192.168.56.0 network.
Maybe this subnet is also used somewhere in the company.
Thanks Martin!

I've included the output from route PRINT below. I can see some 192.168.56.xxx entries but I am not sure what this should or should not look like.

As for the subnet, there are a large number of people all over the company that use this same VM appliance imported on their machine successfully - and can access via 192.168.56.106 as expected.

Code: Select all

===========================================================================
Interface List
 16...00 05 9a 3c 7a 00 ......Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
 47...0a 00 27 00 00 2f ......VirtualBox Host-Only Ethernet Adapter
 13...28 c6 3f 6a 06 f3 ......Intel(R) Dual Band Wireless-AC 8265
 20...28 c6 3f 6a 06 f4 ......Microsoft Wi-Fi Direct Virtual Adapter
 14...2a c6 3f 6a 06 f3 ......Microsoft Wi-Fi Direct Virtual Adapter #2
 12...34 29 8f 96 12 7a ......Realtek USB GbE Family Controller
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.62     35
         10.0.0.0        255.0.0.0     172.31.224.1    172.31.224.22      2
      12.129.29.5  255.255.255.255     172.31.224.1    172.31.224.22      2
    12.155.41.246  255.255.255.255     172.31.224.1    172.31.224.22      2
       13.108.0.0      255.252.0.0     172.31.224.1    172.31.224.22      2
      19.59.28.51  255.255.255.255     172.31.224.1    172.31.224.22      2
    34.197.214.53  255.255.255.255     172.31.224.1    172.31.224.22      2
   34.214.243.161  255.255.255.255     172.31.224.1    172.31.224.22      2
   52.201.160.104  255.255.255.255     172.31.224.1    172.31.224.22      2
         53.0.0.0        255.0.0.0     172.31.224.1    172.31.224.22      2
    54.200.200.72  255.255.255.255     172.31.224.1    172.31.224.22      2
      63.111.78.9  255.255.255.255     172.31.224.1    172.31.224.22      2
       64.27.71.0    255.255.255.0     172.31.224.1    172.31.224.22      2
     64.211.202.0    255.255.255.0     172.31.224.1    172.31.224.22      2
     66.11.151.32  255.255.255.224     172.31.224.1    172.31.224.22      2
      67.22.109.0  255.255.255.240     172.31.224.1    172.31.224.22      2
     72.18.22.161  255.255.255.255     172.31.224.1    172.31.224.22      2
      72.21.81.96  255.255.255.255     172.31.224.1    172.31.224.22      2
     85.222.128.0    255.255.224.0     172.31.224.1    172.31.224.22      2
    93.184.221.96  255.255.255.255     172.31.224.1    172.31.224.22      2
      96.43.144.0    255.255.240.0     172.31.224.1    172.31.224.22      2
      96.43.148.0    255.255.252.0     172.31.224.1    172.31.224.22      2
       100.64.0.0      255.192.0.0     172.31.224.1    172.31.224.22      2
     101.53.160.0    255.255.224.0     172.31.224.1    172.31.224.22      2
       126.14.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  128.242.113.128  255.255.255.224     172.31.224.1    172.31.224.22      2
      136.9.7.160  255.255.255.248     172.31.224.1    172.31.224.22      2
      136.146.0.0      255.254.0.0     172.31.224.1    172.31.224.22      2
      139.126.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
    150.175.58.10  255.255.255.255     172.31.224.1    172.31.224.22      2
   160.124.33.139  255.255.255.255     172.31.224.1    172.31.224.22      2
    164.156.162.0    255.255.255.0     172.31.224.1    172.31.224.22      2
     170.34.70.13  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.81  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.82  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.83  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.84  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.85  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.86  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.87  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.88  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.89  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.91  255.255.255.255     172.31.224.1    172.31.224.22      2
   170.146.145.92  255.255.255.255     172.31.224.1    172.31.224.22      2
       172.16.0.0      255.240.0.0     172.31.224.1    172.31.224.22      2
     172.31.224.0    255.255.252.0         On-link     172.31.224.22    257
    172.31.224.22  255.255.255.255         On-link     172.31.224.22    257
   172.31.227.255  255.255.255.255         On-link     172.31.224.22    257
    172.31.234.48  255.255.255.255     172.31.224.1    172.31.224.22      2
      182.50.76.0    255.255.252.0     172.31.224.1    172.31.224.22      2
     185.59.149.1  255.255.255.255      192.168.1.1     192.168.1.62     36
     185.79.140.0    255.255.252.0     172.31.224.1    172.31.224.22      2
      192.110.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      192.168.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      192.168.1.0    255.255.255.0         On-link      192.168.1.62    291
      192.168.1.1  255.255.255.255         On-link      192.168.1.62     36
     192.168.1.62  255.255.255.255         On-link      192.168.1.62    291
    192.168.1.255  255.255.255.255         On-link      192.168.1.62    291
     192.168.56.0    255.255.255.0         On-link      192.168.56.1    281
     192.168.56.1  255.255.255.255         On-link      192.168.56.1    281
   192.168.56.255  255.255.255.255         On-link      192.168.56.1    281
    192.168.130.0    255.255.255.0     172.31.224.1    172.31.224.22      2
      192.191.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      192.224.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
     194.10.164.0    255.255.255.0     172.31.224.1    172.31.224.22      2
   194.182.254.64  255.255.255.224     172.31.224.1    172.31.224.22      2
       195.1.80.0    255.255.255.0     172.31.224.1    172.31.224.22      2
       198.42.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
   198.61.152.153  255.255.255.255     172.31.224.1    172.31.224.22      2
      198.249.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      199.194.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
    202.59.40.201  255.255.255.255     172.31.224.1    172.31.224.22      2
    202.129.242.0    255.255.254.0     172.31.224.1    172.31.224.22      2
     204.14.232.0    255.255.248.0     172.31.224.1    172.31.224.22      2
     204.14.234.0    255.255.254.0     172.31.224.1    172.31.224.22      2
     204.14.237.0    255.255.255.0     172.31.224.1    172.31.224.22      2
     204.14.238.0    255.255.254.0     172.31.224.1    172.31.224.22      2
      204.125.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      204.224.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
  204.228.228.192  255.255.255.224     172.31.224.1    172.31.224.22      2
      205.190.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
   205.216.112.23  255.255.255.255     172.31.224.1    172.31.224.22      2
       206.22.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.88.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.89.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.90.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.91.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.92.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.93.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.94.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
       206.95.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
     206.201.48.0    255.255.248.0     172.31.224.1    172.31.224.22      2
      207.184.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      207.185.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      207.186.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
      207.187.0.0      255.255.0.0     172.31.224.1    172.31.224.22      2
  207.187.195.178  255.255.255.255     172.31.224.1    172.31.224.22      2
   207.187.197.29  255.255.255.255     172.31.224.1    172.31.224.22      2
   208.35.231.220  255.255.255.255     172.31.224.1    172.31.224.22      2
     208.47.112.0    255.255.255.0     172.31.224.1    172.31.224.22      2
  209.191.134.134  255.255.255.255     172.31.224.1    172.31.224.22      2
   212.50.148.160  255.255.255.240     172.31.224.1    172.31.224.22      2
     212.50.159.0  255.255.255.128     172.31.224.1    172.31.224.22      2
    216.231.224.0    255.255.240.0     172.31.224.1    172.31.224.22      2
    216.241.208.0    255.255.240.0     172.31.224.1    172.31.224.22      2
     216.249.16.0    255.255.240.0     172.31.224.1    172.31.224.22      2
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link      192.168.56.1    281
        224.0.0.0        240.0.0.0         On-link      192.168.1.62    291
        224.0.0.0        240.0.0.0         On-link     172.31.224.22  10000
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link      192.168.56.1    281
  255.255.255.255  255.255.255.255         On-link      192.168.1.62    291
  255.255.255.255  255.255.255.255         On-link     172.31.224.22  10000
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    331 ::1/128                  On-link
 12    291 fdaa:bbcc:ddee:0:61a0:9642:babd:ddc4/128
                                    On-link
 12    291 fdaa:bbcc:ddee:0:94ad:5f58:2e75:ccfd/128
                                    On-link
 12    291 fe80::61a0:9642:babd:ddc4/128
                                    On-link
 47    281 fe80::d9b5:2425:bc71:c99a/128
                                    On-link
  1    331 ff00::/8                 On-link
 47    281 ff00::/8                 On-link
 12    291 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

Re: Unable to reach guest network from host (Host-Only setup)

Posted: 25. Apr 2020, 19:24
by scottgus1
Have you rebooted your host yet? It is Windows, after all... :lol:

Personally I have never seen a Host-Only adapter suddenly change its IP address from the normal value set by Virtualbox to an APIPA address. When a network device gets an APIPA address it means it asked for DHCP to give it an IP, but there's no DHCP server out there to give it one. So it sets a 169.254.#.# address itself. Under normal usage the host's Host-Only adapter is set to static IP address and the connected guests get dynamic IP's from the Host-Only DHCP if enabled or are set manually as static by the user.
tip2tail wrote:the host only adapter changed from 192.168.56.* to a 169.*.*.* address
Could have used more explicit statements on the * in the 192.168.56.*, whether that was the host adapter's .1 or in the guest's .#.

The "host only adapter" seems to imply that the host's Host-Only virtual adapter changed, but the adapter's address would be 192.168.56.1, and your posted host 'ipconfig' IP data shows the 192.168.56.1 adapter still present as 'Ethernet adapter Ethernet 2', in addition to your VPN and LAN. As stated above, the Host-Only adapter on the host defaults to static IP address and would not define itself through DHCP therefore would not hunt an APIPA if it got a headache.

Your guest has an 'enp0s3' at 192.168.56.106, which fits your Host-Only IP range, and a 'enp0s8' at 10.0.3.15. The 10.0.3.15 is possibly consistent with you having at lease two network cards set to NAT in the guest, and the first one disabled (unless further manual user configuration has taken place). The NAT card allows your guest access to the VPN and the LAN.

None of these cards has an APIPA address (169.254.#.#) in the data you posted. I see everything working correctly.

For a Host-Only adapter on the host to suddenly go south, it means that something fundamental went wrong with the software making the virtual adapter. For a guest to go south it means that the Host-Only DHCP server went south (also unusual) and left the guest to find an APIPA. A host reboot might set it straight.

If not, shut down any guests attached to Host-Only, then delete the Host-Only network from the main Virtualbox window, File menu, Host Network Manager. The open a command window and run these commands: ("drive:\path\where\Virtualbox\is\installed" is usually "C:\Program Files\Oracle\Virtualbox")
cd "drive:\path\where\Virtualbox\is\installed" 
vboxmanage list dhcpservers
Find the DHCP server related to the Host-Only adapter in question. Its "NetworkName" will probably be called:
"HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter"

or something close thereto.

Then run this command:
vboxmanage dhcpserver remove --netname replace_with_HostOnlyNetworkName
then reboot the host, make a new Host-Only network and connect the guests to it.

One quick FWIW, ipconfig /all shows more data, including the adapter names, which helps identify exactly which adapter is the Host-Only.