Building Reliable Transfer: rdt 1.0, 2.0, 2.1, and 2.2
Reliable Data Transfer (RDT)
The protocol below a reliable data transfer protocol may be unreliable. The channel's unreliability determines the complexity of the reliable protocol. TCP, for example, implements reliable transfer over an unreliable end-to-end network layer.
rdt 1.0: Reliable Transfer over a Perfectly Reliable Channel
Consider the simplest case: the underlying channel is perfectly reliable, with no corruption or loss. A finite state machine (FSM) can describe the sender's and receiver's operations.
rdt 1.0: transfer over a perfectly reliable channel
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
rdt 2.0: Reliable Transfer over a Channel with Bit Errors
Bits can be damaged during transmission, propagation, or buffering. As in a telephone conversation, a listener says “OK” after understanding a sentence, but asks for repetition when it was unclear.
rdt 2.0 adds error detection, receiver feedback, and retransmission. A receiver that gets a correct message sends a positive acknowledgment (ACK), saying “no problem.” If it detects an error, it sends a negative acknowledgment (NAK), saying “what you sent was wrong; send a new copy.”
rdt 2.0: error detection, ACK/NAK, and retransmission
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
After sending a packet, the sender waits for ACK or NAK. ACK means the receiver correctly received the packet, so the sender returns to its initial state to wait for more application data. NAK means the receiver did not get a correct packet, so the sender retransmits and continues waiting for ACK or NAK. A protocol that permits new data only after receiving ACK is called stop-and-wait.
rdt 2.0 appears workable, but has a fatal flaw: ACK and NAK can also be corrupted!
If the sender simply retransmits after receiving corrupted feedback, the receiver may receive a duplicate packet.
KNOWLEDGE QUIZ
rdt 2.1: A Protocol with Sequence Numbers
The sender can add sequence numbers so the receiver can identify duplicate packets. For stop-and-wait, only sequence numbers 0 and 1 are needed.
rdt 2.1: sequence numbers reveal duplicates
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
rdt 2.2: An ACK-Only Protocol
rdt 2.2 has the same functionality as rdt 2.1 but uses only ACK. The receiver acknowledges the last correctly received packet. When the sender gets a duplicate ACK, it performs the same action as for NAK: retransmit the packet.
rdt 2.2: an ACK-only protocol
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
Trace corrupted feedback without duplicate delivery
In rdt 2.2, both sides start at sequence 0. A arrives correctly, its ACK is corrupted, A is retransmitted, then its ACK arrives correctly. Next B arrives correctly. List sender/receiver states, feedback, and application deliveries after each event. Compare rdt 2.0.