question

willphinney-0403 avatar image
willphinney-0403 asked ·

DNS caching windows server 2016

This is an odd question, kind of a n00b, but does anybody know if there is a way to cache DNS on my windows 2016 server so that it doesn't check for new dns entires for an extended period of time? For example, I want it to keep all records for a minimum of 8 hours. This would be in the event that a major DNS carrier were to go down I would have all the cached for a minimum time.

Thanks

windows-server-2016windows-dhcp-dns
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
DSPatrick answered ·

You're welcome.

--please don't forget to Accept as answer if the reply is helpful--



Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
DSPatrick answered ·

Not sure what is meant. One option would be to turn off or adjust the scavenging
https://techcommunity.microsoft.com/t5/azure-active-directory-identity/dns-scavenging-and-ad/ba-p/243140


--please don't forget to Accept as answer if the reply is helpful--




Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

willphinney-0403 avatar image
willphinney-0403 answered ·

We had an issue where a DNS provider went down, so we were not longer able to access those public records. I'm not sure how to tune this, but was wondering if the DNS provider were to go down, but we had caching enabled, would some how circumvent the outage. I know this isn't the best idea, but was wondering if anybody had done that.

Thanks

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
DSPatrick answered ·

Are you asking about domain DNS or public DNS?


Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

willphinney-0403 avatar image
willphinney-0403 answered ·

Any DNS being served by my windows server 2016. Obviously for any public DNS it fwd's out, but I was hoping to setup caching that would hold on for a day or so.

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
DSPatrick answered ·

If the public DNS you're using has become unreliable I'd either REPLACE it with another or you can also ADD multiples to forwarders. As to caching by default the client DNS cache holds for 24 hours.

--please don't forget to Accept as answer if the reply is helpful--








Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

willphinney-0403 avatar image
willphinney-0403 answered ·

So @DSPatrick by default, if my windows 2016 server is serving DNS , for any records and the fwder goes down, then it should still be caching those for 1 day, right? One of the major CDN's hosted DNS, but it went down and when it went down we were no longer able to access those records, however, if it was cached for 1 day this should not be the case, correct?

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
DSPatrick answered ·

Not on your server. The cache is client side or in other words on the user's desktop pc. You can also manually adjust it via registry hack

MaxCacheTtl
https://docs.microsoft.com/en-us/windows-server/networking/dns/troubleshoot/disable-dns-client-side-caching#using-the-registry-to-control-the-caching-time

Personally I think the better option is to add a more reliable forwarder (8.8.8.8, 8.8.4.4) and add more than one just in case.

Another option is if it was only one or two and fixed name to address you could hard code in the client hosts file.
https://support.microsoft.com/en-us/help/172218/microsoft-tcp-ip-host-name-resolution-order



--please don't forget to Accept as answer if the reply is helpful--



Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

willphinney-0403 avatar image
willphinney-0403 answered ·

@DSPatrick It just occurred to me that if my CDN goes down there is nothing I could do even if caching were set for a month as the provider is down and they're serving the content. Thanks a lot for talking me through this.

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.