These two days need to configure the FTP server, but the virtual machine in the NAT mode is not connected to the external network, the host can be connected with the virtual machine through the SSH, the virtual machine can also ping the same network segment host IP address, but Ping is not through the outside network,
At first I was configured like this:
Host vmnet8:172.16.1.1
Virtual Machine Network configuration in Gateway: 172.16.1.1
Virtual Machine centos:172.16.1.10
In this way, try to start the Windows DHCP service, configure the virtual machine CentOS DNS and so on, real blind busy, real search, Virtual machine NAT Networking principle only understand that the virtual machine itself network configuration gateway is connected to the outside network channels, The host's vmnet8 should only be on the same network segment as the virtual machine CentOS, and I set the IP of the vmnet8 of Windows to the same IP settings as the virtual machine network configuration, so that the virtual machine CentOS is connected to the outside world via the gateway when it accesses the extranet. And my gateway and Windows IP conflict, so that CentOS will go directly to Windows to access the extranet, and Windows is not through the Vmnet8 IP connection outside the network, so, the virtual machine CentOS is impossible to face the extranet.
Workaround: Leave the virtual Machine network configuration as: 172.16.1.1
Change the IP of the host VMNET8 to the non-gateway IP in the 172.16.1.0 network segment
The virtual machine CentOS IP is also a non-gateway IP in the 172.16.1.0 network segment
This way, the virtual machine CentOS can access the extranet through the gateway of the virtual machine's NAT service!!!
CentOS in the virtual machine is not connected to the extranet in NAT mode