Open file for ethX using vi, type:
vi /etc/sysconfig/network-scripts/ifcfg-ethX
If you want to activate eth0 then you will need to edit file of "etc/sysconfig/network-scripts/ifcfg-eth0" and ensure that it is having below section with ONBOOT=yes
Sample config file:
# Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:19:B1:2A:BA:B8
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.xx
ONBOOT=yes
Save and close the file.
Once done restart networking (by running service network restart
).