RFC 1982 / START HERE
Serial number arithmetic, before the details
Serial Number Arithmetic describes how finite version numbers advance and compare when they wrap. Its title is a description, not an acronym.
Think of labels around a circle. A small enough step moves forward, even when a large integer label wraps to a smaller one. Comparing two labels depends on their distance, and exactly opposite labels have no defined ordering.
The idea in one picture
Choose a finite space
Advance around the circle
Compare the copies
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
DNS, the Domain Name System, uses a 32-bit version number in its Start of Authority (SOA) record. RFC 1982 is an August 1996 Proposed Standard updating RFC 1034 and RFC 1035 with the missing arithmetic definition. It does not replace DNS or define a new transfer protocol.
A familiar example
A fictional secondary server stores serial 4294967295. The primary’s next serial can be zero, which is newer by one under this arithmetic. Several individually valid increments can still make a distant copy look newer than the primary; checking only the last step is unsafe.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- See a number space wrap aroundA finite set of integer labels forms a circle: every serial has a successor and predecessor.→
- Add only a permitted incrementAdd in ordinary unbounded arithmetic, then reduce modulo the space size. The increment itself has a limit.→
- Compare within half the spaceEquality is ordinary equality; ordering depends on the distance and leaves antipodal pairs undefined.→
- Track the whole increment historyEach small step may advance while its final endpoint is older than, undefined against, or equal to an earlier starting point.→
- Apply the rule to DNS SOA serialsDNS uses a 32-bit serial and needs care across every increment sequence within SOA.expire.→
This introduction explains RFC 1982 (1996). Read the original RFC ↗