network does not work after reboot

Latest response

Hello,

After reboot eth0 is not active.
When I type "service network restart" there is error:

Bringing up interface eth0: /etc/init.d/functions: line 571: .ifup: No such file or directory

RTNEETLINK answers: File exists
(repeated 9 times)
..

It is very strange because after successful network configuration several months ago I did not change any network setting or scripts.

I have just open Support Case and send sosreport. RedHat support says that configuration ifcfg-eth0 is good, but they can not support me directly because of some formal problems (subscriptions, etc.). I do not understand this, but it is another problem.

Could you help me?

Temporary I have configured network using ifconfig and route commands and its work, but after restart the configuration is lost. I do not want writing some strange script. We use commercial system and everything shold work in professional way.

Best regards,
Kamil Frydryszek

Responses

I agree that the issue you have does not seem to point to a missing/invalid configuration file. Otherwise, I would expect the following output:

# ./ifup eth1
./ifup: configuration for eth1 not found.
Usage: ifup <device name>

It seems as though there is an issue with ifup being missing (or /etc/init.d/network itself was modified - you should a "cd" command in that file). You should find ifup in two locations

# ls -l /sbin/ifup 
-rwxr-xr-x. 1 root root 4367 Oct 10  2013 /sbin/ifup
# ls -l /etc/sysconfig/network-scripts/ifup
lrwxrwxrwx. 1 root root 18 Sep  4 08:05 /etc/sysconfig/network-scripts/ifup -> ../../../sbin/ifup

Do you know when this issue began?

# find /etc/ -mtime -7

I actually did not know exactly how the "ifup" process worked, so, I started to dig a little and the following should help you determine if ifup is not as expected.

[root@apoc ~]# yum whatprovides /sbin/ifup
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
initscripts-9.03.40-2.el6_5.1.x86_64 : The inittab file and the /etc/init.d scripts

/***** TRUNCATED OUTPUT *****/

In this example, I will first verify the files included with initscripts. I will then modify a file (to show how the verify will change). And then.. I will re-install the initscripts package (via yum)
NOTE: I am doing this on a test system - based on the output (below), it appears that only systctl.conf has changed. Therefore I am comfortable messing with my system. If this is/was a production system I cared about, I would still run the verify, etc. but I would be extra diligent to determine exactly what the re-install would impact.

[root@apoc ~]# rpm -V initscripts
S.5....T.  c /etc/sysctl.conf
[root@apoc ~]# echo "" >> /sbin/ifup
[root@apoc ~]# rpm -V initscripts
S.5....T.  c /etc/sysctl.conf
S.5....T.    /sbin/ifup
[root@apoc ~]# yum reinstall initscripts
Loaded plugins: product-id, rhnplugin, security, subscription-manager

/***** TRUNCATED OUTPUT *****/

Installed:
  initscripts.x86_64 0:9.03.40-2.el6_5.3                                                                                                              

Complete!
[root@apoc ~]# rpm -V initscripts
S.5....T.  c /etc/sysctl.conf
[root@apoc ~]# 

Hello,

Thank you veru much for help.

Symbolic links ifup and ifdown in /etc/sysconfig/network-scripts were missing.
I have just created them

cd /etc/sysconfig/network-scripts
ln -s ../../../sbin/ifup
ln -s ../../../sbin/ifdown

But I still do not know what happend...

Thank you

Best regards
Kamil Frydryszek

I'd run through your sudo log or root's shell history to find out ;-)
I don't know for certain whether the SElinux contexts apply to the symlinks (nor would they be automatically applied when created).

# ls -lZ ifup
lrwxrwxrwx. root root system_u:object_r:bin_t:s0       ifup -> ../../../sbin/ifup

Of course to reapply the correct context

restorecon -Fv /etc/sysconfig/network-scripts/ifup