Visual RFC.
ALL RFCs / RFC 1071
Read the RFC ↗
RFC 1071 / INTERNET CHECKSUM

Preserve byte positions across orders and chunks

04

Byte-order independence requires consistency, and an odd chunk boundary needs alignment correction.

RFC 1071 · §2(A–B) and §3EXAMPLE
4 / 4
Preserve byte positions across orders and chunksSwap the second local sum f0eb toebf0, combine withf201 and fold toddf2. The blocked naïve e2ed result demonstrates why independent local sums cannot be combined without offset parity.Preserve original byte positionsSecond local sum f0eb → aligned ebf0Correct odd-origin alignmentf201 + ebf0 → ddf2Naïve local sums e2ed: wrong alignmentSame bytes, same final ddf2RFC 1071 · chapter 4 · state 4 · arithmetic example
04
Correct the odd-origin partial sum

Swap the second partial to f0eb→ebf0, then combine and fold to ddf2. Stop the naïve e2ed result; alignment, not chunk size alone, controls the correction.

Source for this drawing: RFC 1071 · Read RFC source: §2(A–B) and §3 ↗

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

Consistently swapping the bytes of every16-bit word swaps the bytes of the final folded sum. For the published §3 example the swapped-word sum isf2dd, which must be swapped back to ddf2 for this network-order result. Byte-order independence does not mean a raw native integer can always be stored unchanged (§2(B)).

  • Consistently swapping the bytes of every16-bit word swaps the bytes of the final folded sum. For the published §3 example the swapped-word sum isf2dd, which must be swapped back to ddf2 for this network-order result. Byte-order independence does not mean a raw native integer can always be stored unchanged (§2(B)).
  • Addition is associative and commutative as long as even/odd byte assignment is respected. You may group or reorder whole aligned words, not arbitrarily move individual bytes between high and low positions (§2(A)).
  • The published odd-split example separates00 01 f2 from 03 f4 f5 f6 f7. Local padded sums aref201 and f0eb. The second chunk starts at original offset 3, so byte-swap its local sum to ebf0 before adding it to the first (§2(B), §3).
  • The corrected combinationf201+ebf0=1ddf1 folds to ddf2. Naively adding local sumsf201+f0eb folds to e2ed and is wrong for this byte stream. The helper tracks total prefix length across chunks, including empty chunks, without appending padding to the original bytes.
DETAILS

Educational arithmetic, not a protocol stack or a portable replacement for old assembly/C. Each protocol defines its own covered octets and checksum-field rules.

Read the RFC section ↗

All chapters in RFC 1071

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 ↗