Page 1 of 1

[SOLVED] eth0 doesn't load configuration from ifcfg-eth0

Posted: 2017/04/03 15:03:15
by Meditsh
Hello everyone,

I am using a CentOS virtual machine which interface eth0 is correctly running.
The problem is that after rebooting the virtual machine its configuration will reset with information which I don't know the origin. I just know that this is not from ifcfg-eth0 since DNS addresses don't match. That is my problem, I don't want to lose DNS after each unexpected reboot.

What I tested :
  • After rebooting eth0 and resolv.conf get a wrong DNS address
    After rebooting, the command "sudo service network restart" load correct DNS address to eth0 and resolv.conf
    Inside ifcfg-eth0 : Editing BOOTPROTO from "none" to "static" --> After reboot it is reset to "none"
    Inside ifcfg-eth0 : Changing IPADDR --> after reboot it is reset to its first value
    Inside ifcfg-eth0 : Changing DNS address --> after reboot value is not reset. But eth0 doesn't get it. After "sudo service network restart" the value is set to eth0.
    Inside ifcfg-eth0 : Adding the line HWADRESS with MAC address get on virtual machine network adapter summary --> doesn't change anything
    Inside ifcfg-eth0 : Adding the line "PEERDNS=NO" --> doesn't change anything

Here is the /etc/sysconfig/network-scripts/ifcfg-eth0 content (X stand for my private information) :

Code: Select all


Please help me to get permanent DNS configuration,

Thank you per advance.

Re: eth0 doesn't load configuration from ifcfg-eth0

Posted: 2017/04/03 15:12:18
by TrevorH
Is this really running CentOS 5? It went End of Life a few days ago and there will be no more updates for it. You should migrate to a supported release ASAP.
Inside ifcfg-eth0 : Editing BOOTPROTO from "none" to "static" --> After reboot it is reset to "none"
They are the same thing in any case. The network scripts only look for dhcp and bootp, anything else including 'none', 'static', 'fred', 'george' all mean the same thing - i.e not DHCP.

What's the output from chkconfig --list | grep -i netw ?

Re: eth0 doesn't load configuration from ifcfg-eth0

Posted: 2017/04/04 06:32:57
by Meditsh
Thank you TrevorH for this information and quick response.

The command chkconfig --list | grep -i netw display this line :

Code: Select all

network	0:off		1:off		2:on		3:on		4:on		5:on		6:off
In my first message I forgot to mentioned that this CentOS machine is a PowerChute Network Shutdown Virtual Appliance (from APC company). As I am running out of idea I am going to look for any clue in APC's forum.

Since Yesterday I changed "HWADDRESS" to "HWADDR".
I noticed that eth0 get IPV6 adress even though "IPV6INIT" is set to "NO". I also noticed that "IPV6INIT=NO" become "IPV6INIT=no" after each reboot.

[SOLVED] eth0 doesn't load configuration from ifcfg-eth0

Posted: 2017/04/05 07:24:38
by Meditsh
I created another Virtual Machine to replace it.
This one was initiated with correct network values and have exactly the same behaviour : when changing the DNS in ifcfg-eth0 and rebooting, the resolv.conf file get DNS from an unknown place, and doing a "service network restart" make it load ifcfg-eth0 again.
Thus I assumed either VMware (PowerChute Network Shutdown) makes it use a special configuration file for the initiating, or the problem is linked with the output of the "chkconfig" command TrevorH made me use.

Then I tried to configure network from VAMI (Virtual Appliance Management Infrastructure) scripts integrated in /opt/vmware but it is also reset after rebooting.

I am going to use my new Virtual Machine instead of the first one which can't remember correct DNS so then my problem seems to be solved (as I soon as I am not supposed to change my DNS everyday ^^). But the mystery still remains.

I am going to wait until this night and put the topic to in "SOLVED" state.

TrevorH thank you again for your help.