Lectures3_4 - ARQ

Lectures3_4 - ARQ - Lectures 3 & 4 6.263/16.37 The Data...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Lectures 3 & 4 6.263/16.37 The Data Link Layer: ARQ Protocols Eytan Modiano MIT, LIDS Eytan Modiano 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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 –G o Back N – Selective Repeat Eytan Modiano 2
Background image of page 2
Pure Stop and Wait Protocol Transmitter departure times at A Time ACK -----> NAK packet 0 CRC packet 1 CRC packet 1 CRC arrival times at receiver Packet 0 Accepted Problem: Lost Packets – Sender will wait forever for an acknowledgement Packet may be lost due to framing errors Solution: Use time-out (TO) – Sender retransmits the packet after a timeout Packet 1 Accepted Eytan Modiano 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The Use Of Timeouts For Lost Packets Requires Sequence Numbers <---- timeout -----> packet 0 CRC packet 0 CRC packet 0 or 1? packet 0 accepted Problem: Unless packets are numbered the receiver cannot tell which packet it received Solution: Use packet numbers (sequence numbers) Eytan Modiano 4
Background image of page 4
Request Numbers Are Required On ACKs To Distinguish Packet ACKed ACK ACK 0 ut 0 ? timeo packet 0 packet 0 packet 1 1 Packet 0 accepted REQUEST NUMBERS: Instead of sending "ack" or "nak", the receiver sends the number of the packet currently awaited. – Sequence numbers and request numbers can be sent modulo 2. This works correctly assuming that 1) Frames travel in order (FCFS) on links 2) The CRC never fails to detect errors 3) The system is correctly initialized. Eytan Modiano 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
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 in frame with sequence # SN 3) Wait for an error free frame 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, go to 2 Eytan Modiano 6
Background image of page 6
Stop and Wait Algorithm at receiver (node B) (with initial condition RN=0) 1) Whenever an error-free frame is received from A with a sequence # equal to RN, release received packet to higher layer and increment RN. 2) At arbitrary times, but within bounded delay after receiving any error free frame from A, transmit a frame to A containing RN in the request # field. Eytan Modiano 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Correctness of stop & wait with integer SN, RN Assume, for A to (from) B transmission, that – All errors are detected as errors – Initially no frames are on link, SN=0, RN=0 – Frames may be arbitrarily delayed or lost Each frame is correctly received with at least some probability q>0. Split proof of correctness into two parts: SAFETY: show that no packet is ever released out of order or more than once – LIVENESS: show that every packet is eventually released Eytan Modiano 8
Background image of page 8
Safety No frames on link initially, packet 0 is first packet accepted at A, it is the
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.