I have a device, in a LAN, behind a router, that runs a linux and need to provide it with an internal DNS server, to resolve names for its own internal applications (it's OpenWRT-based).
The reason to do this is that for some queries, the DHCP-provided stuff doesn't seem to work as expected and some of the client apps get a timeout (sorry for the lack of details, but I'm pretty sure about this as wireshark captures prove some DNS queries are not correctly responded).
I don't intend to run a DHCP server in this device, just local DNS server.
I have a basic knowledge about DHCP, DNS and their handshakings, and I'm not sure how this scenario works with dnsmasq: I configured the DNS server -in the device- with an external public nameserver in its list of servers, expecting (maybe wrongly, I don't know) for it to override the nameservers provided by the DHCP/router/ISP (being the device a DHCP client in this case).
The /etc/resolv.conf
file just has the nameserver 127.0.0.1
line, and everything seems to work as I expect.
But what happens if any external DNS is down? Will it fallback to that provided by the DHCP handshaking?
I think put in other words the question would be: when dnsmasq has a list of servers, will it use the DHCP DNS settings?
Hope this is clear.
Из того, что я мог видеть, похоже, что dnsmasq работает следующим образом:
/tmp/resolv.conf
); - resolv-file
, указывая на /tmp/resolv.conf.auto
в OpenWRT) для внутреннего использования, где настраиваемые серверы имен и , предоставляемые DHCP-сервером, указаны в списке. Итак, короче говоря, он отслеживает все серверы имен.