Page 1 of 1
Guest-to-guest network not working
Posted: 15. Jul 2020, 16:28
by TGH
WIndows 10
Virtualbox 6.1.10
192.168.100 host-only network (windows)
192.168.200 host-only network (Linux)
I can NAT in and out with no problems.
Guests (Linux & Win7) happily grab a 192.168.100 address.
From host I can ping 192.168.{1|2}00 gateway addresses.
From host I can ping linux guests on their 192.168.200 addresses
From host I CANNOT ping windows 192.168.100 addresses.
From ANY guest I CANNOT ping anything. Not even the gateway!
...and to that, although an IP address is picked up and subnetmask is correct, NO gateway exists on either network.
Is this a new bug? I have never had this before in all the years I have been using vbox on any host platform and with any guest OS/systems.
Re: Guest-to-guest network not working
Posted: 15. Jul 2020, 19:19
by scottgus1
Let's investigate your settings:
For each guest, please right-click the guest in the main Virtualbox window's guest list, choose "Show in Explorer". In the window that opens, zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
Also, please post the text output of:
cd "C:\Program Files\Oracle\VirtualBox"
vboxmanage list hostonlyifs
Re: Guest-to-guest network not working
Posted: 16. Jul 2020, 12:11
by TGH
C:\Program Files\Oracle\VirtualBox>vboxmanage list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter #2
GUID: 23932781-2a13-4a90-a130-d6d3a04b745d
DHCP: Disabled
IPAddress: 192.168.200.1
NetworkMask: 255.255.255.0
IPV6Address: fe80::f539:4d28

3b2e
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:04
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 4fd7992c-cd75-4a93-84bd-0cc005cdf1c6
DHCP: Disabled
IPAddress: 192.168.100.1
NetworkMask: 255.255.255.0
IPV6Address: fe80::455f

