"Conversation" starts here: NTP issues on a dumb AP configuration - #13 by Cthulhu88
What I am using right now for my dumb AP and my dumb switch: have my main router host a NTP server (main router doesn't exhibit the problem), then have all dumb devices pull NTP data from the main router via its raw IPv4 address 192.168.0.1.
Also, something that I haven't mentioned in that post chain is that the problem is very likely caused by a bad /etc/resolv.conf
, not necessarily failure to resolve names.
See my main router setup:
dnsmasq writes a local resolv.conf at its service start:
search intranet
nameserver 127.0.0.1
nameserver ::1
dnsmasq forwards global internet requests to dnsproxy:
server=127.0.0.1#5353
server=::1#5353
Because dnsproxy spams my syslog with large network unreachable errors until both wan
and wan6
are up, I only start dnsproxy via the following hotplug:
INTERFACES="wan wan6"
STATE="/var/run/dnsproxy"
check_interface() {
local iface
for iface in $INTERFACES; do
[ $INTERFACE = $iface ] && return
done
exit 0
}
all_up() {
local iface
for iface in $INTERFACES; do
[ ! -f "$STATE/$iface" ] && return 1
done
return 0
}
case $ACTION in
ifup)
check_interface && mkdir -p "$STATE" && {
flock -x 1000 && touch "$STATE/$INTERFACE" && all_up && {
service dnsproxy start
}
} 1000>"$STATE/.lock"
;;
ifdown)
check_interface && mkdir -p "$STATE" && {
flock -x 1000 && rm -f "$STATE/$INTERFACE" && {
service dnsproxy stop
}
} 1000>"$STATE/.lock"
;;
esac
exit 0
This leaves DNS unresolvable for about ~10 seconds, but sysntpd doesn't deadlock and works correctly after DNS services become available.