故障现象:
1,通过DNS管理平台添加或者更新的DNS记录,使用rndc reload显示执行成功,但不能生效。
2,BIND进程重启后,无法提供服务。
3,日志报错:
15-Feb-2017 12:04:38.604 general: error:dns_master_load: sdo.com/zone_beijing_CMCC:198: sdo.com: CNAME and other data
15-Feb-2017 12:04:38.604 general: error:zone sdo.com/IN/view_beijing_CMCC: loading from master filesdo.com/zone_beijing_CMCC failed: CNAME and other data
15-Feb-2017 12:04:38.604 general: error:zone sdo.com/IN/view_beijing_CMCC: not loaded due to errors.
注意这一行“15-Feb-2017 12:04:38.604 general: error: dns_master_load:sdo.com/zone_beijing_CMCC:198: sdo.com: CNAME and other data”里面提示198行的错误
经过仔细分析,其实可以看到在194行,它定义了一个CNAME的RR(resource record),这导致了和198行的产生了冲突。
解决方法:
把194行的CNAME去掉,或者用A记录来把访问sdo.com指向到某服务器组。
总结:
在BIND中,对于一个资源记录(RR)指定了CNAME后,不能再指定其他类型的RR。
请参考RFC1034
https://tools.ietf.org/html/rfc1034
注意以下重点段落:
A CNAME RR identifies its owner name as an alias, and
specifies the corresponding canonical name in the RDATA section of the
RR. If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different. This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.
原文来自微信公众号:运维技术实践;作者:胥峰
本文链接:https://www.yunweipai.com/19076.html
网友评论comments