Dear All, I am implementing a script for n2n with dhcp on supernode support and in this context questions about dnsmasq, resolv.conf and resolv.conf.auto.
On /etc/init.d/network start the system seem to look for DNS servers on WAN, obtain a dhcp lease etc. When that happens /tmp/resolv.conf.auto is filled with identified DNS servers. If dns servers are added to /etc/config/network they are added. On /etc/init.d/dnsmasq start the system fills the file /tmp/resolv.conf, which may only have the local loop IP, but may have IP addresses, if added to the DOMAIN option at the top of the script. Here my questions: Why are there two files /tmp/resolv.conf and /tmp/resolv.auto? Are they both used or is one of them ignored? If /tmp/resolv.conf is ignored (at least with default config in /etc/config/dhcp, why is it even created by dnsmasq? Is the nameserver 127.0.0.1 entry in /tmp/resolv.conf required for the system to read the /etc/hosts file or is that read anyway if options domain and local have been set in /etc/config/dhcp? Is a dns entry in the interface section of /etc/config/network with one or more dns server IP addresses enough to force static usage of these dns servers for this interface, or is some configuration in /etc/config/dhcp required? Consider a scenario where you want to use the DNS servers the system identifies first through upstream discovery, and then, if none is found or the found ones do not work, fall back to some standard given ones (say in /etc/config/network with a dns config entry). Is this achievable through configuration only? If the strictorder directive is not set in /etc/config/dhcp, what order will dnsmasq use for its dns servers? PS: Of course I have looked at the wiki and I have also seen the very new 'DNS and DHCP configuration' entry in there (thanks jow). Unfortunately this focuses on listing /etc/config/dhcp config entries but does not explain standard use cases very much, so in the end I found it not very useful. I am more than happy to update the wiki if I could be armed with the above requested information, as I am sure it will benefit a lot of people. Kind Regards Hanno
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel