change TTL for forwarder cache

tarek H 181 Reputation points
2023-01-06T08:15:54.39+00:00

hello
i have a simple domain controller running on server 2019 with integrated DNS and forwarders
i am facing an issue with a website that changes its ip every hour or so
if i clear cache on the dns server , the website works then stops working when they change the ip
I want to decrease the cache of the dns server so it goes faster to the forwarders

I used this command : Set-DnsServerCache -MaxTTL 00.02:00:00

Would this do the trick ?!
thank you

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,766 Reputation points
    2023-01-06T15:53:31.103+00:00

    Hello TarekH

    You are in the right direction but to avoid network congestion or server load due to so frequent DNS update, you can use the parameter "-MaxNegativeTtl" to specify the maximum keeping time for records that have returned unsolvable.

    "Specifies how long (1 to 2592000 seconds) an entry that records a negative answer to a query remains stored in the DNS cache. The value must be provided as a TimeSpan. The default setting is 15 minutes."

    You can also add other fine tunning for your DNS server using the next reference: https://learn.microsoft.com/en-us/powershell/module/dnsserver/set-dnsservercache?view=windowsserver2022-ps


    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.