A sender sends packets over a channel that can lose them, corrupt them or delay them; the receiver must deliver the data once and in order. Click on any packet or ACK of the diagram to lose it and watch how each protocol recovers.
A visualization of the principles of reliable data transfer (Kurose and Ross §3.4). A sender sends packets to a receiver over an unreliable channel and the receiver must deliver the data once and in order. The space-time diagram is drawn with time in units of L/R: each packet is a band lasting L/R and each ACK a dashed arrow; on the left, the sender's timers. Three protocols: stop-and-wait (rdt3.0, alternating bit), Go-Back-N (GBN: one timer, cumulative ACKs, the receiver discards out-of-order packets) and Selective Repeat (SR: one timer per packet, individual ACKs and a receiver buffer). Clicking on a packet or an ACK makes it lost, corrupted by bit errors or delayed, and everything is simulated again. Above, the sender and receiver windows at each moment, with base, nextseqnum and the sequence numbers modulo 2^k. Scenarios from the book: the four situations of rdt3.0 (Fig. 3.16), pipelining, the loss of pkt2 in GBN (Fig. 3.22) and in SR (Fig. 3.26), a lost ACK saved by the cumulative ACK, and windows that are too large: N > 2^k − 1 in GBN and N > 2^k/2 in SR (Fig. 3.27), where the receiver delivers a duplicate as new data. It also warns when a delay reorders the channel. It includes a calculator of sender utilization, U = N·(L/R)/(RTT + L/R), with the book's example (1000 B, 1 Gbit/s, 30 ms: U = 0.00027), prediction mode (what the receiver does with each packet and what the sender retransmits on each timeout) and random exercises.
Concepts: reliable data transfer, rdt3.0, alternating-bit protocol, stop-and-wait, sequence number, ACK, timer, retransmission, pipelining, Go-Back-N (GBN), Selective Repeat (SR), sliding window, cumulative ACK, sender utilization.
Formulas:
U_sender = N·(L/R) / (RTT + L/R), at most 1 (stop-and-wait, N = 1)GBN is correct if N ≤ 2^k − 1; SR is correct if N ≤ 2^k / 2Network Architecture I, Session 3.2 · Enrique de la Hoz, University of Alcalá · License CC BY-SA 4.0 · Source and catalogue on GitHub · DOI 10.5281/zenodo.23285664