# Mac – virtual machine not having internet connectivity

networkingvirtual machinevmwarevmware-workstation

I am having a VMware Workstation 15 setup.
Following Custom vmnet8 is what I think I have assigned to virtual machine.
vmnet0 I am not using (as per my understanding) but screenshot for information

vmnet8 is where I expect all connections are going as this I am using for NAT

apipa IP in virtual machine

Ethernet adapter Ethernet0:

Connection-specific DNS Suffix  . :
Autoconfiguration IPv4 Address. . : 169.254.174.62
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :


What is the mistake in this configuration.
The Host OS has network connectivity.
update1
as per the suggestion in comment I enabled DHCP service in vmnet and connected virtual network adaptor 8 to settings
see this screenshot. So APIPA Ip problem is solved
Now I want to give internet connectivity to Virtual machine that is not happening with above steps. What is the mistake here?

Windows IP Configuration in Virtual Machine

Ethernet adapter Ethernet0:

Connection-specific DNS Suffix  . : localdomain
IPv4 Address. . . . . . . . . . . : 192.168.152.128
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.152.2


IP Configuration of Host OS

Windows IP Configuration

Wireless LAN adapter Wi-Fi 2:

Connection-specific DNS Suffix  . : domain.name
IPv4 Address. . . . . . . . . . . : 192.168.1.14
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : ffff::ffff:ffff:ffff:fff5%11
192.168.1.1

Connection-specific DNS Suffix  . : domain.name
IPv4 Address. . . . . . . . . . . : 192.168.1.13
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : ffff::ffff:ffff:ffff:fff%13
192.168.1.1


There are 2 Wifi Cards on this system

from the guest OS I can ping to 8.8.8.8
see the screenshot

nslookup to www.vmware.com fails

This is VMware Workstation 15 Pro
15.1.0 build-13591040
From the host OS I can do not get a ping reply from virtual machine
I do a ping from my host OS to virtual machine (which is running on my laptop)

C:\WINDOWS\system32>ping 192.168.152.128

Pinging 192.168.152.128 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.152.128:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\WINDOWS\system32>


but if I do a ping from my Guest OS to host OS I get a reply.

C:\Users\Debian>ping 192.168.1.14

Pinging 192.168.1.14 with 32 bytes of data:
Reply from 192.168.1.14: bytes=32 time=1ms TTL=128
Reply from 192.168.1.14: bytes=32 time=1ms TTL=128
Reply from 192.168.1.14: bytes=32 time=1ms TTL=128
Reply from 192.168.1.14: bytes=32 time=1ms TTL=128

Ping statistics for 192.168.1.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms


192.168.1.14 is my host OS (IP is given by ADSL router)
192.168.152.128 is IP of my virtual machine this IP is given by VMware DHCP service in vmnet8 in virtual network editor.

based on a suggestion here

it turned out that during a NAT on vmnet8 on home ADSL broadband routers we need to give DNS IP manually so here is a screenshot of how my virtual network editor used to look previously

now based on suggestion I put up my ADSL router IP 192.168.1.1 as DNS IP as in below screenshot

nslookup still failed that screenshot after this reset etc can be seen here https://drive.google.com/file/d/1ZO2VioostBNYulgn6BT4aqf0C4lQ6yp0/view

after this setting of DNS when I did nslookup from virtual machine I got an error that reply not found or query could not be answered

however at the time of writing this answer I did nslookup in virtual machine as follows

Microsoft Windows [Version 10.0.18362.476]

C:\Users\Debian>nslookup www.vmware.com
Server:  UnKnown

Name:    e751.dscx.akamaiedge.net
104.114.87.171
Aliases:  www.vmware.com
www.vmware.com.ds.edgekey.net


internet connectivity was there in virtual machine.

as an extra information I am also giving the Network Adapter setting of VMware Workstation now if you see the output of ipconfig on virtual machine it is as below

Windows IP Configuration

Connection-specific DNS Suffix  . : localdomain
IPv4 Address. . . . . . . . . . . : 192.168.136.133
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.136.2


now see the vmnet8 IP in below screenshot
vmnet8 ip range is in 192.168.136.x range and IP of my virtual machine which VMware DHCP gave is 192.168.136.133 so obviously virtual machine got IP from vmnet8. So if you are using VMware behind an ADSL router in broadband setup then putting IP of your ADSL router in DNS settings i.e. virtual network editor-->Vmnet8--->NAT--->DNS Settings is where you should put it. I mentioned all this so that if some else gets here in future this should help him.

Also I want to mention that during debugging of all this things had messed up so badly that before proceeding with steps in this answer I had restored defaults from VMware network adapter settings and after that I had applied all the changes as mentioned in screenshot.

Here is a screenshot of ADSL router DNS settings page which is installed and I get internet access from this one, the model is Dlink Product Page: DSL-2750U screenshot of router accessible at 192.168.1.1 https://drive.google.com/file/d/1818cN4eYpT0rr9wu7R0T-pthRxmV1MlV/view