PC: Windows10 1909, i7-6700
VMware:VMware ® Workstation 15 Pro 15.1.0 build-13591040
VM System: Ubuntu 16.04
AND THE WEIRD THING IS
When I reboot Ubuntu virtual machine, it can't access internet. And I want to capture packet of "VMware Virtual Ethernet Adapter for VMnet8" in Windows 10 and help myself to check how it does not work, so I run Wireshark in Windows10, and click capture button, and then Ubuntu virtual machine can access internet at the same time.
After that, it can not access internet when I reboot or start it and I will run Wireshark and capture VMnet8 Adapter and it will be repaired temporary.
So someone can tell me how's it going? Thank you.
Welcome to the Community,
I can't tell you why this works at all, because - if I understand your setup correctly - you're using the same IP address twice, for the virtual host adapter as well as for the NAT gateway address (which is the ".2" address by default).
What I could think of is, that what you are trying to archive may work with a Host-Only network configuration.
André.
I guess that Wireshark is switching the adapter into promiscuous mode, quite why this opens up internet access without knowing everything about your specific setup I don’t know.
Welcome to the Community,
I can't tell you why this works at all, because - if I understand your setup correctly - you're using the same IP address twice, for the virtual host adapter as well as for the NAT gateway address (which is the ".2" address by default).
What I could think of is, that what you are trying to archive may work with a Host-Only network configuration.
André.
> What I could think of is, that what you are trying to archive may work with a Host-Only network configuration.
???? - am I missing something ? - it looks like that is what he already does ??? VMnet8 is a just another hostonly network like a default vmnet1.
Only difference is that the virtual nic normally gets just one IP - vmnet8 also establishes an alias using ...2.On a default vmnet8 an additional NAT-service is installed that listens on the virtual nic but only accepts NAT-requests that enter via the dot .2 alias.
To me this looks like expected behaviour !
Normal behaviour: internet does not work
Guest XY sends request for googe DNS to 8.8.8.8 to default gateway x.y.z.1 - request is unroutable and will be dropped.
New behaviour with Wireshark in capture-mode.
If I remember right promiscuos mode changes the behaviour of the nic and among other things does this:
- listen on all devices and on all aliases
- stops dropping packages that in normal mode would be dropped
If we look for a simple explanation for the reported behaviour it could be this one:
In normal conditions the NAT-service listening on x.y.z.2 in network x.y.z.0 would have nothing to do if all connected VMs/hosts send their requests to the default gateway x.y.z.1
If the change to promiscuos mode now has the effect that the normal rule:
handle all NAT-requests coming in via vmnet8 when they are addressed to the alias x.y.z.2
is changed to
handle all NAT-requests coming in via vmnet8
The result then would be that the actually misconfigured configuration for the VMware NAT-service fails to work in normal conditions but works when wireshark running on the host is added to the mix.
Guest XY sends request for googe DNS to 8.8.8.8 to default gateway x.y.z.1 - in promiscuos mode NAT-service no longer ignores requests coming in via the correct device but wrong alias.
Instead these requests are served - apparently successfully
I haven't thought about promiscuous mode, maybe you are right that is the reason.
Thanks, you gave me a correct direction. I change the Gateway ip in Virtual Network Editor and set it to 192.168.52.2 , and change the default route(gateway) to 192.168.52.2 in Ubuntu virtual machine, now these problems have been solved.
Thanks again.
Your explanation is clear and simple to understand. I agree with you.
But if I change the gateway ip to x.y.z.3 or x.y.z.2, it will be normal too.
gateway in Virtual Network Editor | gateway in Virtual Machine | HTTP(SOCKS5) | PING |
---|---|---|---|
192.168.52.1 | 192.168.52.1 | NO | YES |
192.168.52.1(running Wireshark) | 192.168.52.1(running Wireshark) | YES | NO |
192.168.52.2 | 192.168.52.2 | YES | YES |
192.168.52.2(running Wireshark) | 192.168.52.2(running Wireshark) | YES | YES |
192.168.52.3 | 192.168.52.3 | YES | YES |
192.168.52.3(running Wireshark) | 192.168.52.3(running Wireshark) | YES | YES |
192.168.52.3 | 192.168.52.2 | YES | NO |
192.168.52.3(running Wireshark) | 192.168.52.2(running Wireshark) | YES | NO |