0

i installed dnsperf with unbound and i'm looking to cache a list of DNS records on my centos server i use dnsperf to cache a list dns

[root@mail bin]# cat domains.txt
facebook.com. MX
google.com. MX
gmail.com. MX
twitter. MX
dnsperf -s 8.8.8.8 -d domains.txt

Statistics:

  Queries sent:         20
  Queries completed:    20 (100.00%)
  Queries lost:         0 (0.00%)

  Response codes:       NOERROR 20 (100.00%)
  Average packet size:  request 29, response 67
  Run time (s):         1.107204
  Queries per second:   18.063519

  Average Latency (s):  0.166944 (min 0.005329, max 1.096674)
  Latency StdDev (s):   0.235990

however after executing this command i expected that those records to be cached which is not happening

it still take time to query and there query seems not cached

Omer Stimpack
  • 205
  • 1
  • 3
  • 11
  • You may be mistaken on how this tool works. If you want to test caching inside a specific recursive nameserver you need to point `dnsperf` with `-s` at this nameserver. And from your example above you are testing a public DNS resolver performance, not your local unbound one. – Patrick Mevzek Mar 23 '21 at 22:53
  • Ah okay i used this command : dnsperf -d domainlist.txt so when i use local unbound dns it gives me this error: : dnsperf [Timeout] is there any guide how to config unbound or bind caching server properly seems like my cache server not caching also how can i know that my server is caching should i get 0msec while using dig command? – Omer Stimpack Mar 24 '21 at 23:05
  • A standard unbound install works "out of the box" normally, it has the relevant configuration, you can use `dig @` its IP (localhost or equivalent) and you should get a reply. If you redo it, you should see a much faster reply and a decreased TTL, both facts showing you that caching works. You do not need to use a tool like `dnsperf` to troubleshoot basic DNS problems, `dig` is enough for that. I think it means you first have to make sure your DNS server is properly installed and working, but that may warrant a separate new questions with relevant details (including the `dig @` commands) – Patrick Mevzek Mar 24 '21 at 23:49

0 Answers0