Configure negative caching of DNS records
-
NXDOMAIN error message — The authoritative DNS servers respond with the NXDOMAIN error message when the queried domain name does not have any records configured on the server. This message implies that the queried domain is an invalid or a non-existent domain name.
-
NODATA error message — If the domain name in the query is valid but records of the given type are not available, the appliance sends a NODATA error message.
default-dns-profile) that are bound by default to a DNS virtual server or in the newly created DNS profile.
Enable or disable negative caching by using the CLI
- add dns profile <dnsProfileName> [-cacheRecords ( ENABLED | DISABLED )] [-cacheNegativeResponses (ENABLED | DISABLED )]
- show dns profile [<dnsProfileName>]
> sh dns profile default-dns-profile
1) default-dns-profile
Query logging : DISABLED Answer section logging : DISABLED
Extended logging : DISABLED Error logging : DISABLED
Cache Records : ENABLED Cache Negative Responses: ENABLED
Done
> add dnsprofile dns_profile1 -cacheRecords ENABLED -cacheNegativeResponses ENABLED
Done
> show dns profile dns_profile1
1) dns_profile1
Query logging : DISABLED Answer section logging : DISABLED
Extended logging : DISABLED Error logging : DISABLED
Cache Records : ENABLED Cache Negative Responses: ENABLED
Done
Specify service or virtual server level DNS parameters by using the CLI
-
Configure the DNS profile.
add dns profile <dnsProfileName> [-cacheRecords ( ENABLED | DISABLED )] [-cacheNegativeResponses (ENABLED | DISABLED )] -
Bind the DNS profile to the service or virtual server.To bind the DNS profile to the service:
set service <name> [-dnsProfileName <string>]
>set service service1 -dnsProfileName dns_profile1
Done
set lb vserver <name> [-dnsProfileName <string>]
>set lb vserver lbvserver1 -dnsProfileName dns_profile1
Done
Specify service or virtual server level DNS parameters by using the GUI
-
Configure the HTTP profile.Navigate to System > Profiles> DNS Profile, and create the DNS profile.
-
Bind the HTTP profile to the service or virtual server.Navigate to Traffic Management > Load Balancing> Services/Virtual Servers, and create the DNS profile, that must be bound to the service or the virtual server.
Rate limiting negative response served by the appliance
-
Save the resources on the NetScaler appliance.
-
Prevent any malicious queries for non-existent domain names.
Rate limiting negative response served by the cache by using the CLI
set dns parameter -NXDOMainRateLimitThreshold <positive-integer>
set dns parameter -NXDOMainRateLimitThreshold 1000
Rate limiting negative response served by the cache by using the GUI
-
Navigate to Traffic Management > DNS and click Change DNS Settings.
-
In the Configure DNS parameters page, in the NXDOMAIN Rate Limit Threshold field, enter the threshold value until which the responses must be served from the cache.