Re: [OpenWrt-Devel] RFC netifd: UCI parameter to sort name servers in resolv.conf.auto

2016-09-05 Thread Toke Høiland-Jørgensen
Hans Dedecker  writes:

> Hi Felix,
>
> Current implementation in netifd writes the dns servers into
> resolv.conf.auto file based on the order of the interfaces in the
> interface list which is alphabetical sorted. The resolver, in this
> case dnsmasq, reads the resolv.conf.auto file and queries the
> nameserver(s) in the order listed till it receives an answer.

Note that dnsmasq by default will query all known servers simultaneously
and use the first answer it gets. So sorting servers in resolv.conf.auto
only really works if dnsmasq is passed the 'strict-order' parameter,
which I don't think is the default...

-Toke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] RFC netifd: UCI parameter to sort name servers in resolv.conf.auto

2016-09-05 Thread Felix Fietkau
On 2016-09-05 10:45, Hans Dedecker wrote:
> Hi Felix,
> 
> Current implementation in netifd writes the dns servers into
> resolv.conf.auto file based on the order of the interfaces in the
> interface list which is alphabetical sorted. The resolver, in this
> case dnsmasq, reads the resolv.conf.auto file and queries the
> nameserver(s) in the order listed till it receives an answer.
> 
> If you have multiple wan interfaces each receiving DNS server(s) via
> either DHCPv4/6 or PPP; there's no mechanism in place to influence the
> order of the dns servers in the resolv.conf.auto file (unless you
> would chose well thought interface names but which is not a
> transparent approach) .
> 
> Possible use cases are :
> -Main and backup interfaces; priority needs to be given to the name
> server of the main interface only if these fail the dns servers of the
> backup interface can be queried.
> -Possibility to give priority to the IPv4 name servers above IPv6 name
> servers or vice versa in a dual stack scenario.
> 
> We were thinking about adding an interface dnsmetric parameter (e.g.
> similar to interface metric for routes) which is used to sort the dns
> servers in the function  interface_write_resolv_conf.
> What is your opinion about this proposal ?
Makes sense to me, go for it.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] RFC netifd: UCI parameter to sort name servers in resolv.conf.auto

2016-09-05 Thread Hans Dedecker
Hi Felix,

Current implementation in netifd writes the dns servers into
resolv.conf.auto file based on the order of the interfaces in the
interface list which is alphabetical sorted. The resolver, in this
case dnsmasq, reads the resolv.conf.auto file and queries the
nameserver(s) in the order listed till it receives an answer.

If you have multiple wan interfaces each receiving DNS server(s) via
either DHCPv4/6 or PPP; there's no mechanism in place to influence the
order of the dns servers in the resolv.conf.auto file (unless you
would chose well thought interface names but which is not a
transparent approach) .

Possible use cases are :
-Main and backup interfaces; priority needs to be given to the name
server of the main interface only if these fail the dns servers of the
backup interface can be queried.
-Possibility to give priority to the IPv4 name servers above IPv6 name
servers or vice versa in a dual stack scenario.

We were thinking about adding an interface dnsmetric parameter (e.g.
similar to interface metric for routes) which is used to sort the dns
servers in the function  interface_write_resolv_conf.
What is your opinion about this proposal ?

Thx,
Hans
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel