Guest VMs unable to ping each other within a custom host-only network in vmware workstation

1

I have created a custom host only network VMNet2(without dhcp) in VMware workstation and connected my three VMs with this network. But the problem is I cannot ping any VM from any other VM, However I can ping the host VMNet2 adapter from the guest. I checked the route in my guest VMs everything is fine there. I tried to take tcpdump for the ping and found that arp request for the destination guest did not get response. Can anyone explain about this? My VMware worksation is installed on Windows 7 and I used Ubuntu 12.04 as guest VMs. Following are my network configurations:

Guest 1 : IP 192.168.91.2 netmask 255.255.255.0
Guest 2 : IP 192.168.91.3 netmask 255.255.255.0   
Guest 1 : IP 192.168.91.4 netmask 255.255.255.0

Guest can ping Host machine with VMNet2 adapter id 192.168.91.1 but guest VMs cannot ping each other

user976754

Posted 2014-06-30T20:35:24.830

Reputation: 11

2host only is not guest-to-host-to-guest – codemonk113 – 2016-05-01T16:17:58.790

Answers

1

  Host Only Network  |  Separate Network  |
                     |                    |
      ╔Guest 1       |      ╔═Guest 1     |
  Host╣              |     Host           |
      ╚Guest 2       |      ╚═Guest 2     |

In both VirtualBox and VMWare Workstation, host only network connects the host and guests with a virtual switch and they can ping each other directly. So OP issue cannot be reproduced.

If a separate network is used instead, guests can still ping each other with routing by the host. Here's how.

Enable IP Routing of Windows Host

Method 1: IPEnableRouter

reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v IPEnableRouter /t REG_DWORD /d 1 /f
::Reboot for it to take effect.

Method 2: RRAS

sc config RemoteAccess start= auto
sc start RemoteAccess
::Reboot is not needed.


Confirm IP Routing is on by ipconfig /all | find "Routing".
You should see IP Routing Enabled. . . . . . . . : Yes.
Set default gateways of guests to their respective host adapter.
Now guests can ping each other through the host (with ICMP echo request/reply allowed in firewall, of course).

guest-vm

Posted 2014-06-30T20:35:24.830

Reputation: 2 984

0

You've misunderstood what 'Host only' means in this.

It means the VM's can ONLY network with the host, not other vm's.

You want to use the 'internal network' setting instead, which will allow all the guests to talk to each other, as well as the host.

djsmiley2k TMW

Posted 2014-06-30T20:35:24.830

Reputation: 5 937

0

Make sure firewall on the guests is turned off/allow icmp packets. This is usually the problem I have when I connect VMs in this fashion

mrwhale

Posted 2014-06-30T20:35:24.830

Reputation: 246

Yeah, I have turned off the firewall on the host and also checked the iptables on the guest. – user976754 – 2014-06-30T21:31:19.513