Wrong count using "count-only"? (5.6)

Using a 750G with 5.6, Firmware 2.29

“ip dns cache print terse” returns a numbered list of dns-cache entries, in my case it ends with:


261 name=www.l.google.com address=209.85.148.104 ttl=2m48s
262 name=www.l.google.com address=209.85.148.103 ttl=2m48s
263 name=www.l.google.com address=209.85.148.147 ttl=2m48s
264 name=www.l.google.com address=209.85.148.99 ttl=2m48s

So, I guess there are 264 entries in the cache. Issuing “ip dns cache print terse count-only” should return 264 too, instead it returns “561”. Tried multiple times, “count-only” counts are always approx. twice as high as the real count.

So, what am I missing? :slight_smile:

Cache Monitoring

Submenu level: /ip dns cache
Description
This menu provides a list with all address (DNS type “A”) records stored on the server



All DNS Entries

Submenu level: /ip dns cache all
Description
This menu provides a complete list with all DNS records stored on the server

http://wiki.mikrotik.com/wiki/Manual:IP/DNS#Cache_Monitoring

For some reason count-only on the “/ip dns cache” level prints the count from “/ip dns cache all”. If that’s not just a cosmetic error for you (i.e., you need the exact count of A records) you can either ask support@mikrotik.com to fix it or run "/ip dns cache all print count-only where type=“A”. That should give you the number “/ip dns cache” counts up to.

Thank you very much, I’ll use “/ip dns cache all print count-only where type=“A””, that’s perfectly fine for me!