Re: Connection priority for DNS (sorry)



________________________________________
From: Beniamino Galvani <bgalvani redhat com>
Sent: 05 April 2016 10:44
To: Benjamin Lefoul
Cc: networkmanager-list gnome org
Subject: Re: Connection priority for DNS (sorry)

On Tue, Apr 05, 2016 at 05:46:34AM +0000, Benjamin Lefoul wrote:
(I know, priority of connections seems to be a recurring object of confusion...)

When automatically filling resolv.conf (with red hat plugin at least), it seems ifcfg-* connection files 
get treated in alphabetical order.

Hi,

NM guarantees that the device having the default route will have its
DNS server at the top of resolv.conf. Also, if there is a VPN active,
the nameserver will be abover every other nameserver (including the
one associated with default route). The order of remaining entries
matches the order of activation of connections.

In your example, you could change ipv4.route-metric for one of the
connections to make it the default route and thus also have the
preferred nameserver.

Beniamino


Hi Beniamino,

Ah so with the red hat plugin (this is centOS7 with NM 1.0.6-29.el7_2), that would be IPV4_ROUTE_METRIC?
If I use that, but at the same time in my /etc/sysconfig/network-scripts/route-* file I have a different 
metric with "METRIC0" can I still get NM to set the resolv.conf with the top nameservers NOT those of the 
default route?

Benjamin Lefoul
nWISE AB


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