On Mon, 2018-11-12 at 11:37 +0100, Thomas HUMMEL wrote: Hi,
[I'm talking only about ipv4.method=manual wired ethernet connections here] As far as I experience, the 'search' line in the NetworkManager resolv.conf file comes from the union of all the ipv4.dns-search properties of all the active profiles and the order of the domains it lists doesn't depend on the order of profile activation. - am I right ?
Right, I think the time of profile activations is not generally meaningful.
- does the order then depend on the order of the underlying devices (i.e. dns-search of eth0 first, dns-search of eth1 second, ...) ?
No, devices neither have a meaningful sort order.
What would be the best way to enforce a particular order ? For instance let's say eth0 profile : ipv4.dns-search my.public.domain eth1 profile : ipv4.dns-search some.private.non-routed-domain By default, it seems that when the 2 profiles are connected, I've got search my.public.domain some.private.non-routed-domain in /etc/resolv.conf What if I want the opposite order ?
Configure `ipv4.dns-priority` accordingly. You may require a recent NM verions for that. In the usual case, where multiple profiles have the same dns-priority, the device with the (best) default-route is preferred.
Note : the idea here is to have the short non-qualified host name as the hostname and make hostname --fqdn return <hostname>.some.private-non-routed.domain Thanks
best, Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part