16.36: Communication Systems Engineering Lectures 15: ARQ Protocols Eytan modiano
16.36: Communication Systems Engineering Lectures 15: ARQ Protocols Eytan Modiano
Automatic repeat request (ARQ) Break large files into packets FILE PKT PKT PKT Check received packets for errors Use a feedback channel to request retransmissions Retransmit packets containing errors acket Receive ACK
Automatic repeat request (ARQ) • Break large files into packets PKT H FI LE PKT H PKT H • Check received packets for errors • Use a feedback channel to request retransmissions • Retransmit packets containing errors packet ACK Sender Receiver
Automatic Repeat ReQuest(ARQ When the receiver detects errors in a packet, how does it let the transmitter know to re-send the corresponding packet? Systems which automatically request the retransmission of missing packets or packets with errors are called ARQ systems · Three common schemes Stop Wait Go Back n Selective Repeat
Automatic Repeat ReQuest (ARQ) • When the receiver detects errors in a packet, how does it let the transmitter know to re-send the corresponding packet? • Systems which automatically request the retransmission of missing packets or packets with errors are called ARQ systems. • Three common schemes – Stop & Wait – Go Back N – Selective Repeat
The stop and wait protocol Original ARQ protocol Sender transmits one packet at a time and waits for an ACK Receiver ACKs packets Sender retransmits packet after a timeout PKT-0 PKT-1 PKT-2 PKT-2 ACK-0 ACK-1 ACK-2 Packet numbering Sender numbers packets with sequence numbers (sN) Receiver uses request numbers(Rn) to ACK packets RN=jis the same as an ACK for packet j-1 ote Transmitter idle while waiting for ACK Efficiency limited by round trip delay time Requires no storage of packets
The stop and wait protocol • Original ARQ protocol • Sender transmits one packet at a time and waits for an ACK – Receiver A C K’s packets – Sender retransmits packet after a timeout PKT-0 X ACK-0 PKT-1 ACK-1 PKT-2 PKT-2 ACK-2 TO • Packet numbering – Sender numbers packets with sequence numbers (SN) – Receiver uses request numbers (RN) to ACK packets RN = j is the same as an ACK for packet j-1 • Note: – Transmitter idle while waiting for ACK – Efficiency limited by round trip delay time – Requires no storage of packets
Stop and Wait protocol Algorithm at sender(node a) (with initial condition SNEO 1) Accept packet from higher layer when available assign number sn to it 2) Transmit packet sn 3 Wait for an error free packet from B if received and it contains rn>sn in the request# field, set sn to rn and go to 1 li. if not received within given time(to), go to 2
Stop and Wait Protocol Algorithm at sender (node A) (with initial condition SN=0) 1) Accept packet from higher layer when available; assign number SN to it 2) Transmit packet SN 3) Wait for an error free packet from B i. if received and it contains RN>SN in the request # field, set SN to RN and go to 1 ii. if not received within given time (TO), go to 2