Re: Connection priority for DNS (sorry)



On Tue, Apr 05, 2016 at 09:09:38AM +0000, Benjamin Lefoul wrote:
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.

Ah so with the red hat plugin (this is centOS7 with NM 1.0.6-29.el7_2), that would be IPV4_ROUTE_METRIC?

Yes. If you prefer you can use: nmcli con modify <con-name> ip4.route-metric <val>

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?

With IPV4_ROUTE_METRIC you control the metric of dynamic routes,
static routes that don't specify a metric, and to the default
route. Do you have static routes in route-* files? If they specify a
metric, they will not be affected by the change of IPV4_ROUTE_METRIC.

When you have both connection active, which one is supposed to get the
default route? If you want the same connection to get the preferred
nameservers, this should work; otherwise at the moment I think the
only solution is to set dns=none and manage resolv.conf externally.

Beniamino

Attachment: signature.asc
Description: PGP signature



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