Http://tompig.iteye.com/blog/1113023
Ubuntu VMware uses Nat to set the network
1. Setting method:
Set the VM as follows:
Step 2: Set the virtual Nic
Step 3:
Use the command to set the IP address of ubuntu
Liujicheng @ Ubuntu-Liu:/etc/network $ sudo VI Interfaces
Set as follows:
Iface eth0 Inet static
Address 192.168.224.4
Netmask 255.255.255.0
Gateway 192.168.224.2
Auto eth0
Then save
Step 4:
Liujicheng @ Ubuntu-Liu:/etc $ touch resolv. conf
If the file does not exist, create the file. The prompt is displayed when the file is created.
"Touch: Unable to create" resolv. conf ": insufficient Permissions"
Switch to the root user: Use
Liujicheng @ Ubuntu-Liu:/etc $ su Root
Password:
Under etc
Written in sudo VI resolv. conf:
Nameserver 192.168.224.2
Save,Restart service
/Etc/init. d/networking restart
Step 5: This is Windows
So far, the settings have been completed.
Finally, do not forget to check whether the DHCP service and NAT service on windows are enabled.
For example: