大网数据广告活动
服务器运维问答

bind dns entries not updating from master to slave

· 52CE 我爱测

I've a master slave Bind dns setup. If I remove the zone file from slave, and then restart the service. the file is getting replication. but when I updating the entries in the zone files on master, it's not updating in slave. Sho…

问题原文

原帖链接 · KMG · CC BY-SA 3.0

I've a master slave Bind dns setup. If I remove the zone file from slave, and then restart the service. the file is getting replication.

but when I updating the entries in the zone files on master, it's not updating in slave.

Should I need to remove the file on Slave, whenever I do update on master zone file ?

here is my configuration:

Master Config:

options {
    listen-on port 53 { 127.0.0.1; 10.10.10.11;};
    listen-on-v6 port 53 { ::1; };
    directory   "/var/named";
    dump-file   "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { localhost; 10.10.0.0/16; };
        allow-transfer {localhost; 10.10.10.12;};
    notify yes;
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";

    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
    type hint;
    file "named.ca";
};

#### Define Forward & Reverse Zones #########

zone"example.local" IN {
type master;
file "examplelocal.fwd.zone";
allow-update { none; };
};

###############################################

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

Slave Config:

options {
    listen-on port 53 { 127.0.0.1; 10.10.10.12;};
    listen-on-v6 port 53 { ::1; };
    directory   "/var/named";
    dump-file   "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { localhost; 10.21.0.0/16;  };
    notify yes;

    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";

    pid-file "/run/named/named.pid";
    session-keyfile "/run/named/session.key";

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
    type hint;
    file "named.ca";
};

#### Define Slave Configuration ##########

zone"example.local" IN {
type slave;
file "slaves/examplelocal.fwd.zone";
masters { 10.10.10.11; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

in the master zone file - examplelocal.fwd.zone , I added one entry called "nt001 IN A 10.10.10.19". but it's not updated in slave.

Master Zone file:

$TTL 1D
@   IN SOA  ns1.example.local. root.example.local. (
                    0   ; serial
                    1D  ; refresh
                    1H  ; retry
                    1W  ; expire
                    3H )    ; minimum
; Name servers
@   IN  NS  ns1.example.local.
@   IN  NS  n22.example.local.

; Hosts
@   IN  A   10.10.10.11
@   IN  A   10.10.10.12
ns1 IN  A   10.10.10.11
ns2 IN  A   10.10.10.12
srv1    IN  A   10.10.10.17
srv2    IN  A   10.10.10.18
nt001   IN  A   10.10.10.19

社区高分解答

原帖链接 · KMG · CC BY-SA 3.0

Serial number is the issue in entry.

Serial number value should be updated whenever do changes on the zone file. I didn't change the serial number in the zone file. that's the reason, why it's not updated in slave server.

Theoretically: Serial numbers in DNS zone files provide a way for the server to verify that the contents of a particular zone file are up-to-date. If the serial number in a zone file hasn't changed since that zone was last loaded, named figures that it can ignore the file

Hope, this answer may help someone who had hit with same issue.

Thank you!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。