Tui*_*lak 5 domain-name-system bind
我在 Bind 的主从配置中偶然发现了一个奇怪的错误。
该区域在主站上运行良好,但在从站上我收到了这些错误:
21-May-2014 19:06:07.573 general: info: zone example.com/IN: refresh: failure trying master 1.2.3.4#53 (source 0.0.0.0#0): unexpected end of input
Run Code Online (Sandbox Code Playgroud)
这是我的绑定文件的样子:
@ IN SOA ns1.example.com. admin.example.com. (
2014052116 ; Serial
28800 ; Refresh
180 ; Retry
604800 ; Expire
21600 ) ; Minimum
86400 IN A 1.2.3.4
86400 IN MX 10 mail.example.com.
86400 IN MX 20 mail2.example.com.
86400 IN NS ns1.example.com.
86400 IN NS ns2.example.com.
86400 IN NS ns3.example.com.
86400 IN NS ns1.example.net.
86400 IN NS ns2.example.net.
86400 IN NS ns3.example.net.
86400 IN NS ns1.example.org.
; until here it works -- if I uncomment the below here, I'll get "end of input" failures.
; 86400 IN NS ns2.example.org.
; 86400 IN NS ns3.example.org.
* 86400 IN A 1.2.3.4
[...]
Run Code Online (Sandbox Code Playgroud)
如果我取消注释被注释的两个 NS 行 - 我将收到“输入结束”错误。如果我让他们评论,一切正常。
是否有导致崩溃的最大 NS 或文件大小?
谢谢。
编辑:
命名检查区:
master # named-checkzone example.com example.com.
zone example.com/IN: example.com/MX 'mail.example.com' is a CNAME (illegal)
zone example.com/IN: example.com/MX 'mail2.example.com' is a CNAME (illegal)
zone example.com/IN: loaded serial 2014052105
OK
Run Code Online (Sandbox Code Playgroud)
全局选项:
options {
directory "/var/cache/bind";
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
listen-on { any; };
dnssec-enable yes;
recursion no;
statistics-file "/var/log/named.stats";
try-tcp-refresh yes;
};
Run Code Online (Sandbox Code Playgroud)
版本(在所有三台服务器上都相同):
# named -v
BIND 9.8.4-rpz2+rl005.12-P1
Run Code Online (Sandbox Code Playgroud)
我认为您遇到了允许的最大 UDP DNS 数据包大小 512 字节。在发出预期请求(以 TCP 模式运行;无大小限制)之前AXFR,从属服务器还将进行查询,SOA以确认主服务器认为自己对该区域具有权威性。
您在这里遇到的问题是,响应SOA将不仅仅包含问题和答案部分:
A和记录。AAAA这就是为什么调整您的NS记录或其关联的A/AAAA记录会对整个区域传输的成功产生影响,但添加其他记录类型则没有影响。您的合并权限数据对于通过 UDP 传输来说太大了。
不幸的是,我不知道有任何解决方法。BIND 管理员参考手册确实提到了一个try-tcp-refresh选项,但默认为 yes,并且您的选项中没有禁用它。不过,我不确定区域转移是否能解决您的问题。即使成功,这也会给任何提出包含您的 AUTHORITY 和 ADDITIONAL 部分的请求的客户带来问题。EDNS0 旨在解决此类问题,但我认为AUTHORITY 膨胀在功能上水平太低,无法发挥作用。
希望我的分析在某种程度上是错误的。我认为你有一个非常有趣的问题,我希望看到有人对此提供更好的答案,因为我也愿意从中学习。
| 归档时间: |
|
| 查看次数: |
5260 次 |
| 最近记录: |