NetworkManager doesn't update resolv.conf

In previous openSUSE versions I was using WICD as network manager. I upgraded my openSUSE to 11.4 and resolved give a try to the NetworkManager. I can get network connection, but the dhcp doesn’t update the /etc/resolv.conf, so I can’t navigate because the dns isn’t set.

I tried to reinstall all related packages (dhcp, dns and networkmanager) without success.

If I run dhcpcd the resolv.conf get updated, but dhclient doesn’t do the same.
It seems that’s a dhclient script issues, but I don’t know how to test.

What I’m missing?

Thanks!

So, are you using NetworkManager-kde, plasmoid-networkmanagement, or NetworkManager-Gnome?

Maybe you could configure one of the openSNS servers manually:

OpenDNS in OpenSuSE 11.4

Another thread concerning DNS.

NetworkManager uses its own internal dhcp client setup, not dhclient or
dhcpd, so the problem sounds like a misconfiguration of NetworkManager.

Check your NetworkManager connection settings to make sure it is set to
accept DNS settings over dhcp for the specific connection you are using.

Please try to rename the file /etc/resolv.conf or remove it whatsoever. The other solution is to remove a line from the file which says to not remove it :slight_smile:

Best regards,
Greg

I’m using plasmoid-networkmanagement, but I had same issue with NetworkManager-kde.

I can configure manually, but I wanna a more plug-n-play approach.

Thanks

I tried that too, but only with dhcpcd I can update resolv.conf.

All my connections are configured to get IP and DNS form DHCP.
Where I can find others NetworkManager configurations?

Thanks

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Put the following line back in the file to see if that helps:

Please remove (at least) this line when you modify the file!

Good luck.

On 04/22/2011 07:36 PM, tony hild wrote:
>
> I tried that too, but only with dhcpcd I can update resolv.conf.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNsj7eAAoJEF+XTK08PnB5SYAP/A8BQECEHDbWISx6YT7XQiqB
V6J4vxo0Onn4iD4CcsTje0M/K1PiDPmTLKmvQGoE9Vcwcw2Ah8sFf7TrUYK0ji5q
5CvA34Ny9vhJBBOM5YlXYrdkI0CblTZkUWtDMVKIqLQcLgPe63fZLJ3scMP35hUb
x2wBbqDzkJG2mz2uDaUB2LSUIUUeFgvzq39RzwIZfoPAoV/6mOnHDENMOIoNmWKo
+WfSEyr9k8m1HT++CElxU9J9oh0GmFXQAwKwz1W6dXjjvDJXa0EnLezFB43FBEy0
H9ZxGCyw7ZozIuG03ptXzJYPE8KclhnGew7B0CB0o8uzEaVtcrdeRh1uUMbPlKsp
4pkV37I/Ck3+64ewUT+bto+QDThL2nFp8KOUeXoHsKd1bug9XE2ljy7L/Vybhsmb
PY3A5hJyLYC7NSYGAxyYYLi0NVrE/W340iw1r3PJqD1k43nDkn/O00e/TgNvmnI9
LFWWFbXRg6Zgtvxq5i+GO+CCGNAntnEuvvMHukCW2z4IHKgeiXyiTqeoWjKKWRkA
p73phhYfFjPgtApmEUD/gdi/HLGAI2l0h+gnQN5t9lscqvvqWxgd+8uc17A8IZ+4
FOCBY7ygy8aXVA8vVZtg84nskfBeFtCXDrgE90mJV40lJmXZ/NtBEQZFYp6sSVZe
W1Cjd9Z17MyxTNm66QZ/
=GeC+
-----END PGP SIGNATURE-----

Yeap, no luck with

Please remove (at least) this line when you modify the file

I also noticed an error in /var/log/NetworkManager:

Script ‘/etc/NetworkManager/dispatcher.d/autofs’ exited with error status 1

Thanks

/var/log/NetworkManager

Apr 23 02:28:29 tony-note NetworkManager[1370]: <info> (eth0): DHCPv4 state changed nbi → preinit
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> (eth0): DHCPv4 state changed preinit → reboot
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Get) scheduled…
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Get) started…
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> address 10.1.1.12
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> prefix 24 (255.255.255.0)
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> gateway 10.1.1.1
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> nameserver ‘10.1.1.1’
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> nameserver ‘8.8.8.8’
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> domain name 'domain.invalid’

Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled…
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 4 of 5 (IP4 Configure Get) complete.
Apr 23 02:28:31 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) started…
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Clearing nscd hosts cache.
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Policy set ‘bis’ (wlan0) as default for IPv4 routing and DNS.
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> (eth0): device state change: 7 → 8 (reason 0)
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Clearing nscd hosts cache.
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Policy set ‘System eth0’ (eth0) as default for IPv4 routing and DNS.
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Activation (eth0) successful, device activated.
Apr 23 02:28:32 tony-note NetworkManager[1370]: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.
Apr 23 02:28:32 tony-note nm-dispatcher.action: Script ‘/etc/NetworkManager/dispatcher.d/autofs’ exited with error status 1.
Apr 23 02:28:33 tony-note NetworkManager[1370]: keyfile: updating /etc/NetworkManager/system-connections/System eth0

Well I get that all the time twice :slight_smile:

Apr 23 08:01:41 opensuse nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Apr 23 08:01:42 opensuse nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/nfs' exited with error status 2

but it does not prevent my NetworkManager from modifying the /etc/resolv.conf file accordingly. If I were You I would do this. Create two NetowrkManager profiles A and B with different DNS settings. Then I would rename or delete the file /etc/resolv.conf and connect with profile A (check DNS) and then connect with profile B and check the DNS as well.
Also please check what You have got configured here :

> cat /etc/sysconfig/network/config | grep DNS
# Defines the DNS merge policy as documented in netconfig(8) manual page.
# Set to "" to disable DNS configuration.
NETCONFIG_DNS_POLICY="auto"
# Defines the name of the DNS forwarder that has to be configured.
NETCONFIG_DNS_FORWARDER="resolver"
# List of DNS domain names used for host-name lookup.
#NETCONFIG_DNS_STATIC_SEARCHLIST=""
# List of DNS nameserver IP addresses to use for host-name lookup.
#NETCONFIG_DNS_STATIC_SERVERS=""
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
# Allows to specify a custom DNS service ranking list, that is which
NETCONFIG_DNS_RANKING="auto"
NETCONFIG_DNS_STATIC_SEARCHLIST="local"
NETCONFIG_DNS_STATIC_SERVERS=""

I set NETCONFIG_DNS_POLICY to auto and resolv.conf get updated. I think that WICD has changed this option, and when I back to NetworkManager this option remain. One thing I noticed was that you can not change this setting by Yast when NetworkManager is enabled.

Thanks!

That’s one of the reasons I steer clear of WICD. Glad You got it working though :slight_smile: good job and thanks for the feedback.

Best regards,
Greg