1

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
  • 3
    Did you update the serial? Seems to be 0. – Mark Wagner Jan 24 '17 at 20:28
  • 2
    I suspect @MarkWagner's hunch is correct. The serial number is what the slave compares to know if it needs to pull a new copy of the zone or not. If you keep telling the slave the zone's serial is 0, it's never going to update. Unless you delete the file and restart (which is what you're doing). – yoonix Jan 24 '17 at 22:29
3

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.