Verification is the moment the checksum field earns its keep. This lesson sums the complete packet header and checks for the all-ones identity.

highlighted = computed this step

Why verification includes the checksum

To verify a received packet, the checksum word is not zeroed. The receiver sums every supplied word and expects the folded result to be all ones.

valid fold=0xffff\text{valid fold}=0xffff

Book One checksum verifies

The full header from Book 1 includes checksum 0xb1e6. Summing all words folds to 0xffff, so the deferred checksum now verifies.

folded=0xffff\text{folded}=0xffff
Verify Book One headerVerify mode sums the supplied words as-is.Verify Book One headerverifyrowindexvalueword00x4500word10x003cword20x1c46word30x4000word40x4006word50xb1e6word60xac10word70x0a63word80xac10word90x0a0craw sum0x0002fffdfolded0xffffresult0xffff

Verify it again

A second UDP DNS-style header, whose destination 8.8.8.8 is the address from Book 2, also folds to 0xffff. The same verify identity applies to a different packet.

folded=0xffff\text{folded}=0xffff
Verify DNS-style headerVerify mode sums the supplied words as-is.Verify DNS-style headerverifyrowindexvalueword00x4500word10x0028word20xabcdword30x0000word40x8011word50xbe3eword60xc0a8word70x0001word80x0808word90x0808raw sum0x0002fffdfolded0xffffresult0xffff

Summary

Verification sums the exact received words, including the checksum field, and expects all ones. Error detection over the exact bytes; timing/throughput is not modeled here.

valid fold=0xffff\text{valid fold}=0xffff
Verify Book One headerVerify mode sums the supplied words as-is.Verify Book One headerverifyrowindexvalueword00x4500word10x003cword20x1c46word30x4000word40x4006word50xb1e6word60xac10word70x0a63word80xac10word90x0a0craw sum0x0002fffdfolded0xffffresult0xffff