I apologize if some of this sounds confusing. I'm familiar with VMWare on Windows but have not used it on Linux. The operation is the same, but getting there might be a bit different. You also didn't make mention of which version of VMWare you are running, and if you are configuring from a GUI or command line.
To visualize what you are hooking up here is a link with a nice graphic: https://www.vmware.com/support/ws55/doc/ws_net_configurations_hostonly.html
In the above link, you see that there is a "virtual switch" called vmnet1
that acts, and for our purposes is, like a real network switch. This network switch exists completely within software, hosted within the VMWare hypervisor.
Next, you notice there is a virtual ethernet adapter
on both the virtual machine and on the host. They named it a little different in the image between the two, but they are the same thing. The virtual ethernet adapter, again, exists completely within software hosted within the VMware hypervisor. A driver on the virtual machine and the host allows the virtual ethernet adapter to be installed and to act, for our purposes, just like a real, physical network adapter.
VMWare also provides a DHCP server on this virtual network so that any virtual machines you "plug in" to the virtual switch can obtain a valid IP address automatically.
Now, by default, VMWare already creates the VMNet1
virtual ethernet switch. It also creates the vmnet1 virtual network adapter on the host which is automatically "plugged in" to the vmnet1 virtual switch. In your environment, your virtual network adapter on the host is set to an IP address of 172.16.167.1.
Now, you initially showed an image of your virtual machine's ifconfig output which showed that there were actually NO network adapters installed. You've since updated that and have indicated that you installed a virtual ethernet adapter on the guest. We can see that virtual ethernet adapter as eth1. It currently has an IP address of 172.16.167.2.
Where the questions come in to play is:
- Is the
eth1
virtual adapter installed properly? How did eth1 get installed? I'm concerned, because your initial image showed no adapters, and now we have an eth1
adapter. If somehow you forced this adapter to show up in the virtual machine, it may not be installed properly.
- Which virtual network switch is
eth1
"plugged in" to? If it isn't plugged in to the vmnet1 virtual switch it won't communicate on the vmnet1 network. Which is what you are trying to achieve.
Now, here is where the details get blurry, because I don't know the answers to the questions I asked at the beginning of this answer, and I'm also not familiar with VMWare on Linux.
Usually, with VMWare, you will modify the virtual machine's settings from within VMWare and add/remove a network adapter. At this same time, you will also select which network it will be "plugged in" to. Usually, this is done before ever even installing the guest operating system and during the time you create the new virtual machine. However, it is not uncommon to add/remove network adapters on a running virtual machine.
So, if you add a network adapter to a virtual machine, I would expect the virtual machine, either immediately, or after a reboot to automatically install the driver and the new network interface should automatically show up in ifconfig
. This is why I suspect you forced something here and the eth1
adapter we are looking at isn't correct.
So, this is what I would do for my own clarity on the situation. I would remove ALL network adapters from the virtual machine's settings in VMWare. I would then reboot, or do whatever cleanup work is necessary on the guest to make sure that no network interfaces show in ifconfig
apart from lo
. I would also make sure to remove any of that configuration you mentioned you modified in your question in dhcpd.conf.
I would then re-add a new network adapter to the virtual machine's settings in VMWare and I would make sure to choose the Host-Only Network vmnet1
for which network it is "plugged in" to. Then reboot the virtual machine or do what is necessary to make sure that network adapter shows up on it. But, we are really looking for this to show up automatically.
Unless you have disabled DHCP, or changed the default settings in VMWare the virtual machine will automatically get an IP address on the 172.16.167.0/24 network without any other intervention from you. If you are forcing this in some way, something has not been done right.
That's about as precise as I can get. You should explore the documentation for your specific version of VMWare to make sure you are configuring and installing network adapters properly on your virtual machines.