Transmission Error control ARQ Giuseppe Bianchi Two scenarios
Transmission & Error control ARQ Giuseppe Bianchi
Two scenarios network End to End (transport protocol issu Hop by Hop (datalink protocol issue Giuseppe Bianchi
Coping with rx errors èForward Error Correction ðExtra overhead capable of CORRECTING errors Large overhead depending on protection capability èRetransmission ðExtra overhead capable of DETECTING errors Small constant overhead (2 -4 bytes) Called: » Frame Check Sequence Giuseppe Bianchi » Cyclic Redundance Check
Retransmission scenarios referred to as ARQ schemes (Automatic Retransmission re. Quest) COMPONENTS: a) error checking at receiver; b) feedback to se SRC DATA ACK SRC DST Error Check: OK SRCDATA Retx Timeout (RTO) NACK Automatic retransmit Basic ACK idea DATA DST Error Check: corrupted DATA Basic NACK idea DST SRCDATA DST SRC DATA ACK DATA Basic ACK/Timeout idea Giuseppe Bianchi DATA DST Error Check: corrupted
Sequence numbers – a must Sender side: Receiver side: DATA RTO rtx ACK DATALINK or NETWORK (ACK lost) DATA New data? Old data? Need to univocally “label” all packets circulating in the network between two end points. 1 bit (0 -1) enough for Stop-and-wait Giuseppe Bianchi
Link-level model C bits/sec In e 2 e scenario, C approximated by bottleneck link rate Stop & Wait one frame/packet at a time Pipelining (continuous ARQ) more than one frame/packet Giuseppe Bianchi
Stop & Wait Giuseppe Bianchi
sender receiver stop-and-wait One way delay MSG/C RTT e ACK/C For simplicity all MSG of same size; extension to != size use mean value e time Giuseppe Bianchi REMARK: throughput always lower Available link rate!
Upper bound èNo processing ðe = 0 èACK size negligible ðACK = 0 Giuseppe Bianchi
stop-and-wait: upper bound /1 MSG = 1500 bytes Under-utilization with: 1) high capacity links, 2) large RTT lin Giuseppe Bianchi
stop-and-wait: upper bound /2 MSG = 1500 bytes Under-utilization with: 1) high capacity links, 2) large RTT lin Giuseppe Bianchi
Example Giuseppe Bianchi
Dealing with errors sender receiver IMPORTANT ISSUE: setting the Time Out Too short unnecessary rtx Too short inconsistent protocol operatio e Too long waste of time TO Ideally: TO = RTT+ACK/C e (+2 e) Easy to say, but harder to do if RTT is not known (e. g. in e 2 e scenario) Giuseppe Bianchi
Inconsistent protocol operation sender receiver M=1 M=2 will be NEVER received! M=1 Consequence: ACK MUST be also numbe To always guarantee consistent operation TO M=2 M=3 Giuseppe Bianchi
Performance with loss (upper bound) è No processing time, negligible ACK è Per packet loss probability P ð Assumed indipendent P(immediate success) = (1 -P) P(success at second tx) = P(1 -P) P(success at third tx) = P 2(1 -P) Giuseppe Bianchi
Pipelining (Continuous ARQ) Giuseppe Bianchi
Pipelining idea èUp to W>1 frames can be “in fly” ðIn fly = frames transmitted but not yet ACKed èSliding Window ðSize W ðWindow “slides” forward at each received ACK Giuseppe Bianchi
RTT (+1 tx) Pipelining cases W=4 ? W=10 time WINDOW SIZING that allows UNDER-SIZED CONTINUOUS TRANSMISSION INDOW: THROUGHPUT INEFFICIENCY Giuseppe Bianchi
Continuous transmission /1 Condition in which link rate is fully utilized Time to transmit Time to receive W frames Ack of first frame Giuseppe Bianchi
Example MSG=500 bytes W=4 C= 2 Mbps Propagation = 16 ms 2 ms 16 ms 4 ms Question 1: assuming no errors, compute time needed to transmit K=6 messages. 16 ms Question 2: which min message size for continuous tx? Giuseppe Bianchi
Continuous transmission /2 We may elaborate: Condition in which link rate is fully utilized W x MSG = Bandwidth-delay W expressed in “bit” product Conclusion: full link utilization is possible when window size greater than the bandwidth (C bit/s) delay (RTT s) product! Giuseppe Bianchi
Bandwidth-delay product D C èNetwork: like a pipe èC [bit/s] x D [s] 64 Kbps ðnumber of bits “flying” in the network ðnumber of bits injected in A 15360 (64000 x 0. 240) bits the network by the tx, “worm” in the air!! before that the first bit is rxed bandwidth-delay product = no of bytes that saturate network pipe Giuseppe Bianchi
Long Fat Networks LFNs (el-ef-an(t)s): large bandwidth-delay product NETWORK RTT (ms) rate (kbps) Ethernet 3 10. 000 T 1, trans. US 60 1. 544 T 1 satellite 480 1. 544 T 3 trans. US 60 45. 000 Gigabit trans. US 60 1. 000 Giuseppe Bianchi Bx. D (bytes) 3. 750 11. 580 92. 640 337. 500. 000
Throughput with pipelining MSS = 1500 bytes Giuseppe Bianchi
Maximum achievable throughput (assuming infinite speed link…) Wbytes = 65535 Giuseppe Bianchi
ARQ protocols details Giuseppe Bianchi
Go Back N protocol èSequence number: ðb bits ðN=2 b values ðRepeated modulo N èSender window ðWs=N-1 number of possible sequence numbers minus 1 èReceiver rules ðRX: accept frames only if received in strict sequence!! ðIf out of order frame, reply with NACK(i) = I have received ALL frames up to (i-1) mod N, but I haven’t received i-th frame Giuseppe Bianchi
GBN example 4 5 6 7 0 1 2 3 4 5 6 7 4 4 5 6 7 0 1 2 3 4 5 6 7 5 4 5 6 7 0 1 2 3 4 5 6 7 6 4 4 5 6 7 0 1 2 3 4 5 6 7 7 5 4 5 6 7 0 1 2 3 4 5 6 7 0 6 4 5 6 7 0 1 2 3 4 5 6 7 1 4 5 6 7 0 1 2 3 4 5 6 7 2 4 5 6 7 0 1 2 3 4 5 6 7 7 4 5 6 7 0 1 2 3 4 5 6 7 1 4 5 6 7 0 1 2 3 4 5 6 7 Giuseppe Bianchi NACK 7 7
Piggybacking Frame 1 èACK = overhead Frame 2 on return channel èIdea: embed ACK inside a frame transmitted on the opposite direction ACK 2 Important: cumulative ACK! ACK 2 = ACK frame 2 + frame 1 + all previ Giuseppe Bianchi
Why Ws = N-1? W=N=4 Frame X-1 = ACK 1 Frame 2 Frame 3 Frame 0 Frame 1 Frame X = ACK 1 W=N=4 Frame X-1 = ACK 1 Frame X = ACK 1 All successful OR all lost? ? ? ? Giuseppe Bianchi
N=4; Ws=3; Wr=2 Rx window 2 2 3 0 1 2 3 Selective Repeat èKey RX difference: ðReceived frames buffered also if out of order ðNew parameter: Receiver Window Wr ðNew window sizing rule: GBN: Ws < N SR: Ws + Wr ≤ N GBN = special case Wr=1 Giuseppe Bianchi 3 2 3 0 1 2 3 0 1 2 3 ACK 0 TO 2 re. TX NEW!!
Choice of windows èN=8 ðWr > 4 not useful not enough “in-fly” frames since Ws<4 ðWs > 4 out of order may harm not enough RX window size to capture all possible out of order cases ðMost appropriate choice: Wr=Ws=4 but remember throughput limits, though! Giuseppe Bianchi
SR example and TX operation 4 5 6 7 0 1 2 3 4 5 6 7 4 4 5 6 7 0 1 2 3 4 5 6 7 5 4 5 6 7 0 1 2 3 4 5 6 7 6 4 4 5 6 7 0 1 2 3 4 5 6 7 7 5 4 5 6 7 0 1 2 3 4 5 6 7 0 6 4 5 6 7 0 1 2 3 4 5 6 7 1 4 5 6 7 0 1 2 3 4 5 6 7 2 4 5 6 7 0 1 2 3 4 5 6 7 7 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 Giuseppe Bianchi 5 6 NACK 7 ACK 3 7, 0, 1, 2, 3
- Slides: 33