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

12,723
  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).

Share:
12,723

Related videos on Youtube

user976754
Author by

user976754

Updated on September 18, 2022

Comments

  • user976754
    user976754 over 1 year

    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

    • codemonk113
      codemonk113 about 8 years
      host only is not guest-to-host-to-guest
  • user976754
    user976754 almost 10 years
    Yeah, I have turned off the firewall on the host and also checked the iptables on the guest.