CentOS 6.5 not bringing up network interface automatically after reboot [ifup eth0]
Solution 1
Ensure that the file /etc/sysconfig/network-scripts/ifcfg-eth0
has the line
ONBOOT="yes"
See 9.2. Interface Configuration Files for details.
Solution 2
Make sure ONBOOT="yes"
is set in /etc/sysconfig/network-scripts/ifcfg-eth0
also check that
NetworkManager
or network
(whichever you use) is started on boot.
chkconfig NetworkManager on
or chkconfig network on
Solution 3
Configuration file must have right privileges also:
sudo chmod 0755 /etc/sysconfig/network-scripts/ifcfg-*
At /etc/sysconfig/network
can have those lines:
NETWORKING=yes
HOSTNAME=myhostname.mydomain
NETWORKING_IPV6=yes
Rudolph
Updated on September 18, 2022Comments
-
Rudolph over 1 year
I am having this issue with many of my CentOS servers where after a reboot the network interface fails to come up automatically. This is a big problem for me since I need to drive to the datacenter every time when this happens as a result from a remote reboot. Then on the console eth0 is down and I have to ifup this manually. Is there a specific config file I can check to prevent this from happening in the future?
-
Michael Martinez about 10 yearsOne thing to look at is to make sure the designation of NIC device is consistent across reboots. There's like about 3 places you need to look at for this. I don't remember offhand what they are - I've got them written down at my other job, so later I'll take a look and post here. The reason I say this is because I've had this happen before a number of times, and it turned out that the OS was relabeling "eth1" as "eth0" and vice-versa during reboot. ... Annoying! But there's a way to force it to be consistent.
-
-
zzapper over 7 yearsI needed chmod 0755 if* it was absolutely critical I was getting ifdown /ifup,ifpost 'permission denied' this solution here was the only one I was able to Google. I'd inadvertently backed-up and restored the config files without a cp -p (preserve)
-
Bruno Gasparotto almost 7 yearsAlso worked on CentOS 7.2.