My wan config has this line option dns 8.8.8.8 8.8.4.4
This works most of the time, but today I noticed "ping google.com" was sometimes returning "bad address" and other times it was slow to resolve the IP, from within the router prompt.
When I put nameserver 8.8.8.8, in resolv.conf the issue went away and IP resolution was faster, [from within the router]
My queries:
Would this also impact internet user connected to the router?
When I restarted dnsmasq, the content of resolv.conf got reverted to default.
Where can I change to make it permanent?
If this will help users resolve DNS faster, then every OpenWRT router should have nameserver <your preferred dns provide> in resolv.conf file. The impact was that much drastic.
Most people know only the "option dns" setting in /etc/config/network.
Wonder why the setting "option dns" in network config isn't as effective.
no it shouldn't.
openwrt is no mind reader, and public servers are completely blocked in some countries.
using anything else than what the ISP provides you with (usually via DHCP), is a hit or miss.
bypassing the local dnsmasq will also make any local lan name query fail.
Yes, /tmp/resolv.conf.auto has the DNS from network config.
But /tmp/resolv.conf does not. It has only nameserver 127.0.0.1
And from within the router DNS resolution was much faster only after I added nameserver 8.8.8.8 in resolv.conf
Thank you folks for all your comments so far.
What I am mainly interested to know is whether DNS resolution speed-up i noticed from within the router after the aforesaid change in resolv.conf, will users also benefit from the same or not.
I tested it out.
I put a bogus IP in /etc/resolv.conf; from within the router DNS did NOT resolve.
But as a user connected to router, it had no impact, DNS continued to work.
Thank you @frollic and @eduperez for your insights.
This forum never disappoints