您的位置:首页 > 其它

遇到 bind DNS 的 Master 与 Slave 不能同步更新问题

2010-07-26 23:47 316 查看
Master 配置 好了测试也正常了

Slave 第一次也能生成 Zone 正反向文件 .但就是奇怪.

在 Master 端修改了加大了 Serial number ,但 Slave 就是不同步.

最后才发现原来是这个问题:

zone "mydomain.com" {
type master;
file "mydomain.com.zone";
notify yes;
allow-transfer { slave_servers; };
also-notify { slave_servers; };
};[/code:1:11bf6b342c]

6.2.14.1
notify
If yes (the default), DNS NOTIFY messages are sent when a zone the server is authoritative for
changes, see Section 3.3. The messages are sent to the servers listed in the zone’s NS records
(except the master server identified in the SOA MNAME field), and to any servers listed in the
also-notify option.
If explicit, notifies are sent only to servers explicitly listed using also-notify. If no, no notifies
are sent.
The notify option may also be specified in the zone statement, in which case it overrides the options
notify statement. It would only be necessary to turn off this option if it caused slaves to crash.

6.2.14.6
also-notify
Defines a global list of IP addresses of name servers that are also sent NOTIFY messages whenever
a fresh copy of the zone is loaded, in addition to the servers listed in the zone’s NS records. This
helps to ensure that copies of the zones will quickly converge on stealth servers. If an also-notify
list is given in a zone statement, it will override the options also-notify statement. When a zone
notify statement is set to no, the IP addresses in the global also-notify list will not be sent NOTIFY
messages for that zone. The default is the empty list (no global notification list).

使用notify指令会自动通知所有这个域的所有在ns记录上的机器,also-notify指令可以用来通知所有不在ns记录上的dns服务器。
还是好好看文档吧,里面还有很多有趣的功能呢。


最后修改了下Master 的 Zone 文件

[root@ye810 /]# vi /var/named/named.baidu.com
$TTL 3600
@ IN SOA baidu.com. huithe.163.com. (
445 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS linux.baidu.com.;
@ IN NS window.baidu.com.;
linux IN A 192.168.1.200;
window IN A 192.168.1.201;

yehuiming IN A 111.111.111.111;
mytxt IN TXT "fuck you";
wenwen IN CNAME yehuiming;
love IN CNAME yehuiming;
xxoo IN CNAME yehuiming;
ooo IN CNAME yehuiming;
yindang IN CNAME yehuiming;
51 IN CNAME yehuiming;
56 IN CNAME linux;
55 IN CNAME window;


添加了 Master 和 Slave 的 NS 记录.. 为啥要ns记录.看上上面的官方解释
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: