Problem description:
After installing the Ubuntu system, you can directly access the Internet through NAT. The specific difference is not very clear.
After a while, I found that the domain name cannot be resolved, but still can access the corresponding IP address of the domain name.
It indicates that there is a problem with the DNS server obtained by the virtual machine.
Solution:
Open edit-> Virtual Network editor of VMware Workstation and you can see a vmnet list. Click vmnet8 (this virtual network card is used when Nat is used ),
Click the NAT setting button. In the NAT Setting dialog box, click DNS setting. The DNS dialog box is displayed. the default option is automatic selection of virtual machines,
Enter the IP addresses of several DNS servers that you know.
Then you can access the Virtual Machine System.
Restart Network Service:
For Ubuntu:
Restart: sudo/etc/init. d/networking restart
Start: sudo/etc/init. d/networking start
Stop: sudo/etc/init. d/networking stop
For RH:
Service Network restart
Service Network stop
Service Network start
Refer:
Http://nixcraft.com/linux-software/458-ubuntu-linux-start-stop-restart-networking.html
Http:// OS .51cto.com/art/201003/186916.htm