I have been using the NAT method of vmware workstation for Internet connection, but I have never used a virtual machine to access the Internet. Today I suddenly need to use it, but I cannot connect to it. Now, record the process of connecting to the Internet through NAT. First, describe the vm8 virtual Nic function created by the vmware workstation installer on the host.
Www.2cto.com many people think that this virtual network card is the network card used to connect to the Internet through NAT in workstation. In fact, this virtual network card is only used to provide host and Virtual Machine access. The real location for providing Virtual Machine network servers is the virtual switch in the workstation program. Open the network configuration of workstation as follows:
Www.2cto.com
Www.2cto.com we can see several commonly used network card, vmnet0-bridge, vmnet1-host only, vmnet8-nat here we need to configure is vmnet8 to see the diagram explanation 1: Here set the network segment. Set network segments based on your preferences. If you have changed the network segment, You need to disable the Virtual Machine and restart the network. NOTE 2: this is the location configured for NAT.
The gateway here is very important, because when you set an IP address in the virtual machine, the gateway must specify this address. At the same time, you can also use this gateway as the DNS description of the built-in Virtual Machine 3: The third step is to set the vswitch to provide the DHCP server, and then the IP address range obtained by the client is mentioned here. In fact, for vmnet * in workstation, It is a switch, but the switch configuration is relatively simple and does not provide too many functions. Www.2cto.com according to the above configuration, my personal suggestion is to shut down the virtual machine, and then re-boot, otherwise the network may fail. In addition, if you change the network segment and the host wants to communicate with the virtual machine, you need to change the virtual network card vmnet8 in the host.