I have configured a Cisco 1921 router to act as a DNS Caching Server by using the following configuration snippet:
ip dns view default ip dns server ip domain retry 1 ip domain timeout 1 ip domain name mgmt.local ip name-server 10.110.176.12 ip name-server 22.214.171.124 ip name-server 126.96.36.199
The idea is that if my local server (10.110.176.12) becomes unresponsive, I can still get results from Google's public DNS.
However, despite my configuration, it appears that the timeout is still 3 seconds, and the retry is 3. Clients which use this caching server will fail beucase that delay is too long for them, and therefore they will not be able to connect to Internet resources if the primary DNS server is unresponsive.
Here is the debug (with cache operations removed) :
122849: May 18 12:33:57.125: DNS: Incoming UDP query (id#2) 122850: May 18 12:33:57.125: DNS: Type 1 DNS query (id#2) for host 'maps.google.co.uk' from 192.168.110.56(53806) 122851: May 18 12:33:57.125: DNS: Servicing request using view default 122873: May 18 12:33:57.125: DNS: Re-sending DNS query (type 1, id#51028) to 10.110.176.12 122874: May 18 12:34:01.089: DNS: Resending query id #2 122875: May 18 12:34:01.089: DNS: Re-sending DNS query (type 1, id#51028) to 10.110.176.12 122876: May 18 12:34:04.089: DNS: Resending query id #2 122877: May 18 12:34:04.089: DNS: Re-sending DNS query (type 1, id#51028) to 10.110.176.12 122878: May 18 12:34:07.089: DNS: Resending query id #2 122879: May 18 12:34:07.089: DNS: Re-sending DNS query (type 1, id#51028) to 188.8.131.52 122880: May 18 12:34:07.117: DNS: Incoming UDP query (id#51028) 122881: May 18 12:34:07.117: DNS: Type 1 response (id#51028) for host <maps.google.co.uk> from 184.108.40.206(53) 122906: May 18 12:34:07.121: DNS: Forwarding back A response - no director required 122907: May 18 12:34:07.121: DNS: Finished processing query (id#2) in 9.996 secs 122908: May 18 12:34:07.121: DNS: Forwarding back reply to 192.168.110.56/53806
Local name resolution works correctly - it times out after 1 second and moves on to the next server. It's only the DNS Server portion of IOS which is ignoring these values.
Question - which values should I use for the DNS Server if it doesn't use the settings shown above? I have checked some online guides including this one: http://www.itsyourip.com/cisco/configure-cisco-router-as-cachingforwarding-dns-server/ and I've not been able to figure it out.
Cisco1921/K9 running Cisco Version 15.0(1r)M9, RELEASE SOFTWARE (fc1)
I've found some more settings that I need to configure:
LESNOSKIRT01#show ip dns view DNS View default parameters: Logging is off DNS Resolver settings: Domain lookup is enabled Default domain name: mgmt.local Domain search list: Lookup timeout: 1 seconds Lookup retries: 1 Domain name-servers: 10.110.176.12 220.127.116.11 18.104.22.168 DNS Server settings: Forwarding of queries is enabled Forwarder timeout: 3 seconds Forwarder retries: 2 Forwarder addresses:
So it looks like i need to try to find some settings to change the "Forwarder timeout" and "Forwarder retries"