This is for fedora OS
System->network->network configuration->devices->eth0->Ethernet Device->General
tick the following
- controlled by Network manager
- Activate device when computer starts
- statically set IP addresses – update address, subnet mask , default gateway address, primary DNS and secondary DNS
Also make sure that you updated ifcfg-eth0 (adding ip , net mask, gateway) in the directory (/etc/sysconfig/network-scripts)
restart the system or the network service (service network restart)