DNS SOA serial number cyclic comparison
Determine the cyclic order of 2 SOA serials and compare B with the result of adding a specified increment to A
Cyclic ordering modulo 2³² differs from ordinary integer ordering.
Results
—
—
- Cyclic distance A→B
- —
- Comparison of incremented A and B
- —
- Cyclic distance from incremented A→B
- —
Results update automatically when the required values are entered.
Method, applicability and sources
Calculation method
d=(B−A) mod 2³². If d=0, the values are equal; if 0<d<2³¹, B is newer; if d=2³¹, comparison is undefined; if 2³¹<d<2³², A is newer. Increment n is 0–2³¹−1; incremented A′=(A+n) mod 2³².
Worked example (hypothetical values)
For A=4294967295, B=0, and increment=1, d=1, so B is newer. After addition, A′=0 and equals B.
Applicability and limitations
Unsigned DNS SOA serial numbers defined by RFC 1982, with a width of 32 bits. A difference of 2147483648 between 2 values has no defined ordering. Increments of 2147483648 or more are outside the definition. TTL, actual zone-transfer status, and calendar validity of YYYYMMDDnn are not assessed.
Methods used
- 32-bit serial arithmetic (RFC 1982 (August 1996)): scope 32-bit DNS SOA serial numbers; region global
Method and sources
Method: RFC 1982 (1996/8), §3.1 Addition, §3.2 Comparison. Data recorded: 2026-11-14.