Since Linux knowledge is not very deep, it is only a summary of my own settings.
The first step is to set the/etc/network/interfaces
Add static IP Settings
Auto Eth0
Iface eth0 inet Static #配置为静态IP
Address 192.168.1.70 #静态IP为192.168.1.70
netmask 255.255.255.0 #子网掩码
#network 192.168.1.0 #所在网络
#broadcast 192.168.1.255 #广播地址
Gateway 192.168.1.1 #网关
Dns-nameserver 192.168.1.1
The Ps:brodcast and network can be calculated by the system and do not need to be set by yourself.
So the question is, how are these numbers determined?
The answer is that we can view the virtual machine by clicking on the Edit>virtual Network editor menu to enter the virtual NIC parameter settings interface. Select the VMnet8 entry and click the NAT Settings button to see our VMware Workstation default gateway for NAT-connected virtual machines, see, and click the DHCP Settings button You can see VMnet8 the available subnet IP ranges assigned to the virtual machine.
Problem solving ...
Step Two (optional): If the first step is unsuccessful, you need to set up DNS, modify/etc/resolvconf/resolv.conf.d/base
Add NameServer 192.168.1.1
Step three: Restart the NIC
sudo/etc/init.d/networking restart
ubuntu12.04 Static IP Setup Issues