It doesn't work.
The nameserver used in the lab still have no priority over the ISP ones that are automatically added to
The only way to do this is to disable
/etc/resolv.conf update by NetworkManager and switch either to Wicked and modify the interface file for each dns server in the wanted order; OR modify the
/etc/sysconfig/network/config Directive NETCONFIG_DNS_POLICY= to "STATIC" AND furnish the static DNS list with the directive NETCONFIG_DNS_STATIC_SERVERS= with the DNS in your wanted order.
The issue is: with this kind of settings NetworkManager is no more usable as the different profile's DNS list are not added to
I can't understand why NetworkManager can not be configured as Wicked interface.
I did not found any directive telling the ISP dns servers to be added at the end of the list instead of the top...
What I did after read again the documentation: for a laptop there is two files to be modified:
First looking at dhclient.conf you have to be sure to uncomment those two lines:
- prepend domain-name-servers <Your DNS here or 127.0.0.1>;
- require subnet-mask, domain-name-servers;
If you are using a particular DNS (in my case I handle my own zone with a DNS) you have to write something like
prepend domain-name-servers 192.168.0.3;
If not, default is
prepend domain-name-servers 127.0.0.1;
Second, looking at NetworkManager.conf you have to write something like this:
...and never forget to commit
systemctl restart NetworkManager
more /etc/resolv.conf to see if it has worked as expected ^^
rasalgethi:/etc/NetworkManager # more /etc/resolv.conf
# Generated by NetworkManager
These settings could also be relevant for workstations, but they are less likely to be moved from physical networks to others.
rpm -q NetworkManagerhere, e.g. just in case there's a feature for it but it was added later.