今天早上,我们发现(由于转换)我们的一个DNSlogging到一个重要的服务是错误的。 它已在我们的主DNS服务器上进行了更改,但辅助站点上的客户端却看不到更改。 (我们的networking几乎全部使用OS X 10.5服务器和OS X 10.5客户端运行)。
让我举个例子来说明一些机器:
在客户端(通过辅助进行DNS查找),当探查configuration的方式时,我得到:
nslookup service.ourdomain.com ** server can't find service.ourdomain.com: NXDOMAIN nslookup service.ourdomain.com secondary ** server can't find service.ourdomain.com: NXDOMAIN nslookup service.ourdomain.com primary (returns appropriate information about how to contact the service)
当我ssh进入
我得到:
nslookup service.ourdomain.com (returns appropriate information about how to contact the service) nslookup service.ourdomain.com secondary ** server can't find service.ourdomain.com: NXDOMAIN nslookup service.ourdomain.com primary (returns appropriate information about how to contact the service)
我很困惑 中学似乎知道服务的位置,但在查询时不返回值。 (当然,DNS条目可以是完全独立的,也可以是查询域名时返回的内容,但是看起来应该知道的!)
我曾尝试在辅助和客户端刷新DNS。 ( dscacheutil -flushcache )。 我也停止并重新启动DNS的辅助。 ( sudo serveradmin stop dns和sudo serveradmin start dns )
在我们的主站点,我的同事重新启动了主服务器和客户端,以获得正确的名称。 不幸的是,我们有14个辅助站点,如果可能的话,我宁愿不重新启动正在共享文件的服务器,但是如果可以解决问题的话,将会这样做。
每个请求:
host -C ourdomain.com # [with names substituted]: ourdomain.com SOA record primary.ourdomain.com. admin.ourdomain.com. 2009121410 21600 3600 604800 345600
[我不知道admin.ourdomain.com是什么 – 我不相信我们有这个名字的盒子, 我确定不能ping通它。 主DNS服务器显示正确,但。]
也是每个请求,这里是dig service.ourdomain.com @secondary (带名称replace)的输出:
; <<>> DiG 9.4.3-P1 <<>> service.ourdomain.com @secondary ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 19207 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;service.ourdomain.com. IN A ;; AUTHORITY SECTION: ourdomain.com. 10800 IN SOA primary.ourdomain.com. admin.ourdomain.com. 2009121409 21600 3600 604800 345600 ;; Query time: 3 msec ;; SERVER: [IP of secondary]#53([IP of secondary]) ;; WHEN: Mon Dec 14 10:34:11 2009 ;; MSG SIZE rcvd: 88
和dig service.ourdomain.com @primary的输出:
; <<>> DiG 9.4.3-P1 <<>> service.ourdomain.com @primary ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47885 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;service.ourdomain.com. IN A ;; ANSWER SECTION: service.ourdomain.com. 10800 IN A [IP of service] ;; AUTHORITY SECTION: ourdomain.com. 10800 IN NS primary.ourdomain.com. ;; ADDITIONAL SECTION: primary.ourdomain.com. 10800 IN A [IP of primary] ;; Query time: 8 msec ;; SERVER: [IP of primary]#53([IP of primary]) ;; WHEN: Mon Dec 14 10:34:18 2009 ;; MSG SIZE rcvd: 92
最明显的区别是,中学没有回答答案,而小学说,“;;警告:recursion请求,但不可用”。
您可以使用rndc实用程序手动强制区域传输。 在所有辅助DNS服务器上运行此命令:
rndc -p 54 retransfer mydomain.example.com IN com.apple.ServerAdmin.DNS.public
您也可以使用此实用程序重新加载configuration,而不必重新启动named 。
rndc -p 54 reload
不知道你的configuration,我想这是一个caching问题,或DNS传播问题。
如果不知道您使用的域名,我无法从这里进行testing。 我个人不明白为什么人们忽略这样的相关信息,但他们经常这样做。
尝试“主机-C yourdomain.com”并告诉我你看到了什么。 如果您看到不同序列号的不同SOAlogging,则需要修复DNS传播。 如果辅助服务器未在此区域的NSlogging中列出,则在运行BIND时添加“还通知”行。
尝试更改主服务器上的序列号以确保正确更改,以及testing传播。
尝试设置一个更好的负面caching时间,比如600(10分钟)左右。 这是SOAlogging中的一个值。
尝试一个“挖掘hostname.yourdomain.com @secondaryserver”,看看它返回。 在主要做同样的事情。 如果不同,就是破碎。
如果每个返回错误数据的站点都有很长的caching时间,那么您应该可以对其进行SSH访问,并简单地重新启动名称服务器,而不是完全重新启动每个站点。 如果正在使用BIND,BIND将很快重启。
你的辅助服务器试图recursion地回答( RD – 期望recursion, RA – recursion可用),但失败( NXDOMAIN ),同时也权威地服务SOAlogging( AA – 权威答案)。
您似乎确实有一些奇怪的混合,我们需要确定您的辅助服务器如何知道区域( SOAlogging),但不知道该区域中的logging。
我会推荐迈克尔的build议 – 在主服务器上打上序列号,然后在辅助服务器上重新启动BIND,以确保清除caching。