Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    Example: Configuring the TTL Value for DNS Server Caching

    This example shows how to configure the TTL value for a DNS server cache to define the period for which DNS query results are cached.

    Requirements

    No special configuration beyond device initialization is required before performing this task.

    Overview

    The DNS name server stores DNS query responses in its cache for the TTL period specified in the TTL field of the resource record. When the TTL value expires, the name server sends a fresh DNS query and updates the cache. You can configure the TTL value from 0 to 604,800 seconds. You can also configure the TTL value for cached negative responses. Negative caching is the storing of the record that a value does not exist. In this example, you set the maximum TTL value for cached (and negative cached) responses to 86,400 seconds.

    Configuration

    Step-by-Step Procedure

    To configure the TTL value for a DNS server cache:

    1. Specify the maximum TTL value for cached responses, in seconds.
      [edit]user@host# set system services dns max-cache-ttl 86400
    2. Specify the maximum TTL value for negative cached responses, in seconds.
      [edit]user@host# set system services dns max-ncache-ttl 86400
    3. 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.

     

    Related Documentation

     

    Published: 2014-05-08