This toy retransmission model is only byte replay plus ACK arithmetic.

highlighted = computed this step

What this toy model checks

This model checks one missing payload, one repeated data segment, one duplicate ACK, and one final ACK.

payload bytes=2\text{payload bytes}=2
Retransmission boundaryA toy TCP timeline shows the retransmit followed by the ACK that advances.Retransmission boundaryClientESTABLISHEDESTABLISHEDESTABLISHEDESTABLISHEDServerwaitingwaitingreceivedreceivedDATA hi lost seq=1001 ACK, PSHduplicate ACK seq=5001 ACKDATA hi again seq=1001 ACK, PSHACK advances seq=5001 ACK

Exact arithmetic

The duplicate ACK stays at 1001; the final ACK is 1001 plus 2.

1001+2=10031001+2=1003
Checked ACK boundaryThe final ACK header advances after the retransmitted payload arrives.Final ACK header160 bits / 20 bytes0x01bb9c4000001389000003eb5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101011byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1003data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0

What this does not model

NOTE: toy retransmission and ACK arithmetic example only; not timeout estimation, fast retransmit thresholds, SACK, congestion-window changes, reordering, packet capture timing, checksum or offload behavior, or production TCP behavior.

toy retransmit=1\text{toy retransmit}=1
Retransmission boundaryA toy TCP timeline shows the retransmit followed by the ACK that advances.Retransmission boundaryClientESTABLISHEDESTABLISHEDESTABLISHEDESTABLISHEDServerwaitingwaitingreceivedreceivedDATA hi lost seq=1001 ACK, PSHduplicate ACK seq=5001 ACKDATA hi again seq=1001 ACK, PSHACK advances seq=5001 ACK

Summary

TCP retransmission here is exact byte replay plus exact ACK arithmetic, not a full TCP implementation.

final ACK=1003\text{final ACK}=1003
Checked ACK boundaryThe final ACK header advances after the retransmitted payload arrives.Final ACK header160 bits / 20 bytes0x01bb9c4000001389000003eb5010100000000000byte 0byte 1byte 2byte 300000001101110111001110001000000byte 4byte 5byte 6byte 700000000000000000001001110001001byte 8byte 9byte 10byte 1100000000000000000000001111101011byte 12byte 13byte 14byte 1501010000000100000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port443destination-port40000sequence-number5001acknowledgment-number1003data-offset5reserved0x0flags0x10window0x1000checksum0x0000urgent-pointer0