我有一个主BIND服务器维护一些区域。 named.conf文件中的示例条目:
zone "example.com" { type master; file "example.com.zone"; allow-update { 10.202.215.10; 10.202.215.11; 10.201.215.14; }; };
有三个奴隶。 存在于所有三个示例configuration:
zone "example.com" { type slave; file "slaves/example.com.zone"; masters { 10.201.215.11; 10.202.215.10; 10.202.215.11; }; };
编辑
主机和从机的IP和主机名
Master: 10.201.215.11 Slave1: 10.201.215.14 Slave2: 10.202.215.10 Slave3: 10.202.215.11
结束编辑
对于示例中的区域文件,我已经增加了主服务器上的序列号,然后在所有服务器(主服务器和三个从服务器)上运行了rndc reload 。 每个从站上的区域文件上的时间标记正在更新,但从站上的序列号不会更新。
但是奴隶们正在更新:
Oct 14 12:14:44 dns-slave01 named[12434]: transfer of 'example.com/IN' from m 10.201.215.11#53: connected using 10.202.215.10#44420
为什么串口不能更新?
编辑
基于yoonix的评论,我已经删除了除了我所知道的区域主服务器之外的所有服务器:
zone "example.com" { type slave; file "slaves/example.com.zone"; masters { 10.201.215.11; }; };
我也明确地设置notify yes尽pipe它默认启用。
另外,我已经删除了主服务器上的allow-update选项,以确保所有主机都能够dynamic更新。
复制仍然没有发生。
但是,我看到主人正在发送NOTIFY通知:
Oct 17 00:48:00 dns-master01 named[5608]: zone example.com/IN: sending notifies (serial 2009091903) Oct 17 00:48:13 dns-master01 named[5608]: zone example.com/IN: sending notifies (serial 2009091904)
我已经通过telnetvalidation过,我能够通过端口53连接到主站的从站。
编辑2我做的一件事是确保所有的奴隶具有相同的configuration,以及修复错误configuration的日志logging。 大约三个小时后,我修改了区域文件,发生了转移。 我仍然无法理清为什么不立即发生。
下面是主named.conf 。 还有几个区域条目,但它们都与域的例外相同。
// generated by named-bootconf.pl // // a caching only nameserver config acl trusted_nets { 10.201.96.0/20; 10.202.96.0/20; 10.201.215.0/24; 10.202.215.0/24; 12.130.200.0/24; 174.47.15.0/24; 199.108.193.0/24; 199.108.195.0/24; 72.165.204.0/24; }; // options { directory "/var/named"; allow-recursion { trusted_nets; }; notify yes; allow-transfer { 10.202.215.10; 10.202.215.11; 10.201.215.14; 199.108.193.20; 209.67.192.20; 10.201.215.10; }; }; logging { channel dns_log { file "/var/log/named.log" versions 3 size 5m; severity info; print-time yes; print-severity yes; print-category yes; }; category default { dns_log; }; }; controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; zone "." { type hint; file "named.ca"; }; zone "localhost" { allow-update { none; }; type master; file "localhost.zone"; }; zone "0.0.127.in-addr.arpa" { allow-update { none; }; type master; file "named.local"; }; zone "example.com" { type master; file "example.com.zone"; allow-update { 10.202.215.10; 10.202.215.11; 10.201.215.14; }; }; include "/etc/rndc.key";
allow-update设置中的每个IP都是从站之一。
奴隶例子。 同样,还有几个区域,但是除了域以外,它们是相同的。
// generated by named-bootconf.pl // // a caching only nameserver config acl trusted_nets { 10.201.96.0/20; 10.202.96.0/20; 10.202.92.0/20; 10.201.215.0/24; 10.202.215.0/24; 12.130.200.0/24; 174.47.15.0/24; 199.108.193.0/24; 199.108.195.0/24; 72.165.204.0/24; }; // options { directory "/var/named"; allow-recursion { trusted_nets; }; allow-transfer { 10.202.215.10; 10.202.215.11; 10.201.215.11; 199.108.193.20; 209.67.192.20; }; }; logging { channel mtg_log { file "/var/log/named.log" versions 3 size 5m; severity info; print-time yes; print-severity yes; print-category yes; }; category default { mtg_log; }; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndckey; }; }; zone "." IN { type hint; file "named.ca"; }; zone "localhost" { allow-update { none; }; type master; file "localhost.zone"; }; zone "0.0.127.in-addr.arpa" { allow-update { none; }; type master; file "named.local"; }; zone "example.com" { type slave; file "slaves/example.com.zone"; masters { 10.201.215.11; }; }; include "/etc/rndc.key";
除了type选项,它们是相同的。 我不知道这是如何configuration的。
编辑3
NOTIFY通知似乎只在重新启动时才会被发送。 我试过rndc reload和service named reload但都没有做任何事情。 只有service named restart发送通知。
从你的configuration,你有多个主服务器。 奴隶可以查询任何主人的更新。 在尝试更新从站之前,validation所有主站是否是最新的。 我怀疑你应该只有一个IPv4和/或一个IPv6地址在列表中。
您可能应该添加一个包含您的从属服务器IP地址的通知列表。 通常,这些应该是唯一可以进行区域转移的主机。 您还应该考虑为主服务器启用通知。
我build议你删除从站上的区域文件,并从主站执行新的区域传输。