Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 1999 12:13:56 +1000
From:      Greg Black <gjb@comkey.com.au>
To:        junkmale@xtra.co.nz
Cc:        root@namodn.com, dan@wolf.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: off-site secondary DNS 
Message-ID:  <19990221021356.7333.qmail@alpha.comkey.com.au>
In-Reply-To: <19990220192615.GHON682101.mta1-rme@wocker>  of Sun, 21 Feb 1999 08:25:52 %2B1300
References:  <19990220055521.PZWW3226200.mta2-rme@wocker>; from Dan Langille on Sat, Feb 20, 1999 at 06:54:29PM %2B1300 <19990220192615.GHON682101.mta1-rme@wocker> 

next in thread | previous in thread | raw e-mail | index | archive | help
Don't follow this advice:

> Most people now use a serial number of the form YYYYMMDDHHMM.  And the 
> refresh rate determines how often the secondary will check the primary for 
> a more recent serial number.  Here's an example of these values from my 
> website:
> 
> @       IN SOA  mydomain.com.   root.freebsd.mydomain.com.        (
>                              199902210845  ; Serial
>                              3600    ; Refresh
>                              300     ; Retry
>                              3600000 ; Expire
>                              3600  ) ; Minimum
> 
> The above shows that I modifed the zone files on 21 Feb 1999 at 08:45.  

As any book on the subject will tell you and as the sources to
the version of named provided with FreeBSD will confirm, this
serial number is contained in a 32-bit integer.  (Currently,
it's an "unsigned int", but it's still only 32 bits.)

This means that the maximum possible value that can be used is
4294967295, about fifty times smaller than 199902210845.  In
fact, since there may be implementations out there using signed
integers, the safe maximum for sensible purposes would probably
be 2147483647.  Bear in mind that, even if you do use a system
that stores these serial numbers in a 64-bit integer, other name
servers out there will be using 32-bit values for years and so
simply won't interpret your huge values correctly.  The most
likely outcome is that all values greater than 4294967295 will
be quietly truncated so that they become 4294967295, thus
defeating the point of incrementing the serial number.

And the idea that you might need hundreds or thousands of serial
numbers in a single day is utterly absurd.  Even using more than
10 is pretty weird.  However, if you wish to use this date-based
serial number format (which many people do, including me), it's
more than enough to allow four digits for the year, two for the
month, two for the day and two for a serial number on that day
(which allows 100 versions per day).  So, for example, the first
serial number that I'd use today would be 1999022100, with the
final 00 gradually cycling up towards 99.  Even with signed
32-bit integers, this still gives you the possibility of 100
different serial numbers per day until the end of the year 2147.

-- 
Greg Black <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990221021356.7333.qmail>