0

I am running Ubuntu 14.04 in VMWare Workstation on a Windows 7 Host. I can ping my Host from within the Ubuntu VM, but cannot ping the other way. Firewall is disabled on the Ubuntu Guest.... Any reason why this would be happening?

IPconfig for Host:

Windows IP Configuration

Ethernet adapter Local Area Connection:

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

Ethernet adapter Local Area Connection 3:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::3016:ce81:45fd:f807%22
   IPv4 Address. . . . . . . . . . . : 10.104.29.6
   Subnet Mask . . . . . . . . . . . : 255.255.255.252
   Default Gateway . . . . . . . . . : 

Ethernet adapter Local Area Connection 2:

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

Wireless LAN adapter Wireless Network Connection 3:

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

Wireless LAN adapter Wireless Network Connection 2:

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

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::c50c:ec60:db1f:4f5f%11
   IPv4 Address. . . . . . . . . . . : 192.168.1.13
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

IFConfig for guest:

eth0      Link encap:Ethernet  HWaddr 00:0c:29:3a:1d:cd  
      inet addr:192.168.49.150  Bcast:192.168.49.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fe3a:1dcd/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:19570 errors:0 dropped:0 overruns:0 frame:0
      TX packets:16031 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:24079595 (24.0 MB)  TX bytes:1874418 (1.8 MB)

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:3231 errors:0 dropped:0 overruns:0 frame:0
      TX packets:3231 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:260336 (260.3 KB)  TX bytes:260336 (260.3 KB)

virbr0    Link encap:Ethernet  HWaddr 96:18:75:1c:c2:7d  
      inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  • VMs can get very weird with networking. Please post what VMWare reports as the network configuration. Also, it looks like both of those machines have different subnets based on their configured subnet mask. – Ohnana Jan 14 '15 at 20:12
  • Thanks for your comment. I am using NAT in VMWare if thats what you're asking. And as for the subnet - if you're referring to LAN 3 on my Windows host, that is for a VPN that I am connected to, whereas my wireless connection is on the same subnet as the Guest VM. Could the VPN be playing a role here?? Thanks again! – DJMcCarthy12 Jan 14 '15 at 20:17
2

NAT is the issue. Packets from the Ubuntu machine fly out of the machine, and onto the network. Router sees these, and sends them to your computer, because it knows where it is. then, VMWare ensures your VM gets the packets back, because that's its job. You get connection.

When pinging the guest, packets from the Windows host fly out onto the network and the router sees them. The router has no idea where your VM is, because VMWare has carved a tiny pocket out of your host for a private network. VMWare can't help the router find your VM, because at that point, it's outside of its sphere of influence. The router drops the packets, and moves on with life.

Here's VMWare's explanation of NAT configuration.

Put the VM on a bridged adapter. This allows your router to assign an IP address to it that it knows, and it sits on the network "next to" your computer. Then they can talk to each other.

  • Great explanation, and your solution worked perfectly. Appreciate the help! – DJMcCarthy12 Jan 14 '15 at 20:26
  • 1
    Tada. The first thing literally everyone screws up in virtual environments :P – Ohnana Jan 14 '15 at 20:27
  • Yeah I'm using VirtualBox - switched from NAT to bridged - restart VM and all is good in the world. Cheers! – Force Hero Jan 3 '17 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.