Nat Mode:
A virtual machine can sisu a network and can access other computers on the same network as the host computer (and vice versa).
First step: Set up virtual machine VMware network parameters
(1) Open the virtual machine, select the menu "edit" "Edit virtual network", such as: Select Nat mode, and turn on the DHCP service.
(2) Restore the default parameters first and then set NAT. Set up a subnet IP, gateway, etc. for a virtual network
2. Setting virtual network parameters for physical hosts
(1) Open the network connection of the physical host, locate "VMware network Adapter VMnet8" and right-click the settings property:
(2) Set the virtual network IP address of the physical host:192.168.230.x,x between 0~255, but not with the subnet IP of the virtual network above. The subnet mask of the physical host's VMnet8, the default gateway and the subnet mask of the virtual network obtained above, the gateway must be consistent, or the virtual machine cannot be networked. DNS can be set to ignore, if set, can take advantage of Google's free dns:8.8.8.8 and 8.8.4.4
3. Start the virtual machine Ubuntu
(1) Start the virtual machine Ubuntu system, open the terminal and use the following command to open and edit the network interface configuration file:
sudo vi/etc/network/interfaces
(2) The default editing files are as follows (do not make any changes):
Auto Loiface lo inet loopback
(3) We directly use DHCP to obtain dynamic IP, do not need to set the static IP host, and set the static IP, there will be eth0 can not start the bug (said to be a bug in Ubuntu) (4) Ping 192.168.230.2 (gateway address) through, you can normally surf the internet.
Attention:
1. If the host is using a limited network, you need to set up the local Area Connection shared VMnet8 virtual network card, the same as the host using WiFi, you need to set up the host's wireless network share VMnet8 virtual network card.
Ubuntu 12.04.1 Network Settings (NAT mode) under VMware virtual machines