Re: [CentOS] Resolv.conf being overwritten

2010-05-26 Thread Christoph Maser
Am Donnerstag, den 20.05.2010, 19:02 -0400 schrieb Thomas Dukes:
> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
> system-config-network but if I reboot, its gone. I do not have the caching
> nameserver package installed. My ISP's nameservers are there. It must have
> something to do with DHCP.
> 
> Also, in the network config GUI, should I select the IPv6 option for either
> or both network cards?
> 
> TIA
> 

This was discussed here not very long ago.
>From /usr/share/doc/initscripts-8.45.30/sysconfig.txt:



PEERDNS=yes|no
  modify /etc/resolv.conf if peer uses msdns extension (PPP only) or
  DNS{1,2} are set, or if using dhclient. default to "yes".


So PEERDNS=no in the right /etc/sysconfig/network-scripts/ifcfg-
should be your solution.

Chris

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-23 Thread Kahlil Hodgson
On 05/21/2010 11:24 PM, ken wrote:
>> On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
>>> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
>>> system-config-network but if I reboot, its gone. I do not have the caching
>>> nameserver package installed. My ISP's nameservers are there. It must have
>>> something to do with DHCP.
> 
> Try putting the changes you want (e.g., 127.0.0.1) into
> /etc/sysconfig/networking/profiles/default/resolv.conf ... or in some
> other, more appropriate profile directory.

As a quick hack, try appending

DNS1=127.0.0.1

to

/etc/sysconfig/network

Such lines are used to generate resolv.conf during normal network
startup.  Don't know if the dhcp entries will override this.

Kal

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread Keith Keller
On Fri, May 21, 2010 at 09:39:29AM -0400, Todd Denniston wrote:
> 
> Unfortunately trying to use dhclient.conf only leads to frustration.
> RH/Fedora chose in /etc/sysconfig/network-scripts/ifup-eth to make the dhcp 
> client only read
> /etc/dhclient-eth#.conf and ifup-eth overwrites that file each time the 
> interface is uped.

Hmm...if I'm reading my copy of ifup-eth correctly, it seems to override
dhclient.conf only if dhclient-${DEVICE}.conf already exists.  There's
even a comment in there about being able to use the dhclient.conf file
"(as documented in the man page!)" if the device-specific file is
nonexistent or empty.

I mostly use static IPs, so I don't use dhclient much.  :)

--keith

-- 
kkel...@speakeasy.net



pgpT9aVwOrIVd.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread ken
On 05/21/2010 09:41 AM m.r...@5-cent.us wrote:
>>> On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
 I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
 system-config-network but if I reboot, its gone. I do not have the
 caching nameserver package installed. My ISP's nameservers are there. It
 must have something to do with DHCP.
>> Try putting the changes you want (e.g., 127.0.0.1) into
>> /etc/sysconfig/networking/profiles/default/resolv.conf ... or in some
>> other, more appropriate profile directory.
> 
> Except isn't that a link to /etc/resolv.conf? The one that causes the
> complaint when it's updated, something about won't overwrite something?
> (Sorry, it's been weeks since I saw that, so I don't remember the exact
> error message.)
> 
>   mark

No, it's not a link.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread Les Mikesell
On 5/20/2010 6:43 PM, Hans-Ulrich Flueck wrote:
> Hello TIA
>
> If you do not have a local/LAN DNS server neither a caching DNS
> configuration on your machine, I can't see a reason to add localhost to the
> list of your DNS servers...

The usual reason is that you want caching and you may have added a local 
zone for your own machines.

> The idea behind DHCP is to distribute gateway, dns, ntp and other servers to
> the clients, beside the IP addresses.
> It's the way it works to have the /etc/resolv.conf overwritten on machine
> reboot and DHCP refresh.

DHCP will offer nameservers.  You don't have to accept them.  Somewhere 
in the network manager GUI there should be a checkbox to control this - 
although I think there have been bugs in various versions.

-- 
   Les Mikesell
lesmikes...@gmail.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread m . roth
>> On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
>>> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
>>> system-config-network but if I reboot, its gone. I do not have the
>>> caching nameserver package installed. My ISP's nameservers are there. It
>>> must have something to do with DHCP.
>
> Try putting the changes you want (e.g., 127.0.0.1) into
> /etc/sysconfig/networking/profiles/default/resolv.conf ... or in some
> other, more appropriate profile directory.

Except isn't that a link to /etc/resolv.conf? The one that causes the
complaint when it's updated, something about won't overwrite something?
(Sorry, it's been weeks since I saw that, so I don't remember the exact
error message.)

  mark

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread Todd Denniston
Keith Keller wrote, On 05/21/2010 12:13 AM:
> On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
>> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
>> system-config-network but if I reboot, its gone. I do not have the caching
>> nameserver package installed. My ISP's nameservers are there. It must have
>> something to do with DHCP.
> 
> Yes--DHCP will overwrite resolv.conf by default.  See the various
> options, in particular supersede and prepend, in the man page for
> dhclient.conf.
> 

