Serial number too big.

Joseph S D Yao jsdy at center.osis.gov
Tue May 10 16:35:20 UTC 2005


On Tue, May 10, 2005 at 09:20:33AM +1000, Mark Andrews wrote:
...
> > > 	Actually YYYYMMDDnn  works until the end of 4294.
> > ...
> > When did they change it from unsigned 31-bit to unsigned 32-bit?
>  
> 	The number has never been "signed" / "unsigned" in the
> 	usual sence.  Treating it as a signed / unsigned number
> 	will cause incorrect behaviour in a nameserver.
> 
> 	The following relationships are true for serial numbers.
> 
> 	4000010100 > 3000010100 > 2000010100 > 10000101 > 4000010100
> 
> 	As long as you make a update once every two thousand odd years
> 	you can go all the way to 4294.  Starting from today you need
> 	to make a update sometime before the end of 4152 to be able to
> 	get to 4294123199.
> 
> 		2005051000+2^31-1 => 4152534647

My apologies, I was confusing this with something else - I'm not sure
what.  Oh, I know: time_t.

Serial numbers were defined as unsigned 32-bit numbers in RFC 1035,
where it was stated that "the value wraps and should be compared using
sequence space arithmetic."  RFC 1982 defines the latter concept:
addition [s' = (s + n) modulo (2 ^ SERIAL_BITS)] and comparison, using
regular non-negative integers i1 and i2:

   ... s1 is said to be equal to s2 if and only if i1 is equal to i2,
   in all other cases, s1 is not equal to s2.

   s1 is said to be less than s2 if, and only if, s1 is not equal to s2,
   and

	(i1 < i2 and i2 - i1 < 2^(SERIAL_BITS - 1)) or
	(i1 > i2 and i1 - i2 > 2^(SERIAL_BITS - 1))

   s1 is said to be greater than s2 if, and only if, s1 is not equal to
   s2, and

	(i1 < i2 and i2 - i1 > 2^(SERIAL_BITS - 1)) or
	(i1 > i2 and i1 - i2 < 2^(SERIAL_BITS - 1))

   Note that there are some pairs of values s1 and s2 for which s1 is
   not equal to s2, but for which s1 is neither greater than, nor less
   than, s2. ...

[Mark, I know you know this; others might be interested.]

-- 
Joe Yao
-----------------------------------------------------------------------
   This message is not an official statement of OSIS Center policies.



More information about the bind-users mailing list