LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Fedore Core 7 Forgets Its DNS Settings on Reboot (https://www.linuxquestions.org/questions/linux-networking-3/fedore-core-7-forgets-its-dns-settings-on-reboot-603319/)

kaplan71 11-29-2007 02:17 PM

Fedore Core 7 Forgets Its DNS Settings on Reboot
 
Hi there --

I have a Fedora Core 7 server that loses its DNS settings on system reboot. The /etc/resolv.conf file does not maintain its entries even though they are entered by the root user.

The workaround that I have implemented involves the resolv.conf file saved under a different name, and a symbolic link under the appropriate name pointing to the other file. While this works, it does not fix the original problem.

Has anyone seen this, know what the cause is, and how it can be fixed? Thanks.

MensaWater 11-29-2007 02:47 PM

If your IP address is provided by DHCP then it is DHCP that is likely also overwriting your resolv.conf. Have a look at dhclient.conf.

There is a man page for that - you can tell it to use defined entries instead of overwriting from DHCP server.

Type "man dhclient.conf" to see detailed information for this file.

kaplan71 11-29-2007 03:01 PM

Hi there --

I ran a find command, and there apparently is no dhclient.conf file on the system.

MQMan 11-29-2007 04:08 PM

Do you use DHCP. If so, which client do you run. Look up the man pages for it, to see if it has an option to NOT overwrite /etc/resolv.conf.

Cheers.

MensaWater 11-30-2007 10:01 AM

Reviewing the /etc/sysconfig/network-scripts/ifup-eth0 script I see refrences to /etc/dhclient-${DEVICE}.conf.

This suggests it is using per device dhclient.conf files (e.g. dhclient-eth0.conf).

In the directory mentioned above have a look at your ifcfg-eth0 (or eth1 or eth2 etc... depending on which interfaces you're using) to see if you have "BOOTPROTO=dhcp" in the active ones. Then look for the device specific dhclient.conf files.

Also in above I notice a reference to the default /etc/dhclient.conf being allowed for generic purposes so you can probably create one if necessary. It likely isn't there because it is allowing for device specific ones.


All times are GMT -5. The time now is 03:00 AM.