The LabJOURNEY OF AN INTERNET MESSAGE NETWORKS · PACKETS & ACKS

FROM SEND TO CONFIRMED

Sent in pieces.
Confirmed one by one.

Your message is cut into chunks. Each one hops from router to router, and the sender waits for a tiny “got it” (an acknowledgement, or ACK) before sending the next. If either goes missing, only a timer can notice.

MODEL TIME0.000 s
DELIVERED0 / 60 confirmed by ACK
ROUND TRIP602 ms250 ms each way + sending
TRANSMISSIONS0for 6 chunks
LOST ON THE WAY00 data · 0 ACKs
DELAY FROM LOSS+0.00 svs. the same run with no loss
GOODPUT0 kbit/sof a 128 kbit/s link

01 / WHERE THE PACKETS GO

The network map.

Network map.

Link numbers are one-way delays; routers take the smallest total. Tap R3 or the Receiver to unplug it.

02 / WHEN THINGS HAPPEN

The timing diagram.

Timing diagram.

Time runs down; each sloped line is one hop. The bracket by the sender is its retry timer.

Press play to send the first chunk.

AT THE SENDERWaiting to start
    AT THE RECEIVERNothing yet
      Event log (text)

        WHAT’S HAPPENING

        Read the journey.

        PREDICT FIRST

        TRY THIS

        Three network puzzles.

          How the model works

          Routing. Six machines are joined by eight links. Each link’s one-way delay is the base delay times a fixed length factor (0.7 to 1.2). Before anything is sent, the shortest total delay from Sender to Receiver is found with Dijkstra’s algorithm. Take R3 offline and the same search finds the detour.

          Each hop takes sending time + travel time. Sending time is the bits divided by the link speed: 512 × 8 / bandwidth for data, 32 × 8 / bandwidth for an ACK. Routers store each packet completely before forwarding it, and a link can push out only one packet at a time.

          Stop-and-wait. The sender transmits one chunk and starts a timer. When the receiver stores a chunk, it sends an ACK back along the same route. Only when that ACK reaches the sender does the next chunk go. If the timer runs out first, the sender sends the same chunk again and doubles the timer (exponential backoff). After five failed tries it gives up.

          Loss is a coin toss on every hop, with the probability you set. The sender cannot tell a lost chunk from a lost ACK or a slow one. It only knows that no ACK came back in time. Chunk numbers let the receiver throw away a copy it has already stored.

          The readouts. Round trip is the time one chunk takes with nothing lost. Delay from loss compares your run with the same settings at 0% loss, at the same number of confirmed chunks. Goodput is delivered chunk data divided by elapsed time.

          Honest limits
          • This is a teaching model, not TCP. Real TCP keeps many packets in flight at once (a window), adapts its timer to measured round trips, and slows down when it senses congestion. There is no DNS, encryption, handshake or real network traffic here.
          • Because the sender waits for each ACK, chunks can never overtake each other in this model. On the real Internet, many packets are in flight together, and different routes or queues can deliver them out of order. The receiver then uses the same chunk numbers to put them back in order.
          • Routes are fixed for a run. Real routers update routes continuously and can change path mid-message.
          • Losses are independent coin tosses. Real losses come in bursts, often from full router queues.
          • The model decides at the start of each hop whether a packet will be lost. The map and the timing diagram mark the loss halfway along the link. That position is for illustration only.
          • The odds box assumes each try succeeds only if its own data and ACK survive every hop. A late ACK from an earlier try can also confirm a chunk, so the real chance is slightly higher when the timer is shorter than the round trip.
          • The text you type is a label. Each chunk is modelled as 512 bytes whatever it says.
          Sources & further reading

            Model notes are in RESEARCH.md. Related labs: Code Observatory and Factory Flow Simulator.