The problem of mutual ping between win7 host and linux in vmware

Scenes:

A windows7 host with vmware 10 version installed.

Two virtual machines, one win7 and one centos.

All three machines have their firewalls turned off, and the IP addresses are as follows:

win7 host: 10.254.254.226

win7 virtual machine: 192.168.3.128 (DHCP acquired)

centos VM: 192.168.3.140 (STATIC manual setting)

Phenomenon: 

       The win7 host and the win7 virtual machine can ping each other and both can access the Internet.

       The win7 virtual machine and the centos virtual machine can ping each other.

       The win7 host can ping the centos virtual machine, but the centos virtual machine cannot ping the win7 host.

After exploration, I found the following configuration:

1. Click Edit - "Virtual Network Editor -" in vmware, you can see that vmnet8 is in NAT mode, click "NAT mode (share the IP address of the host with the virtual machine) (N)" under "VMnet information" In the following "NAT settings (S)", you can see that the gateway of vmnet8 is set to 192.168.3.2, so the gateway in my centos is also set to 192.168.3.2. This is correct.

2. Open the network connection, check the ip address of VMware network adapter vmnet8, and find that I manually set it to 192.168.3.2.

      It is this setting that prevents the connection between the centos virtual machine and the win7 host. Because vmware has built a 192.168.3.2, we do not need to actively create a 192.168.3.2, otherwise the network will not be able to forward normally.

 

Solution: Change the ip address of the VMware network adapter vmnet8 to obtain it automatically.

After modification, we found that his IP address changed to 192.168.3.1 instead of 192.168.3.2. This may be a modification of a later version of vmware.

We found that the gateway of the win7 virtual machine is 192.168.3.2, and the gateway of the centos virtual machine is also 192.168.3.2, so the higher version of vmware actually uses the "virtual network editor" to modify the gateway, not like the lower version, Modify the gateway by modifying the IP address in the vmware network adapter in the network connection.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325482404&siteId=291194637