(1) After installing VMware, open cmd command line input services.msc Enter the service window, need to turn on DHCP and NAT service.
(2 ) in the menu bar options -- Edit - Virtual Network editor,
in our Ubuntu is set in NAT mode of VMnet8 , so click Select VMnet8 , you can also see VMnet8 the Gateway NAT Set :
Visible, Gateway IP are: 192.168.253.2 , which is then used to configure DNS Server
( 3 ) win Host Input Cmd-->ipconfig can see VMware Network Adapter VMnet8 of:
The subnet mask is 255.255.255.0
IP The address is: 192.168.253.1
( 4 ) Enter ubuntu14.04 to configure
Ubuntu Network configuration information is placed in the /etc/network/interfaces in (sudo gedit/etc/network/interfaces)
1. If the configuration dynamically acquires IP, add the following to the above file:
Auto Eth0
Iface eth0 inet DHCP
2. If you configure a static IP, add the following:
Auto Eth0
Iface eth0 inet Static
Address 192.168.253.X (3~255)
Netmask 255.255.255.0
Gateaway 192.168.253.2 (This is the gateway IP inside the NAT configuration information)
3. Configure the DNS server
Ubuntu DNS server information, placed in the/etc/resolv.conf,
Add DNS server address
nameserver 192.168.253.2 (This is the gateway IP inside the NAT configuration information)
4. Restart the Network Service
sudo/etc/init.d/networking restart
5. Test If you can ping the external network
However: Ping www.baidu.com tip Network is unreachable
WORKAROUND: You need to add a default gateway
Command:
sudo route add default GW 192.168.8.2
In general, each reboot is added once.
6. Ping wwwbaidu.com// success!!!
( ext) 42501071
VMware under ubuntu14.04 Nat Way Online