In Red Hat Enterprise Linux 7 or CentOS 7, if you need to regenerate the /etc/sysconfig/network-scripts/ifcfg-eth* files, you can do so by using the nmcli command:
To find out what devices the OS currently knows exist, use:
That will return a list similar to the following:
DEVICE TYPE STATE CONNECTION em1 ethernet connected em1 em2 ethernet connected em2 em3 ethernet disconnected -- em4 ethernet disconnected -- lo loopback unmanaged --
Then, to regenerate an ifcfg file for ’em3′, execute:
#nmcli device connect em3
That will attempt to reconnect the device, and regenerate the ifcfg-em1 file.
From there, you can do whatever it is you needed to do with the file.