You are on page 1of 15

Reliable Data Transfer: Part 2

Gaurav S. Kasbekar
Dept. of Electrical Engineering
IIT Bombay

Introduction 1-1
Reference
 These are a modified version of slides by
Kurose and Ross available at:
http://ctas.poly.asu.edu/millard/CET459/lectno/K%
20-%20R%20stuff/index.html

Introduction 1-2
Reliable Data Transfer

Transport Layer 3-3


Model 3

 Bit errors
 Channel can lose packets (data or ACKs)
 No re-ordering

Transport Layer 3-4


Rdt3.0
• Sender retransmits on timeout

Transport Layer 3-5


Rdt3.0
• Receiver must ACK duplicate packet • Sender ignores duplicate ACKs

Transport Layer 3-6


Stop-and-Wait
 Rdt 3.0 is a “stop-and-wait” protocol
 Lot of time wasted when round-trip time large
 Example: 1 Gbps link, 15 ms end-to-end prop.
delay, 1000 byte packet:
 Utilization: 0.00027
 Throughput: 267 kbps

Transport Layer 3-7


Pipelined Protocols
Pipelining: sender allows multiple, “in-flight”, yet-to-
be-acknowledged pkts

Note:
• More than two sequence numbers needed
• Initially assume infinite number of sequence
numbers for simplicity Transport Layer 3-8
Pipelining: increased utilization
sender receiver
first packet bit transmitted, t = 0
last bit transmitted, t = L / R

first packet bit arrives


RTT last packet bit arrives, send ACK
last bit of 2nd packet arrives, send ACK
last bit of 3rd packet arrives, send ACK
ACK arrives, send next
packet, t = RTT + L / R

Increase in utilization
Utilization: by a factor of 3!

U 3*L/R .024
= = = 0.0008
sender 30.008
RTT + L / R microsecon 3-9
Window
 How many transmitted,
unacknowledged packets
should be allowed?
 e.g., in interval [𝑡1, 𝑡2] in fig
 In “ideal scenario”
 no congestion, unlimited
memory at receiver’s buffer
 unlimited

 Need to impose limit due to


congestion, receiver memory
limitations
 say “N” (window size)
Transport Layer 3-10
Example: N = 3

Transport Layer 3-11


Example: N = 3

 Sender blocked
until A1 received

3-12
Packet Loss
 What should the receiver
do upon receipt of packet
3?
1) Buffer and selectively
ACK packet 3
 Selective Repeat Protocol
2) Discard packet 3
 Go-Back-N
 useful when receiver has
limited storage, processing
capabilities
Transport Layer 3-13
Go-Back-N Operation
• Receiver discards out-of-
order packets
• When timeout occurs,
sender resends that packet
and all subsequent packets
in window
• hence the name “Go-Back-N”
• Receiver ACKs are
cumulative
• ACK(n): ACKs all packets up
to and including packet n
• In figure, wouldn’t matter if
ACK0 were lost provided
ACK1 reached before pkt0’s
timeout
Transport Layer 3-14
Sender’s and Receiver’s Views of
Sequence Numbers

 Sender’s Window:
 send_base = seq. no. of oldest sent, unACKed packet
 nextseqnum=smallest unused seq. no.

 Receiver keeps track of:


 expectednum=next in-order seq. no. expected by receiver

 Relation between expectednum and send_base:


 expectedseqnum ≥ send_base

 Relation between expectednum and nextseqnum:


 expectedseqnum ≤ nextseqnum 3-15

You might also like