Mac – virtualbox, cannot ping internal network from host

networkingvirtual machinevirtualbox

I have two virtual machines running (mars and saturn):

enter image description here

I want them to be able to ping each other, for this, I set up an internal network adapter on both virtual machines. Here you can see network settings for saturn machine:

enter image description here

And here you can see network settings for mars machine:

enter image description here

But for some reason I cannot ping one machine from another, instead I get:
Reply from ##.##.##.##: Destination host unreachable. So the questions are:
1) How can I make them see each other?
2) Having two virtual machines on internal network plus how can I made them accessible from host machine?

UPDATE 2:
Ok, I now can ping mars from saturn and saturn from mars, but I still can't ping both of them from host.

Update:
Here are the ip settings for the mars virtual machine:

enter image description here

And here are ip settings for saturn virtual machine:

enter image description here

When I try to ping mars from saturn I get this:

enter image description here

Here is the output from running ipconfig /all on both virtual machines:

enter image description here

Best Answer

Take a look at this link.

Internal networking:

This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.

The problem you are facing is that the VM's cant reach your DHCP server. It's getting an APIPA adress (169.254.xx.xx)

Bridged networking

This is for more advanced networking needs such as network simulations and running servers in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.

If you have a router or DHCP server on your network, configure this option to receive DHCP packets through the host machines NIC, so the VM's automatically obtain IP adresses.

Else you can configure static ip adresses op both VM's

Example:

 VM Mars:  IP 192.168.1.5, Subnetmask 255.255.255.0 
 VM Saturn: IP 192.168.1.6, Subnetmask 255.255.255.0

EDIT: If you want the host to communicate with the VM's use a bridged network for the VM's and either give the VM's a static address within the same subnet that your host is in. Or let DHCP assign IP adresses to the VM's dynamicly (to assume your host is getting an DHCP address from the same server/router )

Related Question