Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i am using lamp server on Cent os 5.5, but there is issue with my resolv.conf file. after every reboot or restart of network service i need to edit the nameserver details. how can i make resolv.conf file permanent after editing.
i am using lamp server on Cent os 5.5, but there is issue with my resolv.conf file. after every reboot or restart of network service i need to edit the nameserver details. how can i make resolv.conf file permanent after editing.
I have a caching nameserver set up and the instructions in the resolv.conf originally read such that creating a resolv.conf.head file with the ip of your preferred nameserver would supersede the resolv.conf file.
Check in /etc/sysconfig/ or the config for dhclient for a setting on whether dhclient updates /etc/resolv.conf. Also Better yet, don't use dhclient on a server. All servers should have static addresses.
You can also change the attribute of the file to prevent modifying. Before resorting to this, check the boot logs for messages about modifying resolv.conf.
Check in /etc/sysconfig/ or the config for dhclient for a setting on whether dhclient updates /etc/resolv.conf. Also Better yet, don't use dhclient on a server. All servers should have static addresses.
You can also change the attribute of the file to prevent modifying. Before resorting to this, check the boot logs for messages about modifying resolv.conf.
It seems as if you are using dhcp. The dhcp server appears to be resetting your resolv.conf file each time you restart. Try setting a fixed i.p. address for the network card.
The chattr problem may be due to the mount options used for the filesystem. Try adding the user_xattr option.
I second the idea of setting your network options; IP address, netmask, default gateway settings. One should be able to depend on a server's IP address. Then don't start the dhcp client service, or even uninstall it.
I am not sure if this is available on CentOS, but in slackware there is /etc/resolv.conf.head.
whatever you put there will be added on top to the overwritten /etc/resolv.conf
Ofcourse changing permissions or trying this is not the perfect solution.
I am not sure if this is available on CentOS, but in slackware there is /etc/resolv.conf.head.
whatever you put there will be added on top to the overwritten /etc/resolv.conf
Ofcourse changing permissions or trying this is not the perfect solution.
there is nothing like /etc/resolv.conf.head in cent os.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.