reading "Server Network Configuration" Section in the Funtoo Linux Networking page of the wiki, I wrote my /etc/conf.d/netif.eth0 file like this:
template="interface" ipaddr="220.127.116.11/24" gateway="18.104.22.168" nameservers="127.0.0.1 22.214.171.124 126.96.36.199" domain="server4you.de"
I guess this is quite straight forward and doesn't need any further explaination, does it?
The problem / question I have are the following two:
The config in this file replaces the content of /etc/resolv.conf each time, the corresponding init-Scripts are issued, using OpenResolv. As far as I understand the docs in the wiki, the above config should lead to something like this in /etc/resolv.conf, isn't it?:
# Generated by resolvconf domain server4you.de nameserver 127.0.0.1 nameserver 188.8.131.52 nameserver 184.108.40.206
But what it really looks like afterwards is this:
# Generated by resolvconf domain server4you.de nameserver 127.0.0.1
Only the very first entry of the "nameservers" - Option from /etc/conf.d/netif.eth0 is used and written to /etc/resolv.conf, not all three.
Second, in man 5 resolv.conf, there are several options described, which should go into /etc/resolv.conf and manipulate the way resolves are done. You can, for example, set "options rotate" to have a better load balancing in your network with multiple DNS servers.
But I cannot find a way for this options to be set by the Funtoo templates.
Is there a mature way to use these options and multiple DNS Servers with Funtoo's Templates?
/etc/resolv.conf controlled by resolvconf script, if you want persistent /etc/resolv.conf entries, set them in
man resolvconf and man resolvconf.conf for more information
Yes, this is somehow hidden from users.
Thank you, angry_vincent !
This helps satisfying my needs a lot! Is this info "hidden" on purpose or may I feel free to add this info along with an example in the wiki?
Nevertheless, I still think that the "nameservers" option of the /etc/conf.d/netif.* - scripts may be called "broken", since the wiki explicit explains a fact which isn't happening:
The following variables are enabled by default for all network scripts, and if specified will trigger a corresponding configuration action:
Set DNS nameservers using OpenResolv. Specify multiple IPv4 or IPv6 nameservers like this: "220.127.116.11 18.104.22.168 22.214.171.124"
Something is broken here, perhaps just this wiki - documentation. But I think the ability to specify multiple DNS servers should be possible for "normal" users, using the /etc/conf.d/netif.* scripts as described. I'll file a bug for this.