LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2010, 10:39 AM   #1
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Rep: Reputation: 0
Resolv.conf Fedora-10


Same issue as posted. Wont stay set. reboot clears entry's. I been through all the threads and I can't seem to fix it. This is painfull,
Any new ideas ?
 
Old 01-25-2010, 10:44 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
If you are using DHCP, resolv.conf will always be reset at boot time. If you want to keep it and still use DHCP, you would need to modify the boot scripts. Unless there is a Fedora specific configuration for that, I don't personally know.
 
Old 01-25-2010, 11:29 AM   #3
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I just placed what I previously wrote in code tags as I have now figured out the answer... at least for CentOS...

Code:
Before you follow what I say, ensure that you back up the dhclient script in case you need to restore it later on. Also I am doing this from CentOS and not Fedora, I am hoping they are the same here.

In /sbin/dhclient, you should find a line that is like

if [ "${PEERDNS}" == "no" ]

change this to

if [ "no" == "no" ]

And this should fix this issue but it is only a temporary fix and probably not recommended, I am currently trying to figure out where it's drawing ${PEERDNS} from.
EDIT: Here is how I figured to stop it in CentOS, this should work in Fedora too but I am not 100% on this.

In CentOS the answer is to set "PEERDNS=no" in the device file in /etc/sysconfig/network-scripts/

So if the device is eth0 then open the file /etc/sysconfig/network-scripts/ifcfg-eth0 and add the line
PEERDNS=no

This should stop this behavior, as a result in the investigation of this caused a bug where the DNS settings revert when I do enable dhcp to their initial pre-dhclient values after about a minute... but meh, I don't use dhcp anyway.

Last edited by r3sistance; 01-25-2010 at 12:00 PM. Reason: Found the answer (for centos at least)
 
Old 01-26-2010, 09:43 AM   #4
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Nope, Still not working. This is Fedora - 10. Can I disable dhcp ? I remember during the install process that DHCP was enabled. After the install process, I changed the address and made the the interface static, So I thought.Is the information seeded from a default location? Can I change the way the Network starts up?
Thanks for helping

Last edited by tommy991; 01-26-2010 at 10:17 AM.
 
Old 01-26-2010, 11:47 AM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
you should be able to change the network type by going into /etc/sysconfig/network-scripts/ifcfg-eth0 and changing BOOTPROTO from dhcp to static, however you will have to add a whole load of other information. Here is a sample device, note that I have switched all IP information to an internal range and Xed out the hardware address, the HWADDR should already be set and should not be edited unless you know what you are doing.

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=xx:xx:xx:xx:xx:xx
IPADDR=192.168.0.25
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
 
Old 01-26-2010, 05:01 PM   #6
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Here is how it reads:
cat ifcfg-eth1
# Intel Corporation 82557/8/9/0/1 Ethernet Pro 100
DEVICE=eth1
BOOTPROTO=none
HWADDR=00:02:55:6d:13:24
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.200
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=yes
MTU=1500
GATEWAY=192.168.1.1
TYPE=Ethernet

I made the change to

BOOTPROTO=Static

I will give it a try. Thanks
 
Old 01-26-2010, 05:34 PM   #7
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Why is PEERDNS set to yes? You might want to set that back to no.
 
Old 01-27-2010, 09:05 AM   #8
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Made the change. Still no effect. Frustrating....
 
Old 02-05-2010, 08:53 AM   #9
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I still struggle w/this. Does anyone else have ideas.
Thanks in advance ...
 
Old 02-05-2010, 09:09 PM   #10
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Did you try the script changes above that I put in the code tags... I don't have fedora and it's the last thing I have, it's gunna need manual reconfiguring of scripts I believe.
 
Old 02-06-2010, 03:28 PM   #11
tommy991
LQ Newbie
 
Registered: Dec 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I made the change. When I reboot it reverts back. Do you know what script that generates these files:
[root@tbhomeserv network-scripts]# ll
total 236
-rw-r--r-- 3 root root 250 2010-02-06 15:14 ifcfg-eth0
-rw-r--r-- 3 root root 253 2010-02-06 15:14 ifcfg-eth1
This gets generated at boot time.If I could find the scripts that run, I can change their behaviour and fix this.
Thanks for helping
 
  


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
Fedora DNS resolv.conf issue waelaltaqi Linux - Networking 16 07-05-2006 04:23 AM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 10:21 AM
resolv.conf ricemark20 Linux - Networking 12 11-11-2003 05:08 PM
resolv.conf dnsbum Linux - Networking 1 10-21-2003 01:00 PM
resolv.conf Culbert Linux - Networking 8 03-20-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration