Rudi Ahlers
2009-Nov-29 20:57 UTC
[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
Hi all, I have a CentOS 5.4 server-only installation, i.e. no X installed, and for some odd reason /etc/resolve.conf gets overwritten by NetworkManager on a constant basis. I haven't been able to track down how often, but I think it's on the hour, or something. This is the conents of the file right now: # Generated by NetworkManager # No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so: # # DNS1=xxx.xxx.xxx.xxx # DNS2=xxx.xxx.xxx.xxx # DOMAIN=lab.foo.com bar.foo.com So, I change it to the following: nameserver 192.168.1.254, save it, and all network functions work fine. But, later on it get's changed again. Running "system-config-network", I can see that the nameserver that I have specified is in there, yet it doesn't show up in /etc/resolve.conf. I have searched a bit on google, but all the results reveal how to use NetworkManager to setup the nameservers, but now how it get's set automatically. Why does this happen, and how do I stop it from happening? -- Kind Regards Rudi Ahlers CEO, SoftDux Hosting Web: http://www.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532
Robert Heller
2009-Nov-29 21:42 UTC
[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
At Sun, 29 Nov 2009 22:57:23 +0200 CentOS mailing list <centos at centos.org> wrote:> > Hi all, > > I have a CentOS 5.4 server-only installation, i.e. no X installed, and > for some odd reason /etc/resolve.conf gets overwritten by > NetworkManager on a constant basis. I haven't been able to track down > how often, but I think it's on the hour, or something. > > This is the conents of the file right now: > > # Generated by NetworkManager > > > # No nameservers found; try putting DNS servers into your > # ifcfg files in /etc/sysconfig/network-scripts like so: > # > # DNS1=xxx.xxx.xxx.xxx > # DNS2=xxx.xxx.xxx.xxx > # DOMAIN=lab.foo.com bar.foo.com > > > > > So, I change it to the following: > > nameserver 192.168.1.254, save it, and all network functions work > fine. But, later on it get's changed again. Running > "system-config-network", I can see that the nameserver that I have > specified is in there, yet it doesn't show up in /etc/resolve.conf. > > I have searched a bit on google, but all the results reveal how to use > NetworkManager to setup the nameservers, but now how it get's set > automatically. Why does this happen, and how do I stop it from > happening?You probably DON'T want NetworkManager running on a server! Do this: # Stop NetworkManager sudo /sbin/service NetworkManager stop # Disable it from starting at boot time sudo /sbin/chkconfig NetworkManager off And then *manually* set things up. NetworkManager is meant for things like laptops that are (randomly) connected to this or that WiFi at this or that Internet Cafe, Library, School, Home WiFi, whatever. NetworkManager automagically adjusts things as it encounters different networks, etc. A server will have fixed / static networking and needs no dynamic adjustments.>-- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
Rob Kampen
2009-Nov-29 21:43 UTC
[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
Rudi Ahlers wrote:> Hi all, > > I have a CentOS 5.4 server-only installation, i.e. no X installed, and > for some odd reason /etc/resolve.conf gets overwritten by > NetworkManager on a constant basis. I haven't been able to track down > how often, but I think it's on the hour, or something. > > This is the conents of the file right now: > > # Generated by NetworkManager > > > # No nameservers found; try putting DNS servers into your > # ifcfg files in /etc/sysconfig/network-scripts like so: > # > # DNS1=xxx.xxx.xxx.xxx > # DNS2=xxx.xxx.xxx.xxx > # DOMAIN=lab.foo.com bar.foo.com > > > > > So, I change it to the following: > > nameserver 192.168.1.254, save it, and all network functions work > fine. But, later on it get's changed again. Running > "system-config-network", I can see that the nameserver that I have > specified is in there, yet it doesn't show up in /etc/resolve.conf. > > I have searched a bit on google, but all the results reveal how to use > NetworkManager to setup the nameservers, but now how it get's set > automatically. Why does this happen, and how do I stop it from > happening? > >Rudi, As I recall there was a thread about this a few weeks ago. Please show your /etc/sysconfig/network-scripts/ifcfg-ethX contents. Thanks -------------- next part -------------- A non-text attachment was scrubbed... Name: rkampen.vcf Type: text/x-vcard Size: 196 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20091129/86d6ad67/attachment-0003.vcf>
Tosh
2009-Nov-29 22:13 UTC
[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
On 29/11/09 22:43, Rob Kampen wrote:> Rudi Ahlers wrote: >> Hi all, >> >> I have a CentOS 5.4 server-only installation, i.e. no X installed, and >> for some odd reason /etc/resolve.conf gets overwritten by >> NetworkManager on a constant basis. I haven't been able to track down >> how often, but I think it's on the hour, or something. > As I recall there was a thread about this a few weeks ago. > Please show your /etc/sysconfig/network-scripts/ifcfg-ethX contents.Add to /etc/sysconfig/network-scripts/ifcfg-ethX The following 2 lines : PEERDNS=no NM_CONTROLLED=no Line 1 tells the the if commands not to override /etc/resolv.conf Line 2 tells NetworkManager that it doens't have control over that ethernet controller -- Toshaan <toshlinux at gmail.com> - http://www.toshaan.be
Rudi Ahlers
2009-Nov-29 22:53 UTC
[CentOS] NetworkManager constantly overwriting /etc/resolve.conf - how to disable?
On Sun, Nov 29, 2009 at 11:43 PM, Rob Kampen <rkampen at kampensonline.com> wrote:> > Rudi, > As I recall there was a thread about this a few weeks ago. > Please show your /etc/sysconfig/network-scripts/ifcfg-ethX contents. > Thanks > > > _______________________________________________Hi Rob, Here's the contents: [root at intranet OpenQRM]# more /etc/sysconfig/network-scripts/ifcfg-eth0 # Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ DEVICE=eth0 BOOTPROTO=none HWADDR=00:16:e6:69:49:9a ONBOOT=yes NETMASK=255.255.255.0 IPADDR=192.168.1.250 GATEWAY=192.168.1.254 TYPE=Ethernet DNS=192.168.1.254 DNS=192.168.1.1 -- Kind Regards Rudi Ahlers CEO, SoftDux Hosting Web: http://www.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532