Visual RFC.
ALL RFCs / RFC 1982
Read the RFC ↗
RFC 1982 / SERIAL NUMBER ARITHMETIC

Compare within half the space

03

Equality is ordinary equality; ordering depends on the distance and leaves antipodal pairs undefined.

RFC 1982 · § 3.2EXAMPLE
4 / 4
Compare within half the spaceBase44 and candidate44 have distance0 and are equal. Equality is distinct from both advancement and the undefined half-space comparison.Compare distances, not raw integersCheck equality before ordering06412819244○ base 44 · ◎ candidate 44Distance 0: labels are equalNot newer; not the half-space exceptionRFC1982 · chapter 3 · state 4 · offline examples
04
Handle equality separately

Identical labels are equal. Do not misclassify a zero distance as wraparound advancement or as the undefined half-space case.

Source for this drawing: RFC 1982 · Read RFC section 3.2 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Exactly half a space apart is unequal, but has no defined ordering.

  • Let base and candidate be serial labels in the same b-bit space. Equality means their integer labels are identical. For unequal labels, an equivalent way to apply the RFC’s two ordinary-integer cases is d=(candidate−base) modulo 2^b: if 0<d<2^(b−1), the candidate is greater; if d>2^(b−1), it is less (§3.2). The distance expression is an explanatory calculation, not a new permitted serial subtraction operation.
  • With eight bits, candidate 44 compared with base 200 has forward distance 100 and is greater. Reverse the question: candidate 200 compared with base 44 has forward distance 156 and is less. Comparing only the raw integers gives the wrong answer at wraparound (§§3.2,5.2).
  • At distance exactly 128 in an eight-bit space, the labels are not equal, but neither greater-than nor less-than is defined. The published pairs are 0/128,1/129,…127/255. Implementations are free to return either ordering result or flag an error; users must not depend on a particular outcome (§§3.2,5.2). This helper deliberately returns an explicit undefined classification instead of choosing an ordering.
  • At distance zero the serials are equal, not newer and not an undefined half-space pair. Greater-or-equal and less-or-equal extend the defined comparison naturally. A serial comparison is not a universal ordering for arbitrary lists, nor evidence of the date or authenticity of a version (§§3.2,4,9).
DETAILS

Fictional offline arithmetic and DNS observations. Small spaces illustrate the rule; DNS SOA uses 32 bits. Not a DNS implementation, transfer protocol, operational reset recipe or authenticity check.

Read the RFC section ↗

All chapters in RFC 1982

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