Unfortunately trying to use dhclient.conf only leads to frustration.
RH/Fedora chose in /etc/sysconfig/network-scripts/ifup-eth to make the dhcp 
client only read
/etc/dhclient-eth#.conf and ifup-eth overwrites that file each time the 
interface is uped.

I am debating having ifup-eth concatenate dhclient.conf into dhclient-eth#.conf 
when it builds the file.

Can you tell I ran into this problem recently? :{

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-21 Thread ken
> On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
>> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
>> system-config-network but if I reboot, its gone. I do not have the caching
>> nameserver package installed. My ISP's nameservers are there. It must have
>> something to do with DHCP.

Try putting the changes you want (e.g., 127.0.0.1) into
/etc/sysconfig/networking/profiles/default/resolv.conf ... or in some
other, more appropriate profile directory.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-20 Thread Keith Keller
On Thu, May 20, 2010 at 07:02:06PM -0400, Thomas Dukes wrote:
> I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
> system-config-network but if I reboot, its gone. I do not have the caching
> nameserver package installed. My ISP's nameservers are there. It must have
> something to do with DHCP.

Yes--DHCP will overwrite resolv.conf by default.  See the various
options, in particular supersede and prepend, in the man page for
dhclient.conf.

> Also, in the network config GUI, should I select the IPv6 option for either
> or both network cards?

Unless you have a need for IPv6, don't turn it on.  If you don't know
that you need it you probably don't.

--keith

-- 
kkel...@speakeasy.net



pgpBsJ94i14it.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-20 Thread Thomas Dukes
 

> -Original Message-
> From: centos-boun...@centos.org 
> [mailto:centos-boun...@centos.org] On Behalf Of Hans-Ulrich Flueck
> Sent: Thursday, May 20, 2010 7:43 PM
> To: 'CentOS mailing list'
> Subject: Re: [CentOS] Resolv.conf being overwritten
> 
> Hello TIA
> 
> If you do not have a local/LAN DNS server neither a caching 
> DNS configuration on your machine, I can't see a reason to 
> add localhost to the list of your DNS servers...
> 
> The idea behind DHCP is to distribute gateway, dns, ntp and 
> other servers to the clients, beside the IP addresses.
> It's the way it works to have the /etc/resolv.conf 
> overwritten on machine reboot and DHCP refresh.
>  
> You might setup your own local DNS server and distribute this 
> one as the first in the list of DNS servers by your active 
> DHCP server.
> Or you might work with /etc/hosts in order to define a few 
> important/static machines inside the LAN.
> 
> I'd suggest not activating IPV6, but configuring IPV4 correctly first.
> 
> Ueli
> 
> 
> -Ursprüngliche Nachricht-
> Von: centos-boun...@centos.org 
> [mailto:centos-boun...@centos.org] Im Auftrag von Thomas Dukes
> Gesendet: Freitag, 21. Mai 2010 01:02
> An: CentOS
> Betreff: [CentOS] Resolv.conf being overwritten
> 
> I am trying to add 127.0.0.1 to my resolv.conf. I added it 
> through the system-config-network but if I reboot, its gone. 
> I do not have the caching nameserver package installed. My 
> ISP's nameservers are there. It must have something to do with DHCP.
> 
> Also, in the network config GUI, should I select the IPv6 
> option for either or both network cards?
> 
> TIA

I had this all setup on an upgraded 5.5 system. An app crashed and I tried a
restore from a backup and hosed the system. I can even get my old files off
the backup to the new system. Its been a really long time since I had to set
this stuff up. Everything had been working fine for 6+ years.

Working on DNS but this stuff is getting deep for an old guy.

Eddie

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Resolv.conf being overwritten

2010-05-20 Thread Hans-Ulrich Flueck
Hello TIA

If you do not have a local/LAN DNS server neither a caching DNS
configuration on your machine, I can't see a reason to add localhost to the
list of your DNS servers...

The idea behind DHCP is to distribute gateway, dns, ntp and other servers to
the clients, beside the IP addresses.
It's the way it works to have the /etc/resolv.conf overwritten on machine
reboot and DHCP refresh.
 
You might setup your own local DNS server and distribute this one as the
first in the list of DNS servers by your active DHCP server.
Or you might work with /etc/hosts in order to define a few important/static
machines inside the LAN.

I'd suggest not activating IPV6, but configuring IPV4 correctly first.

Ueli


-Ursprüngliche Nachricht-
Von: centos-boun...@centos.org [mailto:centos-boun...@centos.org] Im Auftrag
von Thomas Dukes
Gesendet: Freitag, 21. Mai 2010 01:02
An: CentOS
Betreff: [CentOS] Resolv.conf being overwritten

I am trying to add 127.0.0.1 to my resolv.conf. I added it through the
system-config-network but if I reboot, its gone. I do not have the caching
nameserver package installed. My ISP's nameservers are there. It must have
something to do with DHCP.

Also, in the network config GUI, should I select the IPv6 option for either
or both network cards?

TIA

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos