eduperez wrote:May I ask why? In general, it is a good idea to use your router to cache DNS entries.
I agree.
But it happens that in between the Internet router and the OpenWRT router, there is a Windows machine that I don't control.
Internet <=> Router <=WiFi-X=> Windows <=> OpenWRT <=WiFi-Y=> DHCP clients
[ ROOM A ] [ ROOM B ] [ ROOM C ]
The Windows machine acts as a WiFi relay in room B between the Internet router in room A wired-connected to openWRT serving WiFi clients in room C.
Clients in room C are too far from room A to catch the Internet router wifi signal, thus the Windows machine. And I cannot touch/get rid of that Windows setup.
It is a shop actually, WiFi clients are actual shop clients - there is some "human traffic" / doors in between rooms that seemingly affects DNS - could be some weird setup in Windows as well, but I don't want to "fix" that.
Sometimes the UDP packets requesting DNS resolution to the Windows machine (that appears as the router for OpenWRT) are lost or anyway not understood by Windows (while TCP traffic is undisturbed).
During the day, DNS resolution for clients is ~ok 30%, slow 40%, or not working 30%.
The thing is, forcing clients locally in the local setup to use the Google DNS servers - instead of the DNS server provided by DHCP [ie router] - fixes all issues. DNS resolution is almost instantaneous, and always works. But doing this on all Mac/Linux coming to the shop is not a solution.
dnsmasq runs on the openWRT router is 2.55.
Tried to modify /etc/init.d/dnsmasq to force the 'dhcp-option' with '6,8.8.8.8,8.8.4.4' directly on the command line, from
/usr/sbin/dnsmasq $args && {...
to
/usr/sbin/dnsmasq --dhcp-option=6,8.8.8.8,4.4.4.4 $args && {...
but that does not provide the intended result.
This is the output dump from 'ipconfig getpacket' on a Mac
root# ipconfig getpacket en0
op = BOOTREPLY
htype = 1
flags = 0
hlen = 6
hops = 0
xid = 1896474031
secs = 0
ciaddr = 192.168.111.141
yiaddr = 192.168.111.141
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = 71:37:de:ad:be:ef
sname =
file =
options:
Options count is 11
dhcp_message_type (uint8): ACK 0x5
server_identifier (ip): 192.168.111.1
subnet_mask (ip): 255.255.255.0
router (ip_mult): {192.168.111.1}
domain_name_server (ip_mult): {192.168.111.1}
renewal_t1_time_value (uint32): 0x12c
rebinding_t2_time_value (uint32): 0x6ebe0
lease_time (uint32): 0x93a80
nb_over_tcpip_node_type (uint8): 0x4
domain_name (string): mshome.net
end (none):
That shows the dns-server being the router address.
--
Reply to @jow
It's in /overlay/etc on that device, and there, dnsmasq.conf shows only one non-comment line
dhcp-option=6,8.8.4.4,8.8.8.8
(Last edited by *++p on 15 Jan 2015, 11:36)