Applies To:

Show Versions Show Versions

Manual Chapter: Resolving DNS Queries and Caching Responses
Manual Chapter
Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Overview: Improving DNS performance by resolving queries and caching responses

You can configure a resolver cache on the BIG-IP system to resolve DNS queries and cache the responses. The next time the system receives a query for a response that exists in the cache, the system returns the response from the cache. The resolver cache contains messages, resource records, and the nameservers the system queries to resolve DNS queries.

BIG-IP system using resolver cache Illustration of BIG-IP system using resolver cache

Task summary

Perform these tasks to configure a resolver cache on the BIG-IP system.

Creating a resolver DNS cache

Create a resolver cache on the BIG-IP system when you want the system to resolve DNS queries and cache responses.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click Create. The New DNS Cache screen opens.
  3. In the Name field, type a name for the cache.
  4. From the Resolver Type list, select Resolver.
  5. Click Finished.
Associate the DNS cache with a custom DNS profile.

Creating a custom DNS profile for DNS resolving and caching

Ensure that at least one DNS cache exists on the BIG-IP system.
You can create a custom DNS profile to configure the BIG-IP system to cache responses to DNS connection requests.
  1. On the Main tab, click Local Traffic > Profiles > Services > DNS. The DNS profile list screen opens.
  2. Click Create. The New DNS Profile screen opens.
  3. In the Name field, type a name for the profile.
  4. Select the Custom check box. The fields in the Settings area become available for revision.
  5. From the Use BIND Server on BIG-IP list, select Disabled.
  6. From the DNS Cache list, select Enabled. When you enable the DNS Cache option, you must also select a DNS cache from the DNS Cache Name list.
  7. From the DNS Cache Name list, select the DNS cache that you want to associate with this profile. You can associate a DNS cache with a profile, even when the DNS Cache option, is Disabled. This allows you to enable and disable the cache for debugging purposes.
  8. Click Finished.
Assign the custom DNS profile to the virtual server handling the DNS traffic, which includes the responses to queries that you want to cache.

Assigning a custom DNS profile to an LTM virtual server

Ensure that at least one custom DNS profile that is configured for DNS caching exists on the BIG-IP system.
You can assign a custom DNS profile to a virtual server to enable the BIG-IP system to perform DNS caching on the traffic the virtual server handles.
Note: This task applies only to LTM-provisioned systems.
  1. On the Main tab, click Local Traffic > Virtual Servers. The Virtual Server List screen displays a list of existing virtual servers.
  2. Click the name of the virtual server you want to modify.
  3. From the Configuration list, select Advanced.
  4. From the DNS Profile list, select the custom DNS profile you created.
  5. Click Finished.
The responses to DNS queries handled by this virtual server are cached on the BIG-IP system.

Determining DNS cache performance

You can view statistics to determine how well a DNS cache on the BIG-IP system is performing.
  1. On the Main tab, click Statistics > Module Statistics > Local Traffic. The Local Traffic Statistics screen opens.
  2. From the Statistics Type list, select DNS Cache.
  3. In the Details column for a cache, click View, to display detailed information about the cache.
  4. To return to the Local Traffic Statistics screen, click Back.

Viewing records in a DNS cache

You can view records in a DNS cache to determine how well a specific cache on the BIG-IP system is performing.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type show ltm dns cache <cache type> <cache name>, and press Enter. For example, the command sequence show ltm dns cache transparent my_transparent_cache, displays the messages and resource records in the transparent cache named my_transparent_cache.

Viewing DNS cache statistics using tmsh

You can view DNS cache statistics using tmsh to determine how well a specific cache on the BIG-IP system is performing.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type show ltm dns cache, and press Enter. Statistics for all of the DNS caches on the BIG-IP system display.
  4. At the tmsh prompt, type show ltm dns cache <cache-type>, and press Enter. For example, the command sequence show ltm dns cache transparent, displays statistics for each of the transparent caches on the system.
  5. At the tmsh prompt, type show ltm dns cache <cache type> <cache name>, and press Enter. For example, the command sequence, show ltm dns cache transparent my_t1, displays statistics for the transparent cache on the system named my_t1.

Managing cache size

Determine the amount of memory the BIG-IP system has and how much you want to commit to DNS caching. View the statistics for a cache to determine how well the cache is working.
You can change the size of a DNS cache to fix cache performance issues.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click the name of the cache you want to modify.
  3. In the Message Cache Size field, type the maximum size in bytes for the DNS message cache. The BIG-IP system caches the messages in a DNS response in the message cache. A higher maximum size makes if possible for more DNS responses to be cached and increases the cache hit percentage. A lower maximum size forces earlier eviction of cached content, but can lower the cache hit percentage.
    Important: The message cache size includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the size by eight and put that value in this field.
  4. In the Resource Record Cache Size field, type the maximum size in bytes for the DNS resource record cache. The BIG-IP system caches the supporting records in a DNS response in the Resource Record cache. A higher maximum size makes if possible for more DNS responses to be cached and increases the cache hit percentage. A lower maximum size forces earlier eviction of cached content, but can lower the cache hit percentage.
    Important: The resource record cache size includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the size by eight and put that value in this field.
  5. In the Nameserver Cache Count field, type the maximum number of DNS nameservers for which the BIG-IP system caches connection and capability data.
    Important: The nameserver cache count includes all tmms on the BIG-IP system; therefore, if there are eight tmms, multiply the count by eight and put that value in this field.
  6. In the Unsolicited Reply Threshold field, change the default value if you are using the BIG-IP system to monitor for unsolicited replies using SNMP. The system always rejects unsolicited replies. The default value of 0 (off) indicates the system does not generate SNMP traps or log messages when rejecting unsolicited replies. Changing the default value alerts you to a potential security attack, such as cache poisoning or DOS. For example, if you specify 1,000,000 unsolicited replies, each time the system receives 1,000,000 unsolicited replies, it generates an SNMP trap and log message.
  7. Click Finished.

Clearing a DNS cache

You can clear all records from a specific DNS cache on the BIG-IP system.
  1. On the Main tab, click Local Traffic > DNS Caches > DNS Cache List. The DNS Cache List screen opens.
  2. Click the Statistics tab. The Local Traffic Statistics screen opens.
  3. Select the check box next to the cache you want to clear, and then click Clear Cache.

Clearing specific records from a DNS cache

You can clear specific records from a DNS cache using tmsh. For example, you can delete all RRSET records or only the A records in the specified cache.
Tip: In tmsh, you can use the command completion feature to discover the types of records that are available for deletion.
  1. Log in to the command-line interface of the BIG-IP system.
  2. At the BASH prompt, type tmsh.
  3. At the tmsh prompt, type ltm dns cache records, and press Enter to navigate to the dns cache records module.
  4. Type delete <cache-type> type <record-type> cache <cache-name>, and press Enter. For example, the command sequence delete rrset type a cache my_resolver_cache, deletes the A records from the resource record cache of the resolver cache named my_resolver_cache.

Implementation result

You now have an implementation in which the BIG-IP system acts as a DNS resolver, caches DNS responses, and answers queries for a cached response from the cache.

Table of Contents   |   << Previous Chapter   |   Next Chapter >>

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)