Re: DNS-server priority



On Thu, 2015-08-20 at 09:14 +0200, Pieter Cardoen wrote:

Subject: Re: DNS-server priority
From: dcbw redhat com
To: pieter cardoen hotmail com
CC: networkmanager-list gnome org
Date: Wed, 19 Aug 2015 15:22:46 -0500

On Wed, 2015-08-19 at 15:45 +0200, Pieter Cardoen wrote:
Dear all
How can you assign a dns-server priority order? My device has a maximum of five active connections at 
the same time and gets multiple dns-server addresses but should prefer one assigned by the dhcp client 
on eth0.

Typically you'd set connections that you don't want to be "primary" as
'never-default'.  That means they won't be candidates for the default
route, and that also means their DNS servers will always be secondary to
whatever connection has the default route.  So only connection 'eth0'
should be set never-default for your setup.  You could also explicitly
ignore automatic DNS information on those other connections to achieve
the same result.
Hmm Not exactly what I want. The fixed eth0 doesn't need a default gateway which is good. This is my 
control interface in the testbed environment. However the DNS of this interface is very important due to 
the fact that some servers in the testbed need to be accessible... I am now trying to use resolvconf

Ok, so DNS is delivered to eth0, but eth0 isn't supposed to be the
default route.  Some other interface is supposed to have the default
route, but you want to ignore the DNS from those other interfaces, or at
least prefer the DNS from eth0 over that of the other interfaces?

I've noticed that NM modifies /etc/hosts which causes some troubles in the testbed (nodes are not 
recognized anymore). What is the cause of this change?

Hmm, NM stopped touching /etc/hosts in late 2010 for NM 0.9.0 and later.
The only thing it will do is remove any lines tagged "# Added by
NetworkManager" to clean up a hosts file written by NM 0.8.x and
earlier.  So I would think you're running a pretty old version of NM if
it's still touching /etc/hosts?

Dan



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