Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason, ifcfg-eth* under /etc/sysconfig/network-script were deleted.

Are there any tools that could detect network interfaces and re-generate these files?


Another question :

If I manually added ifcfg-eth0, is there any method to make it work without reboot?

I tried /etc/init.d/networking restart, and it doesn't work.

share|improve this question
    
Red hat, CentOS, or what? –  kmarsh Mar 15 '10 at 12:18

3 Answers 3

up vote 5 down vote accepted

Also, since it looks like you're running some sort of Redhat-derivative, you can try

 system-config-network

Configure the interfaces, then run

 service network restart
share|improve this answer
    
It seems system-config-network generates files under /etc/sysconfig/network/devices. Need to copy it to /etc/sysconfig/network-scripts. Then that's the "System eth0" –  Cheng Aug 16 '10 at 3:42

cat /proc/net/dev and regenerate those yourself. ifdown ethX && ifup ethX should work for restarting that interface

share|improve this answer

One Red Hat and derivatives, I found the best thing to do is consolidate the contents and then delete all but one of the ifcfg-eth* files, and then soft link them all together. That way, what the system is running cannot get out of sync with what you thought you set up, but did not actually take, in the configuration menus.

While this move may seem radical, it has worked well with many hundreds of server years of combined up time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.