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.
If you're using DHCP then it will get overwritten. If there's no problem with your connectivity then leave it. If you need to change it, either change the nameserver settings on your DHCP server (assuming you have access) or go static.
On my RedHat boxes I'm not doing DHCP but just did a man on dhclient and dhclient.conf and see both man pages are there so it seems likely the same works for Fedora. However they don't have a default dhclient.conf so far as I could see.
Anyway by doing the above on my Debian workstation I am able to use DHCP but keep it from overwriting resolv.conf.
I also tried to do something like that. There is such a file in
SuSe too.
When I googled I found that there is a file called dhclient.conf
in /etc but none was in mine. I ran man dhclinet.conf too and it
gave me results too showing how to configure it bit not the location.
I tried file search to find such a file but could not find. Maybe it is
is under slightly different name. I think I should try with some
wildcards.
Thanks for your suggestion.
It seems likely it belongs in /etc on RedHat/Fedora. The difference is probably they just don't ship you one - they expect you to create it from scratch. The man page for dhclient (not dhclient.conf) on my RedHat specifically indicates /etc/dhclient.conf as the location. However it does mention this location can be changed by /sbin/dhclient-script. You can view this script to see if it does override defaults.
Since essentially the one on Debian only has the line I show uncommented I think you should just be able to create a one line file called /etc/dhclient.conf. Insert the line shown in my prior post. (Of course you'd change domain1, domain2 and domain3 to those appropriate for your environment.) I don't think it would hurt to try this as at worst it simply wouldn't read the file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.