LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-29-2004, 02:50 PM   #1
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL 5
Posts: 220

Rep: Reputation: 31
resolv.conf changing everytime network restart


Hello,

I am running Fedora Core 3. I need to have a few DNS Search Paths in my /etc/resolv.conf. If I add them directly or by way of system-config-redhat they disappear after a reboot or if I do a $service network restart. I believe dhcp is putting the defaul one in and removing the others. Does anyone know of a way around this?

Thanks in advance!

Chris
 
Old 11-29-2004, 02:58 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
yeah this is part of the DHCP specifications, you'll need to add a command line flag to your dhcp client, normally there's a DHCPARGS variable, which you would specificy in /etc/sysconfig/network-scripts/ifcfg-eth0. if you're using dhcpcd, it's the -R option, but this will proabbly vary on othter clients, e.g. pump, dhclient, dhcpxd check tha relevant manpage for your option.
 
Old 11-29-2004, 02:58 PM   #3
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Try putting
Code:
request subnet-mask, broadcast-address, time-offset, routers;
in your dhclient.conf. Further information can be found in man dhclient.conf
 
Old 11-29-2004, 03:01 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
The best way is probably to edit your dhclient-script (probably /sbin/dhclient-script) and comment out all the lines in the "make_resolv_conf" function - leave the function itself though.
 
Old 11-29-2004, 08:19 PM   #5
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL 5
Posts: 220

Original Poster
Rep: Reputation: 31
Thanks David,

I commented the sections relating to make_resolve_conf. Works like a champ. I will just have to keep an eye on the nameservers just in case they change!

Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
at restart resolv.conf it is like it has to be??? meDream Linux - Networking 10 05-27-2005 02:16 AM
/etc/resolv.conf mustangfanatic Suse/Novell 5 10-18-2004 09:28 PM
where does system-config-network put dns info, besides /etc/resolv.conf ? bdp Fedora 1 09-03-2004 12:09 AM
Everytime restart MDK, I have to reconfigure my SBLive 5.1 card to get sound Fear58 Linux - Hardware 3 07-12-2004 09:37 PM
/etc/resolv.conf keeps changing silvercastle Linux - Networking 2 04-15-2004 10:51 PM


All times are GMT -5. The time now is 11:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration