Community discussions

MikroTik App
 
edgarm
just joined
Topic Author
Posts: 1
Joined: Tue Sep 28, 2021 6:53 pm

Static DNS entry unlimited TTL?

Tue Sep 28, 2021 6:57 pm

Hello,

Is it possible to give a static DNS entry unlimited TTL?
Could not find any info on if that is possible and how. What value do I put into TTL to achieve this?

Thanks
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 723
Joined: Tue Dec 17, 2019 1:08 pm

Re: Static DNS entry unlimited TTL?

Sun Dec 05, 2021 11:11 pm

If i am not mistaken,

When you add a Static-DNS entry
It will stay in the Static-DNS-List forever or untill deleted.

Exemple :
/ip dns static add name=test address=1.1.1.1
The TTL-Value (default 24h) are for the Client asking for the Domain.
If you want your Clients to cache DNS-Entries for longer,
The maximum Time to live (TTL) value you can assign for a DNS entry is 2147483647 seconds
But be carefull not all Client will work with TTL=25000d

Exemple:
/ip dns static add name=ttt address=1.1.1.1 ttl=1000d
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11383
Joined: Thu Mar 03, 2016 10:23 pm

Re: Static DNS entry unlimited TTL?

Mon Dec 06, 2021 2:21 pm

Is it possible to give a static DNS entry unlimited TTL?

As @ConnyMercier already wrote ... it's not possible. And it's bad idea as well ... if clients are to cache answer indefinitely, how does one force clients to get fresh value in case record changes?

It is customary to have TTL on DNS records set to anything between an hour and a few days. This has added benefit that potential changes can spread out pretty quickly if things are prepared in advance. E.g. if original TTL was 1 day, a few days before change TTL is reduced to a few hours, one day before change TTL is reduced to an hour, a few hours before change TTL is changed to something short (e.g. 5 minutes), after change TTL is increased back to 1 day ... this way there's only 5 minutes when DNS records are out of sync with reality ... for properly behaving clients that is.
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 723
Joined: Tue Dec 17, 2019 1:08 pm

Re: Static DNS entry unlimited TTL?

Mon Dec 06, 2021 2:26 pm

... if clients are to cache answer indefinitely, how does one force clients to get fresh value in case record changes?
Answer: ipconfig /flushdns

:lol:
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11383
Joined: Thu Mar 03, 2016 10:23 pm

Re: Static DNS entry unlimited TTL?

Mon Dec 06, 2021 2:32 pm

... if clients are to cache answer indefinitely, how does one force clients to get fresh value in case record changes?
Answer: ipconfig /flushdns
Yeah, right, that's LOL answer. And, BTW, doesn't work on my linux workstation.

But if we're talking nonsense: DNS entry with unlimited TTL is the one written in /etc/hosts (or C:\windows\system32\driver\etc\hosts or whatever appropriate path to that file).
The idea about DNS is that domain admin doesn't have access to all the clients and should DNS system allow for control over record life through own methods (which doesn't include remoting into every system in the universe and executing some magical command.
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 723
Joined: Tue Dec 17, 2019 1:08 pm

Re: Static DNS entry unlimited TTL?

Mon Dec 06, 2021 2:44 pm

, BTW, doesn't work on my linux workstation.
Look at that.... lerned something new !!
Thanks =)

Who is online

Users browsing this forum: Bing [Bot] and 59 guests