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.