Did find out that if address list contains domain names instead of direct IPs, mikrotik doing DNS request every 1 to 5 minutes to find out IPs.
I’ve got a custom DNS resolver with DNS request limitation, so I’m curios is there any possibility to decrease number those address list DNS requests? May be increase period between request for 1 day somehow?
Also those requests from address list avoiding DNS cache, may be it’s a bug.
The rate at which it queries the DNS is the same as the TTL in the DNS records.
The first query may be quicker (depending on if it was cached) but thereafter it should query at the correct rate.
So you need to set the TTL of the DNS records to 1 hour or 1 day or similar to set this.
However TTL determines how long the DNS resolve is valid. A DNS client will use the cache as long as the TTL is not expired. If the TLL is expired then a new resolve is done and the result is cached again.
TTL means, what you could be different already now but we will honor that result for the time the TTL is valid.
If you set in the router a max. cache TTL then you are trusting not the TTL of the DNS server saying 8 hours and you shorten that to 5 minutes. Any TTL lower provided by DNS server is still being valid for that period.
Mikrotik refuses to implement a minimum cache TTL so you don’t control the minimum cache duration. Example, DNS sever say 3 minutes and you can then slam a TTL of 30 minutes on it and so ignoring any updates by the DNS server for the next 30 minutes.
I hope is clearer now how TTL is working on DNS resolves.
I’d be careful with that. What if someone actually has a reason for short TTL? If authoritative server says that hostname points to address X and it’s valid for 5 minutes, but you increase it to an hour, it’s possible that at any time after those 5 minutes the service may no longer be at X. So it won’t work, and you’ll have to wait until your extra TTL expires, before it starts to work again (when you’ll get fresh record pointing to new address).