This tutorial shows how to setting up network connection after installing Ubuntu guest machine on Windows host using Vmware.
For convenience, I installed both Ubuntu guest on Windows host and Windows guest on Ubuntu host using Vmware. Windows guest machine automatically connected to internet after installation, but Ubuntu guest machine didn’t. To get Ubuntu’s internet connection work,we need do following configurations:

1. In Vmware window, launch the Virutal Machine Settings and set network adapter method NAT

2. In windows host, head to Start -> Run -> cmd -> ipconfig. There we need:

in the picture:
192.168.174.1: vmware network adapter ip address
192.168.174.2: for NAT devices, use as dns and gateway
192.168.174.3 ~ 192.168.174.127: hold back
192.168.83.128 ~ 192.168.83.254: dhcp for virtual machines

3. In Ubuntu Virtual machine, open up terminal:

edit /etc/network/interfaces with your favorite editor:

sudo gedit /etc/network/interfaces

copy and paste following to make it look like:

iface eth0 inet static

  address 192.168.174.200

  netmask 255.255.255.0

  gateway 192.168.174.2

  auto eth0

edit /etc/resolv.conf:

sudo gedit /etc/resolv.conf

add this line:

nameserver 192.168.174.2

Now restart network service by:

sudo /etc/init.d/network restart