Re: How can I prevent NetworkManager to overwrite /etc/resolv.conf in no-dhcp wired networks?



Stolz wrote:
2008/6/16 Dan Williams <dcbw redhat com>:
On Sun, 2008-06-15 at 03:02 +0200, Stolz wrote:
I use NetworkManager 0.6.6 to connect to wired and wireless networks
and it works as expected when there is DHCP available. The problems
appears when I connect to a network which requires a static
configuration (no DHCP). Whenever I connect to a wired network wichout
DHCP my /etc/resolv.conf is overwitten by NetworkManager with the next
content:
### BEGIN INFO
#
# Modified_by:  NetworkManager
# Process:      /usr/bin/NetworkManager
# Process_id:   4393
#
### END INFO
Which distro are you using?  This probably means that your distro's
backend (which reads static configuration) isn't able to pull your DNS
servers from that static config.


Thanks for your answer. I'm using Gentoo. My distro stores the network
config in /etc/conf.d/net. Without NetworkManager the config is read
and used as expected, but with NetworkManager seems it is ignored. Is
NetworkManager supposed to be able to read my network config from my
distro config files? I thought NetworkManager configuration was
independent from the distro config and should be configured
separately. Iin fact, that's exactly what I was asking, how to
configure it but from your words I deduce there is a backend which
reads the files I use to configure the network in my distro.

So now the question is, how  I can find out if NetworkManager backend
can find my dns settings from my distro config files?

Regadrs
_______________________________________________
NetworkManager-list mailing list
NetworkManager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list
There is no backend plugin to read default Gentoo network config file yet. There is generic system backend which can be used on any distro (not sure if that's finished and working, but I'm pretty sure Dan can provide more info about it). If you want to use NM on Gentoo you should take a look at http://gentoo-wiki.com/NetworkManager. It should provide you with some answers - especially than you need to DISABLE default Gentoo networking scripts and let NM handle everything. This guide was written for NM-0.6.x as Gentoo officially doesn't ship NM-0.7 yet. It's a bit out of date, but still very good starting point. Quoting from wiki:


   /etc/resolv.conf empty

If you have a static configuration for your network (no DHCP) and your /etc/resolv.conf stays empty (except for the NetworkManager comments) then you have to change the format of dns_servers in /etc/conf.d/net to use single quotes only. e.g.:

*File:* /etc/conf.d/net

dns_servers_eth0="192.168.3.1 215.170.93.234 210.145.254.170"

This guild was written for baselayout 1 and sysvinit, but it should also work with baselayout2 and openrc.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]