On debian 9 I configurated bind9 (v.9.10.3) as cache server, later as forwarders server. For testing purpose I don't have any firewall and I make test from internal lan gigabit. Bind works but performances are not so good, for example:
dig aruba.it @192.168.50.35 (my BIND)
Query time: 129 msec
dig aruba.it @8.8.8.8
Query time: 20 msec
nmap -sT -p 53 192.168.50.35
Starting Nmap 7.60 ( https://nmap.org ) at 2017-11-06 14:31 CET
Nmap scan report for 192.168.50.35
Host is up (0.0014s latency).
ping -c5 192.168.50.35
PING 192.168.50.35 (192.168.50.35) 56(84) bytes of data.
64 bytes from 192.168.50.35: icmp_seq=1 ttl=64 time=1.31 ms
64 bytes from 192.168.50.35: icmp_seq=2 ttl=64 time=1.34 ms
64 bytes from 192.168.50.35: icmp_seq=3 ttl=64 time=1.33 ms
64 bytes from 192.168.50.35: icmp_seq=4 ttl=64 time=5.56 ms
64 bytes from 192.168.50.35: icmp_seq=5 ttl=64 time=1.32 ms
--- 192.168.50.35 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 1.312/2.177/5.561/1.692 ms
This happens with all domains. Switching bind config with forwarders I've same problem: queries are slowes.
Is this correct a query time for a local DNS?
cat /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
// uncomment these to switch to forwarders
// forwarders {
// 8.8.8.8;
// 8.8.4.4;
// };
dnssec-validation auto;
listen-on port 53 { localhost; 192.168.50.0/24; };
allow-query { localhost; 192.168.50.0/24; };
recursion yes;
};
Disabling IPv6 doesn't change anything.