I believe that the first time I used vmware workstation to install a Linux virtual machine, how to set it to allow the VM and the host to share the Internet is a headache. At least I have searched for many ways to try it online, however, after several failures, the setting was successful, and both the host and the virtual machine could access the internet. The following describes how to set it, I hope it will help people who have the same problems as me.
First of all, my host uses China Telecom's ADSL dial-up method to access the Internet. the dial-up software uses the dial-up software that comes with windows to connect to the dial-up method.
The procedure is as follows:
Step 1: Obtain the network configuration of the host.
Click the Start Menu, click Run options, Enter cmd to bring up the Windows Command window, and enter
Ipconfig/all command to query the network configuration information of the host and record the address of the DNS server of the host, such as 222.246.129.81,
Then, view the network configuration information for the vmnet8 connection named VMware network adapter in the network connection.
Description:
Figure 1
Double-click VMware network adapter vmnet8. A dialog box is displayed. Click the support option to view the network configuration.
Information, as shown in Figure 2:
Figure 2 Network configuration of VMware Network Adapter VMnet8
Record the IP addresses and subnet mask addresses, which are 192.168.44.1 and 255.255.255.0 respectively.
Step 2: In the virtual machine, set the network connection mode to NAT connection mode, start the virtual machine, and click edit-> virtual network editor. A dialog box is displayed, as shown in 3:
Figure 3
Click Nat settings to view the NAT gateway address, as shown in Figure 4:
Figure 4
Figure 4 shows that the NAT gateway address is 192.168.44.2. Write down this address and use it later. So far, we have recorded such addresses:
VMware network adapter vmnet8 IP Address: 192.168.44.1, subnet mask: 255.255.255.0
NAT gateway address: 192.168.44.2
Host DNS server address: 222.246.129.81
Step 3: Enter the network configuration of the VM, as shown in Figure 5:
Figure 5
Double-click the blue Bottom Bar to bring up the IP Address Configuration option window, as shown in 6:
Figure 6
Enter the IP address, subnet mask, and default gateway address recorded in the corresponding phase respectively. Note that the IP address must be changed and cannot be the same as the recorded IP address. Change 192.168.44.1 to 192.168.44.5, you can also change it to another one. After filling in the information, click OK. Go back to the main network configuration page, and click DNS options. 7, as shown in figure 8, enter the DNS server information of the first recorded host in the corresponding column.
Figure 7
Figure 8
Step 4: Open your browser and enter the Web site for testing so that you can access the Internet smoothly!