0

Before you try to mark this as duplicate, please note that i tried almost everything and that nothing worked. I tried finding a solution but no success. Therefore, i need a fresh look on my problem.

I have been trying to set up a CentOS7 virtual machine using vmware. I was able to install the VM, but i'm having a problem with network. I can' connect to the interent, or any machine on the subnet. This is the error i get: Destination host unreachable

How i configured my network?

  • Set static ip
  • Set netmask, gateway based on my network settings
  • Set dns servers
  • Set to ignore the ipv6, since i'm only using the ipv4
  • Set to use the NAT adapter

Here is some configuration, if you need more please tell me what
/etc/sysconfig/network-scripts/ifcfg-ens33

ip addr show

ip route

The following things were all checked.

  • The network is active ( Checked it with NetworkManager )
  • The vmnet8 adapter is enabled ( Checked it through control panel of host machine )
  • Also vmnet8 is enabled in the Virtual Network Editor

This is what i tried, didn't work. Still have the same error.

  • Tried disabling, stopping the firewalld

  • Tried reaching my gateway, and other machines on subnet

  • Change the adapter to bridged

This is what worked, but still doesn't solve my problem

  • Connect to another VM ( on vmware ) with same network settings, different ip. Working both ways.

UPDATE
Here is the info from vmnet8 adapter ( From the host machine ): vmnet8

  • 1
    Destination host unreachable means your computer doesn't know how to reach that host. Can you post the output of arp? Do you have any other network adapters configured on that VM? – Bert Jan 6 at 15:42
  • Sorry, i can't use the arp command. I have a minimal install, didn't think in advance. So now because i have no access to internet from vm, i can't download any packages. As for the second question, I don't think so. I should only have one adapter. How can i check that? @Bert – NCode Jan 6 at 16:01
  • VMware is a company, which of their many products and versions are you talking about? – Chopper3 Jan 7 at 15:31
  • @Chopper3 I'm talking about the vmware workstation pro – NCode Jan 7 at 17:02
  • Version number? – Chopper3 Jan 8 at 9:51
0

You can open the Virtual Network Editor (as below image) to check which settings are applied for a particular interface and to view any DHCP configuration. The gateway, DNS settings and routes within the VM will need to all compliment the gateway IP in the NAT settings.

Based on your ipconfig it looks like DHCP is enabled on VMnet8, so provisioning a new CentOS vm, with the IP4 configuration set to DHCP should prove network connectvity through that adapter.

enter image description here

Hope that helps.

  • I updated the post with the vmnet8 configuration – NCode Jan 6 at 16:59
  • @NCode does changing to the 192.168.40.x subnet and using .2 as the gateway/dns help? – MStarling Jan 6 at 17:05
  • Tried to change the ip to 192.168.40.50 and gateway/dns to 192.168.40.2, but still the same error. – NCode Jan 7 at 14:10
  • I've updated the answer in light of the edits to the question. If the route & DNS all point to 192.168.40.2 it should be working, but you could try a new VM with DHCP enabled to validate. – MStarling Jan 7 at 15:01
  • Yeah, it works with DHCP set. But the problem is that i intended this VM to be a server. That's why i used the static ip. – NCode Jan 7 at 17:01

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.