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
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-bounces at centos.org [mailto:centos-bounces at 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 at centos.org http://lists.centos.org/mailman/listinfo/centos
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 -- kkeller at speakeasy.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20100520/47f6742a/attachment.sig>
> 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.
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
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-<X> should be your solution. Chris