VMware virtual machine NAT mode network connection

How to set up network connection in VMware virtual machine NAT mode, the whole process from beginning to end~! !

This article is reproduced from: https://www.cnblogs.com/lyangfighting/p/9518726.html

Many articles on the Internet are now bridging. Bridging is the IP that occupies the network segment of the physical machine, and the nat mode can use a virtual router to assign a virtual network segment to the virtual machine.

Today I am fortunate to see the original author's article on nat mode. So reprint and share once

 

1. First check whether your virtual machine service is enabled, and select the service in the computer to check;

1. Right-click on the computer and select Manage 
Serve

2. Enter the management and select the service at the beginning of VM. If it is not opened, right click to open it 
start service

2. After the virtual machine service is started, check whether the network card of the local network virtual machine is started

1. Right click on the network logo in the lower right corner of the computer to enter the network and sharing center

network

2. Click Change Adapter to check whether the virtual network card of the virtual machine is started. If it is not started, right-click to start it 
network 
Turn on the network card

3. Set the ip address after the network card is turned on. The ip set here has nothing to do with the ip of the machine. It is set to the ip address network segment required by the computer running in your virtual machine

 

3. At this point, your local machine settings are complete, and it is time to set up the virtual machine

1. Open the virtual machine, select the operating system you are using, open the details page, select the network adapter, select the NAT mode and select the connection at startup, as shown in the figure below; 
network adapter

2. After selecting, click Edit on the virtual machine page to enter the virtual network editor 
edit

3. After entering, this window will appear, select the lower right corner to change the settings, use the administrator to modify 
  3.1. Select VMnet0 , please pay attention to whether you choose a wireless network or a local connection when bridging

  3.2 Here is the network connection of my computer, one-to-one correspondence with the above picture

 

4. After the change is completed, change the ip address below. The ip address segment here and the ip you set in the local network virtual network card (2-3) should be in the same network segment. The ip address is set on this machine. The ip network segment is set here 

 

5. Select DHCP and set up your virtual machine to assign the ip address range of the virtual computer 

 

6. After setting up DHCP, set the gateway, select NAT setting, and set the gateway address of your virtual computer. 

 

4. At this time, the necessary conditions have been cooperated. Turn on the virtual computer and enter the IPv4 settings. 

1. Enter the ifcfg-ens33 file to set the ipv4 setting information   through the command

  

  1.1 The range of ip address needs to be within the range of ip address assigned by DNCP above

  1.2 Set the network management address of the virtual machine to be consistent with that of the host

 2. By setting

  Add two nameservers to the configuration file 

3. After the modification is completed, restart the network connection through service network restart

4. At this time, when you ping again, it will be successful

Guess you like

Origin blog.csdn.net/zs319428/article/details/114398521
Recommended