我已使用以下配置片段将 Cisco 1921 路由器配置为充当 DNS 缓存服务器:
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 8.8.4.4
ip name-server 8.8.8.8
这个想法是,如果我的本地服务器 (10.110.176.12) 没有响应,我仍然可以从 Google 的公共 DNS 获得结果。
但是,尽管我进行了配置,但似乎超时仍然是 3 秒,重试次数是 3。使用此缓存服务器的客户端将失败,因为延迟对他们来说太长,因此他们将无法连接到 Internet如果主 DNS 服务器没有响应,则资源。
这是调试(删除了缓存操作):
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 8.8.4.4
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 8.8.4.4(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
本地名称解析工作正常 - 它在 1 秒后超时并移动到下一个服务器。只有 IOS 的 DNS 服务器部分忽略了这些值。
问题 - 如果 DNS 服务器不使用上面显示的设置,我应该使用哪些值?我检查了一些在线指南,包括以下指南:http ://www.itsyourip.com/cisco/configure-cisco-router-as-cachingforwarding-dns-server/ ,但我无法弄清楚。
Cisco1921/K9 运行 Cisco 版本 15.0(1r)M9,发布软件 (fc1)
更新1:
我发现了更多需要配置的设置:
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
8.8.4.4
8.8.8.8
DNS Server settings:
Forwarding of queries is enabled
Forwarder timeout: 3 seconds
Forwarder retries: 2
Forwarder addresses:
所以看起来我需要尝试找到一些设置来更改“转发器超时”和“转发器重试”