Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're using BIND 9.7.3 on the stable version of Debian (updated weekly), and we see some very strange behaviour for one particular domain. We host a few hundred, but this one is ours.

Basically, the secondary DNS server is trying to transfer the domain from the master. According to the logs, it succeeds in transferring the domain every time, but it always gets the serial number wrong! As a result, it keeps re-doing the transfer at every opportunity. I'm not even sure where it's getting the serial number, because the primary server reports back with the right serial number.

Here's the logs we get from the secondary (the ip is the primary server, is the secondary. And of course, they're not real.):

Aug 23 03:01:08 ns2 named[4242]: transfer of '' from connected using
Aug 23 03:01:08 ns2 named[4242]: transfer of '' from Transfer completed: 0 messages, 1 records, 0 bytes, 0.001 secs (0 bytes/sec)

This seems pretty normal, although both hosts are set up with IPv6 addresses and technically speaking they should be using them, but that's a problem for another day (I think).

So let's query the primary server from the secondary one, and see what it says:

$ host -4 -t any
Using domain server:
Aliases: has IPv6 address fc00:::31 has SOA record 2011082201 900 3600 604800 86400 name server name server mail is handled by 20 has address descriptive text "v=spf1 mx ip4: ip4: ip6:fc00:::23 ip6:fc00:::12 ip6:fc00:::33 ~all"

And then let's do the same for the secondary nameserver:

$ host -4 -t any  
Using domain server:
Aliases: has SOA record 2011011013 600 600 600 600 descriptive text "v=spf1 mx ip4: ip4: ip6:fc00::23 ip6:fc00::12 ip6:fc00::33 ~all" has address mail is handled by 20 name server name server has IPv6 address fc00::31

You can see here that the serial number is 2011011013 on the secondary, but 2011082201 for the primary. I've used the date plus a 2-digit number, so the secondary is somehow using a serial number from January. I've tried searching our configuration on both the primary and secondary servers for this serial number, but it's nowhere to be found.

Speaking of configuration, here's the configuration for this domain in /etc/bind/named.conf:

zone "" { type slave; file "secondaries/"; masters {; }; };

and the timestamp on secondaries/ is the time of the most recent update. Deleting this file still results in a serial number of 2011011013. The contents of this file are very long, but here are the headers on the secondary server:

$TTL 3600   ; 1 hour     IN SOA (
            2011011013 ; serial
            600        ; refresh (10 minutes)
            600        ; retry (10 minutes)
            600        ; expire (10 minutes)
            600        ; minimum (10 minutes)
        MX  20
        TXT "v=spf1 mx ip4: ip4: ip6:fc00::23 ip6:fc00::12 ip6:fc00::33 ~all"
        AAAA    fc00::31

and the headers from the equivalent file on the primary:

$TTL 1d
@       IN      SOA (
                    2011082302 ; serial
                    15m        ; refresh after 15 minutes
                    1h         ; retry after 1 hour
                    1w         ; expire after 1 week
                    1d )       ; negative caching TTL of 1 day.

    IN      NS
    IN      NS
    IN MX   20

@               IN      A

;; SPF TXT records
;;;;;;;;;;;;;;;;;;;;;;;;;;; TXT "v=spf1 mx ip4: ip4: ip6:fc00::23 ip6:fc00::12 ip6:fc00::33 ~all"

; this next bit is for the Sender Policy Framework, if it ever really matters.
pop             TXT     "v=spf1 a -all"
pop3            TXT     "v=spf1 a -all"
smtp            TXT     "v=spf1 a -all"
webmail         TXT     "v=spf1 a -all"
horde           TXT     "v=spf1 a -all"
share|improve this question
When you tried deleting the secondary's copy of the zone, did you stop the secondary server, delete it & restart? (That should force a full AXFR instead of just an IXFR) – voretaq7 Aug 23 '11 at 16:41
Yes, repeatedly. – Ernie Aug 23 '11 at 16:51
I might be tempted to fire up tcpdump on the secondary DNS server, delete the zone and restart bind. Load up the capture and see if it gets the zone from the correct place, and if it has valid data. – Zoredache Aug 23 '11 at 17:10
I've seen behavior like this when there are jnl files related to the domain. Have you already checked for those? – polynomial Aug 24 '11 at 6:22
It seems odd that the log on the secondary server reports a successful transfer of 0 bytes. That doesn't sound successful at all... – NorbyTheGeek Oct 12 '11 at 20:14

check your permissions on the secondary server's directory for the zones. Can the named process write to that folder? Try deleting that secondary zone and let the transfer recreate it

share|improve this answer

Notice that your BIND log at the primary indicates

... Transfer completed: 0 messages, 1 records, 0 bytes, 0.001 secs (0 bytes/sec)

That's not a success confirmation. Is there any message indicating an error before this?

share|improve this answer
That could be a successful IXFR. – MikeyB Nov 16 '11 at 23:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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