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

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记录.看上上面的官方解释

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值