This section describes how to configure theTTL value for a DNS server cache to define the period for which DNSquery results are cached.
Requirements
No special configuration beyond device initialization is requiredbefore performing this task.
Overview
The DNS name server stores DNS query responses in its cachefor the TTL period specified in the TTL field of the resource record.When the TTL value expires, the name server sends a fresh DNS queryand updates the cache. You can configure the TTL value from 0 to 604,800seconds. You can also configure the TTL value for cached negativeresponses. Negative caching is the storing of the record that a valuedoes not exist. In this example, you set the maximum TTL value forcached (and negative cached) responses to 86,400 seconds.
Topology
Configuration
Procedure
Step-by-Step Procedure
To configure the TTL value for a DNS server cache:
Specify the maximum TTL value for cached responses, inseconds. (In this example, 86400 seconds equals 24 hours.)
[edit]user@host# set system services dns max-cache-ttl 86400
Specify the maximum TTL value for negative cached responses,in seconds.
[edit]user@host# set system services dns max-ncache-ttl 86400
If you are done configuring the device, commit the configuration.
[edit]user@host# commit
Verification
To verify the configuration is working properly,enter the show system services
command.