Add only a permitted increment
02Add in ordinary unbounded arithmetic, then reduce modulo the space size. The increment itself has a limit.
The illustrative helper stops rather than assigning an RFC result. It also rejects negative or nonintegral input; this is local input handling, not a DNS wire response.
Source for this drawing: RFC 1982 · Read RFC section 3.1 ↗
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.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Wrapping a sum does not legalize an out-of-range increment.
- For width b, a defined increment n is in [0,2^(b−1)−1], including zero. Compute (s+n) modulo 2^b using ordinary nonnegative unbounded integer addition and modulus. Subtraction, negative increments and additions outside that range are not defined by this operation (§3.1). The helper reports an input error for these chosen local calls; the RFC does not prescribe an error packet.
- With eight bits, there are 256 labels and the largest defined increment is 127. Adding zero leaves a serial equal. Adding any defined nonzero increment makes the result greater than the starting serial, even when its printed integer label decreases (§§3.1,4.1,5.2).
- Published examples include 255+1=0,100+100=200,200+100=44. The last example first computes the ordinary sum 300, then reduces it modulo 256 to 44. Do not subtract 256 only when convenient or use signed host-integer ordering as the serial rule (§5.2).
- An eight-bit increment of 128 is undefined even if a machine can produce a wrapped numeric result. The limit concerns the size of one increment, not only whether the result fits. Several individually valid increments need a separate history analysis (§§3.1,4.2–4.4).
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 ↗