4cd7:d502
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:08
MediumType: Ethernet
Wireless: No
Status: Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
Re: Guest-to-guest network not working
Posted: 16. Jul 2020, 12:29
by BillG
You will never get a default gateway with a host only IP. Host only means just what it says. It is to communicate between the host and its guests. The addresses are non-routable by design (hence no default gateway), just like APIPA addresses. If you need communication between host and guests, you need to use bridged mode, so that they are all in the same network.
Re: Guest-to-guest network not working
Posted: 16. Jul 2020, 16:24
by scottgus1
As Bill says, there is no internet or gateway through a Host-Only network. See
Virtualbox Networks: In Pictures: Host-Only Adapter.
Here are your pertinent settings for the three guests:
CentOS-A.vbox wrote:<Network>
<Adapter slot="0" enabled="true" MACAddress="080027411C74" type="82540EM">
<NAT/>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="0800279D726F" promiscuousModePolicy="AllowNetwork" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter #2"/>
</Adapter>
</Network>
CentOS-B.vbox wrote:<Network>
<Adapter slot="0" enabled="true" MACAddress="080027C991C8" type="82540EM">
<NAT/>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="0800274F23D6" promiscuousModePolicy="AllowNetwork" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter #2"/>
</Adapter>
</Network>
Win7-32.vbox wrote:<Network>
<Adapter slot="0" enabled="true" MACAddress="080027D57171" type="82540EM">
<NAT/>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="0800277AF23A" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter"/>
</Adapter>
</Network>
Each guest has NAT. See the Pictures tutorial under NAT. Each guest is able to ping the host's regular Ethernet address (if the host's firewall allows ping) and get the host's network-shared services and internet connection through NAT. Each guest should have a 10.0.2.15 IP address on one of its two network cards.
The two CentOS guests are connected to Host-Only #2. These two guests should be able to see the host's services and ping the host through 192.168.200.1 These two guests need static IP addresses in 192.168.200.### range, since Host-Only #2's DHCP is disabled. The two guests and the host should be able to ping each other over 192.168.200.### if their firewalls allow ping. Neither CentOS guest can access the Win7-32 guest.
Win7-32 is connected to the first Host-Only, not Host-Only #2. Win7-32 should be able to see the host's services and ping the host through 192.168.100.1. Win7-32 needs a static IP address in 192.168.100.### range, since the first Host-Only's DHCP is disabled. Win7-32 and the host should be able to ping each other over 192.168.100.### if their firewalls allow ping. Win7-32 cannot access either CentOS guest.
To summarize, the two CentOS's and Win7-32 are in separate networks and cannot see each other. Host-Only networks are not designed to 'bridge' to each other or other network interfaces on the host, just in case you were trying this.
Please explain what the intent of your project is, and we might be able to provide some guidance on what configuration of networks to use.
Re: Guest-to-guest network not working
Posted: 17. Jul 2020, 09:57
by TGH
I am not really interested in HOST to GUEST. What I REALLY want is, as I have had NUMEROUS times in the past, is for a guest on a subnet to communicate with another guest ON THE SAME SUBNET. There should be a gateway (usually .1) that each 192.168.100 (or 200) guest can reach another 192.168.100 (or 200) guest.
Was I unclear?
For 3 years or so I have been using (at office) a Linux host with an entire micro LAN running. With the exception of a Windows 2012 AD server acting as a gateway to the outside, all guests on that 192.168.10.x network (WITH NO NAT) could communicate with other guests on the same network.
This is the behaviour I would expect by default from an isolated network!
Every single occasion I have created a HOST-ONLY network and applied (at least) DHCP to a guest interface it has been allocated
1 x IPv4 address (without changing settings this would be 192.168.56.x)
1 x IPv4 subnet mask (usually 255.255.255.0)
1 x IPv4 gateway address (usually a x.x.x.1 address for the network)
THIS is the setup I want and THIS is the setup I have been accustomed to. I have no desire to be starting to use BRIDGED interface to perform tasks that were previously done without such things.
How am I supposed to apply a default route for these 192.168.(1/2)00.x guests when no gateway exists? No gateway, no route. Basic networking knowledge.
Re: Guest-to-guest network not working
Posted: 17. Jul 2020, 13:10
by Martin
Your wording is not quite correct for such a setup.
You don't need a gateway or a default route when you only want to stay inside your subnet.
A default route is used to reach everything which is not inside your own subnet.
The host-only interfaces are just network interfaces in the host whith a correct IP address, member of the subnet.
No route or gateway needed, because your host has a direct interface in that subnet.
If you cannot ping a (windows) guest from the host it is in most cases a "problem" of the Windows firewall in the guest which blocks pings by default.
Re: Guest-to-guest network not working
Posted: 17. Jul 2020, 18:23
by scottgus1
TGH wrote:For 3 years or so I have been using (at office) a Linux host with an entire micro LAN running.
If this is a Virtualbox setup, provide 'vboxmanage list hostonlyifs' and 'ipconfig /all - ifconfig - ip address' outputs as appropriate, and zipped .vbox files for the guests in the network, and we can compare your setups.
TGH wrote:a guest on a subnet to communicate with another guest ON THE SAME SUBNET
OS's do this, as mentioned by Martin, by default, if the network IP settings are correct. Give a network the same fixed octets and appropriate network mask, and set static ip addresses in that range, and the guests will talk together, no gateway required. Attach two modern physical PCs together with a network cable, and the OSs will pick APIPA addresses for themselves, and they will talk together, no gateway required.
TGH wrote:Every single occasion I have created a HOST-ONLY network and applied (at least) DHCP to a guest interface it has been allocated
1 x IPv4 address (without changing settings this would be 192.168.56.x)
1 x IPv4 subnet mask (usually 255.255.255.0)
1 x IPv4 gateway address (usually a x.x.x.1 address for the network)
I have never had Host-Only automatically pick a gateway on any of my Windows host PCs for the ten years I have been using Virtualbox. Maybe it's a Windows Virtualbox thing, but it has never happened. I have manually put a gateway address on the Host-Only Adapter in the Windows host's Network properties, in order to attempt to solve a different issue, but the Windows host OS then complained about having multiple gateways. Removing the gateway from the Host-Only adapter resolved the complaint. If your Virtualbox is automatically putting a gateway on your Host-Onlys, then you must have
a broken Virtualbox, a custom build, or are manually applying the gateways.
Host-Only does not need a gateway because it is not designed to behave as a router to the outside world. Host-Only is an Internal network with a host connection added in. Host-Only is designed to enable the guests attached to it to also communicate with... wait for it... the Host only.
If you are attempting to have traffic on the 100 and 200 networks talk to each other, I think you need another guest with two network cards attached to both Host-Onlys, and a routing service running to swap the traffic. I don't know how to do this, though. It could be possible to connect the Host-Onlys together with non-Virtualbox bridging or routing software running on the host OS, but this is beyond the scope of what Host-Only is designed to do. If it doesn't work on your new host, or stops working, there will likely be no assistance getting it to work again. Better to find a different solution designed for the purpose.
Allow me to reiterate that which you already probably know: Some OS's, especially Windows, block Ping in their built-in firewalls. You have to unblock Ping (ICMP Echo Request) to allow Ping.
I just brought up two XP guests on the same 192.168.103.### Host-Only network on my Windows 10 host. ICMP Echo Request is enabled on all three Windows OS's.
Host: 192.168.103.1
XP A: 192.168.103.3
XP B: 192.168.103.5
Host-Only's DHCP server: 192.168.103.2
All three OS's could ping each other and the Host-Only DHCP server. The Host-Only network has no gateway, and 'ipconfig' in each XP guest reported no gateway.
I am still unclear on exactly how you want these guests to communicate. Can you please draw a picture?
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 00:48
by TGH
I WOULD LIKE GUESTS ON ANY NETWORK TO COMMUNICATE WITH GUESTS ON THE SAME NETWORK.
IN YEARS OF USING VBOX WITH HOST-ONLY NETWORKS I HAVE HAD NO PROBLEMS.
So, to communicate with systems on a particular network, I would expect that vbox DHCP would provide an address, a mask and a gateway. I HAVE NEVER HAD A CASE WHERE THIS WAS NOT SO!
Forget 'default route'. Default routes exist for interfaces that exist. What does NOT exist is a gateway. VBOX host-only has ALWAYS provided a gateway that was the IP address of the host-only network.
I ask again, AM I NOT CLEAR? In EVERY SINGLE INSTANCE ON LINUX AND WINDOWS HOSTS a host-only network offered a gateway address. Now it does not. I do not believe that it is Windows 10 Host (as much as I hate it) that is the problem. Win10 has 2 network interfaces: 192.168.100.1 and 192.168.200.1. THESE are the gateway addresses I expect to see.
Almost every known case of DHCP I have encountered has provided a gateway address, either hardware, GNS3, VBOX, KVM, VMWARE, or even shitty Windows. I fail to see how you cannot understand the problem.
If I don't need a gateway, how is it that nodes on the same network cannot communicate with one another? Either linux to linux or windows to windows. NO FIREWALLS HAVE BEEN SET UP.
THERE IS A PROBLEM THAT HAS NEVER EXISTED BEFORE! So I ask if there may be a bug with host Win10 setups. Although enough people are probably already using it as a host OS.
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 02:11
by BillG
Yes, large numbers of people use Windows 10 as their host (including me) , and none of them have reported any change in the behavior of Host Only networks.
As Martin correctly pointed out to you, devices in the same network with addresses in the same IP subnet do not need default gateways. All traffic is sent directly in the local network using MAC addressing. A default gateway is only required if the target address is in another IP subnet. The traffic is then sent to the default gateway so that it can be routed to a different IP subnet.
Systems which are designed to only work in a single network and single IP subnet do not have default gateways. Apart from VirtualBox Host Only, another example is Microsoft's APIPA system, which allows devices on a simple network to communicate without any configuration or any DHCP service. If the devices are set to obtain and IP address automatically (which is the default for a Windows OS) but no DHCP server is found, APIPA gives the device an IP address and netmask but no gateway address or DNS server address.
https://www.lifewire.com/automatic-priv ... ing-816437
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 04:00
by scottgus1
TGH wrote:VBOX host-only has ALWAYS provided a gateway that was the IP address of the host-only network....In EVERY SINGLE INSTANCE ON LINUX AND WINDOWS HOSTS a host-only network offered a gateway address.
Prove the above statements. Make a screen-capture video of you making a new Host-Only network on whatever host this happened on, post in whatever video-sharing service you want, and post the link here. I re-emphasize 'new'. A previously-existing Host-Only could have been modified or damaged in some way.
TGH wrote:how is it that nodes on the same network cannot communicate with one another?
This I also do not understand. If you can ping the two CentOS's from the host you should be able to ping each CentOS from the other CentOS. The Windows 7 guest cannot ping the CentOS guests because it is on a different Host-Only network. In fact the fact that you can ping the two CentOS's from the host proves that you do not need a gateway in the Host-Only network to ping, because there isn't one. But I have not experienced this problem in typical Virtualbox operation. Once the two 'nodes' (OS's in VMs) are connected via a peer-to-peer network of some kind (internal, Host-Only, UDPTunnel) and have been given IP addresses, they can ping each other. I have never needed a gateway to do this. I have even seen shared folders and accessed files in a no-gateway network.
Based on my googling, a gateway would be needed if you had two separate networks and wanted to cross-talk them, like 192.168.100.### netmask 255.255.255.0 wants to communicate with 192.168.200.### netmask 255.255.255.0. Same thing for getting out of the LAN onto the internet.
I reiterate, please prove your statements above, as well as provide:
scottgus1 wrote:THG wrote:
For 3 years or so I have been using (at office) a Linux host with an entire micro LAN running.
If this is a Virtualbox setup, provide 'vboxmanage list hostonlyifs' and 'ipconfig /all - ifconfig - ip address' outputs as appropriate, and zipped .vbox files for the guests in the network, and we can compare your setups.
Finally, dial down the melodrama in your posts. You're going to give yourself an aneurysm typing with this intenseness. And we are not your dogs to call to heel. We are fellow free Virtualbox users who desire out of our own volunteer spirit to help your project succeed. Don't come at us with all the yelling and the incredulity that we don't understand you yet.
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 06:22
by BillG
I don't normally use Host Only because all of my hosts are in the same LAN and all vms use bridged mode, so all devices can see all other devices, physical or virtual.
I have just set up Host Only interfaces on a Windows and a Linux guest. All looks normal . Windows 10 guest has IP 192.168.56.103 and Mint has 192.168.56.102 . They can see each other.
Mint.PNG
Remember that there are two rules which determine whether two devices can communicate. They must be in the same network and the same IP subnet. One or the other is not sufficient. If you host two IP subnets on the same network (physical or virtual), they will not be able to communicate without routing software.
With a 24-bit subnet (255.255.255.0) 192.168.100 x and 192.168.200.x addresses are not in the same IP subnet. If they are associated with different Host Only interfaces on the host, they are also not in the same network. The Host Only interface on the physical machine is a loopback adapter (see Chapter 6.7 of the manual). That explains why it is not a gateway to anywhere.
A loopback interface is one which does not forward traffic anywhere. It is used to test things which you want to never leave the local device. One common use is to test web server software such as Apache. If your app is listening on port 80 and you send a request to 127.0.0.0:80 you will get a reply from the app listening on port 80 of 127.0.0.1 (the loopback address) of the device hosting the app. You can be certain that the reply came from your app and nowhere else.
If you want vms on to the same host be able to communicate with each other using Host Only, make sure that they are connecting to the same Host Only interface. They should then be in the same network and get IP addresses in the same IP subnet from the DHCP service on that Host Only network. The only reason I can think of to have two Host Only interfaces on a host would be to have two independent networks available to guests. If you want virtual networks which can be routed, use internal virtual networks.
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 15:41
by fth0
@scottgus1:
I think there is one aspect, which socratis, you and me each have experienced at some time in the past, that hasn't been thought of by now:
When creating a host-only adapter, changing the IP network away from 192.168.56.0/24 can have unexpected consequences, for example the DHCP server not following along. So anyone trying to replicate the problem should use different IP networks like the OP. Additionally, the outputs of ipconfig /all or ifconfig should IMHO be requested from the OP.
Re: Guest-to-guest network not working
Posted: 19. Jul 2020, 16:31
by scottgus1
fth0 wrote:changing the IP network away from 192.168.56.0/24 can have unexpected consequences, for example the DHCP server not following along.
I have seen similar problems with changing a "NAT network"s IP range after it's been used, DHCP server doesn't follow. I'll try what happens to a Host-Only, too & report back.
Re: Guest-to-guest network not working
Posted: 20. Jul 2020, 21:18
by scottgus1
fth0 wrote:When creating a host-only adapter, changing the IP network away from 192.168.56.0/24 can have unexpected consequences, for example the DHCP server not following along.
Yes, I found this to happen on a Windows 10 host and XP guest. The guest got the 192.168.56.### address as expected. I then shut down the guest and changed the Host-Only adapter & DHCP server settings to 192.168.
65.###. 'vboxmanage list dhcpservers' showed the Host-Only DHCP server handing out .65 addresses, but the guest still received a .56 address. I switched the guest to NAT, it got the usual 10.0.2.15. Returning it to Host-Only it went back to 192.168.56.###.
I then shut down the guest and Virtualbox for a couple hours. On returning to the XP guest for another test, I found that it now got the expected .65.### address.
I suspect that a change in Host-Only IP and DHCP will not update until the underlying VboxSVC service closes. Will test more.
UPDATE: I have found why Host-Only cannot change IP address range mid-stream. Virtualbox starts a "VboxNetDHCP.exe" process when a Host-Only-enabled guest starts. This process stays running while the VboxSVC.exe runs. This process apparently does not update to the new Host-Only IP range settings if the settings were changed after the process was started. Only shutting down all Virtualbox processes and windows, so the VboxSVC.exe can die off, will allow the new Host-Only settings to be used.
However, changes to Host-Only do show if they are made before any guest using Host-Only is started.
So if you want to modify an existing Host-Only's IP range, do it before you start any guests using that Host-Only (possibly
any Host-Only) network. If you want to change the Host-Only IP range after a guest using it has started, you have to stop every guest and all Virtualbox windows, and wait a minute for the VboxSVC.exe to quit.