It is per connection.
But anyway, since i actually get an ip adress i would assume the problem is somewhere else.
You could have set it to “Auto (DHCP) - only addresses”, you would get an IP address then, but no other settings like DNS-Server.
But of course the problem would occur on every boot then if something would have been wrong there.
Ok, after some more testing. I guess the pid file for the old dhcpcd connection is not removed properly after being connected to one wlan then connecting to another. (I assume this is how it works, the old pid file has to be removed, a new one is created upon running a dhcp client again).
NetworkManager doesn’t use dhcpcd by default. It uses dhclient.
And here is the output of the current /etc/resolv.conf (the one networkmanager is assuming is modified)
# Generated by dhcpcd for interface wlp3s0
nameserver 192.168.43.1
As you can see that one is created by dhcpcd.
netconfig doesn’t overwrite/change it because it looks different from what it would create, which looks like this:
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
# NETCONFIG_DNS_STATIC_SEARCHLIST
# NETCONFIG_DNS_STATIC_SERVERS
# NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
# NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
search home
nameserver 10.0.0.138
So run “sudo /sbin/netconfig update -f” as I already wrote to force netconfig to recreate the file.
You can only edit a post for 10 minutes after creating it.
192.168.43.1 is the gateway for the wlan my phone uses when activating wifi hotspot. Had to do it for testing. 192.168.1.1 is the proper router i use at home. So when connecting to the phone then my home router this stuff happens.
So this is reproduceable?
Well, try that netconfig command, and then try to reproduce it.
And do not run dhcpcd manually.
Do I understand you right, that you used your phone as “router”?
Does this happen everytime after you connected to your phone? Or maybe only if both the connection to the phone and the connection to the router are active?