Settings for connecting to the network in NAT mode under vm

Specific configuration of
NAT mode NAT mode: The virtual machine can access the external network and access other computers on the network where the host computer is located (not vice versa).
1.1.1. View the network parameters of the virtual machine

1) Open the virtual machine and select the menu "Edit" > "Edit Virtual Network", as shown below:



2) Select "VMnet8NAT" in the list and click the "NAT Settings" button, as shown below:



3) Record the subnet IP of the virtual network: 192.168.72.0, gateway IP: 192.168.72.2
1.1.2. Set the virtual network parameters of the physical host
1) Open the network and sharing center of the machine, find "VMwareNetwork Adapter VMnet8", right Click to set properties:



2) Set the virtual network IP address of the physical host: 192.168.72.X, where X is between 0 and 255, but cannot be the same as the subnet IP of the virtual network above. The subnet mask and default gateway should be consistent with the subnet mask and gateway of the virtual network obtained above. DNS can be set or ignored, if set, you can use google's free DNS: 8.8.8.8 and 8.8.4.4.


1.1.3. Set the network parameters of a specific virtual machine 1

1) Open a specific virtual machine, find the network connection, and set it: as shown in the figure



2) Set the network IP address of the virtual machine: 192.168.72.X, X is between 0 and 255, but it cannot be the same as the subnet IP of the virtual network and the instant network IP of the physical machine. The subnet mask and default gateway should be consistent with the subnet mask and gateway of the virtual network obtained above. DNS can be set or ignored, if set, you can use google's free DNS: 8.8.8.8 and 8.8.4.4.
If you have a virtual machine, you can do the same.


1.1.4. Set the network parameters of the specific virtual machine 2 (make sure it is correct here)



[root@ ~]# /etc/init.d/network restart Restart the network card or use the command: [root@ ~]# service network restart


End***

Guess you like

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