CentOS 6.x on VMware or ESXi  – No network adapter (eth0)

If you use dhcp in your network, run the following command

#dhclient eth0 -v

if you use static ip, run the follow command:

#ifconfig eth0 IPADDRESS

eg: #ifconfig eth0 192.168.10.21

run the ifconfig now, you can see the IP address.

 

Assign statically all other information

Configure eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
NM_CONTROLLED=”yes”
ONBOOT=yes
HWADDR=a2:cb:a3:23:f4:5c
TYPE=Ethernet
BOOTPROTO=static
NAME=”System eth0″
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.10.21
NETMASK=255.255.255.0
Configure Default Gateway
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linuxsvr
GATEWAY=192.168.10.1
Restart Network Interface
/etc/init.d/network restart
Configure DNS Server
# vi /etc/resolv.conf
nameserver 192.168.10.1 # Replace with your nameserver ip
nameserver 139.130.4.4 # Replace with your nameserver ip
Do ping to any website, eg: ping www.google.com – it will work. Enjoy!