It was showing this This device is not active . Then I got the reason why its not working. After that I edited /etc/sysconfig/network-scripts/ifcfg-eth0 file with only this content and deleted all the other lines.