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 Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,870 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,798 questions
Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,044 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,551 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.