Installing ubuntu12.04 on a virtual machine to automatically obtain the IP address is okay. The SSH connection is normal. After the instance is shut down and restarted, it finds that the network is disconnected.
1. Configure static IP
Gateway:
IP segment:
Command: Vim/etc/Network/interface
auto loiface lo inet loopback
auto eth0# Assgin static IP by eric on 26-SEP-2012iface eth0 inet staticaddress 192.168.91.200 #change to your static IPnetmask 255.255.255.0 #change to your netmaskgateway 192.168.91.2 #change to your getway#We must specify dns-nameserver here
Add DNS:
Vim/etc/resolv. conf
Add: nameserver 192.168.91.2
Restart NIC: ifdown eth0
IFUP eth0
NOTE: If/etc/init. d/networking restart or service networking restart is used, an error is prompted because the former has been discarded.
Detection Network: Ping www.baidu.com
If it succeeds, you don't need to read the following ····
However, when performing this operation, the landlord still prompts "unknown host", so he began to repeatedly check the configuration and confirm the route.
I tried to ping the gateway and found that the gateway couldn't be connected. I believe you can confirm the problem at this time. Open the network connection center and check the vm8 Nic status,
Enable DHCP and NAT service troubleshooting in the service.
This article has read the eliuhy article (http://www.cnblogs.com/objectorl/archive/2012/09/27/vmware-ubuntu-nat-static-ip-settings.html) after the problem still exists, so a little supplement to their own solution