Simple (non-regexp) static DNS entries give 2-3 'unknown hostname' errors every day. Often MikroTik answers 'unknown host' immediately (that about static entry!), sometimes it takes up to 20 sec and the answer may be positive or negative. External DNS names are also affected.
Can anybody confirm the issue?
Does any solution exist?
What also can I check to investigate the problem?
The router is not under extensive use: CPU is below 20%, traffic is less than 1 mbps.
Versions prior 6.37.4 also behaive like this for us. We have two RB915G devices, both behave like this.
Here is the output of my script which resolves given hostname 2000 times with 2 sec interval (about one hour) via specified DNS server:
Code: Select all
$ dns-resolv-test.sh git-test 192.168.188.1 | fold
Trying to resolve git-test 2000 times via 192.168.188.1...
Legend: + success, - unsuccess, (N sec - time of successful but long query)
+++++++++++++++(5 sec)+++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)++++(
5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++(5 sec)+++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++++++
+++(5 sec)+++++++++++++++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++(5 sec)++++(5 sec)+++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++(5 sec)+++++(5 sec)+++++(5 sec)++++++++++++
++++++++(5 sec)+++++++++++++++(5 sec)++++++++++++++(5 sec)+++++(5 sec)++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(6
sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++
++++++++++++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++
++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5
sec)++++(5 sec)++++++++++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++(5 sec)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)++++++++
+++++++++++++++++++++++++++++++++++++(5 sec)+++++++++++(5 sec)++++++++++++++++++
+++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++(5 sec)+++++++++++++
+++++++++++++++++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++
+(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++
Total DNS queries: 2000, 0 errors, 37 delays
Resolving external names also fails sometimes:
Code: Select all
$ dns-resolv-test.sh google.com 192.168.188.1 | fold
Trying to resolve google.com 2000 times via 192.168.188.1...
Legend: + success, - unsuccess, (N sec - time of successful but long query)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
(5 sec)+++++++++++++++++++++++++++++++++++++++++++++(4 sec)+++++++++++++++++++++
+++++++++++++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++(5 sec)++++++++++++++++++++(5 sec)+++++++++++++++++++++
+(5 sec)+++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++++
+++++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++(5 sec)+++++++++++++(5 sec)+++++++++++++(5 sec)+++++++++++++(5 sec)
+++++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++(5 sec)+++++++++++++++++++++(5 sec)++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++++++
++++++++++++++++++++++++++++++++++++++++++++(6 sec)++++(5 sec)++++++++++++++++++
++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++(5 sec)+(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)++++++
++++++++++++++++(5 sec)+++++++++++++++++++(5 sec)++++(5 sec)++++++++++++++++++++
++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++++
++++++++++++++++++++++(5 sec)+++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++(5 sec)+++++++(5 sec)++++++++++++++++++++(5 sec)+++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)+++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(5 sec)++++++++++++++
+++++(5 sec)+++++++++++++++++++++
Total DNS queries: 2000, 0 errors, 39 delays
To make sure my network works well I did the same test with external Google's DNS:
Code: Select all
$ dns-resolv-test.sh google.com 8.8.8.8 | fold
Trying to resolve google.com 2000 times via 8.8.8.8...
Legend: + success, - unsuccess, (N sec - time of successful but long query)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++(6 sec)++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++
Total DNS queries: 2000, 0 errors, 1 delays
Here is a test shell script dns-resolv-test.sh:
Code: Select all
#!/bin/sh
test -z "$1" -o -z "$2" && {
echo "Usage: $0 <hostname to resolve> <dns server> "
exit 1
}
HOSTNAME_TO_RESOLVE="$1"
DNS_SERV_ADDR="$2"
total_tries=2000
errors=0
delays=0
# Single attempt to resolve a hostname
# Args:
# $1 - hostname
# $2 - dns server
# Return 0 on success
# Side effects:
# * prints + or - sign. Optionally time in seconds for slow responces
try_to_resolv()
{
# global errors
local hostnm="$1"
local dnsserv="$2"
local ret=0
local time_start=`date +%s`
if ! host "$HOSTNAME_TO_RESOLVE" "$DNS_SERV_ADDR" >/dev/null ; then
ret=1
echo -n '-'
errors=$(( $errors + 1 ))
else
echo -n '+'
fi
local time_end=`date +%s`
local runtime=$(( $time_end - $time_start ))
if [ "$runtime" -gt "1" ] ; then
echo -n "($runtime sec)"
delays=$(( $delays + 1 ))
fi
return $ret
}
echo "Trying to resolve $HOSTNAME_TO_RESOLVE $total_tries times via $DNS_SERV_ADDR..."
echo "Legend: + success, - unsuccess, (N sec - time of successful but long query)"
for i in `seq $total_tries` ; do
try_to_resolv "$HOSTNAME_TO_RESOLVE" "$DNS_SERV_ADDR"
sleep 2
done
echo "\nTotal DNS queries: $total_tries, $errors errors, $delays delays"