1. using the bridge mode in VMware.
2. vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static #dhcp改为static
ONBOOT=yes
3. add these
IPADDR=192.168.0.168
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
DNS1=192.168.0.1
4. #service network restart