SlideShare a Scribd company logo
1 of 55
Part 3
Reliable data transfer over an unreliable network
Agenda
• Reliable data transfer over a reliable network
• How unreliable is the Internet ?
• Reliable data transfer techniques
• The Alternating Bit Protocol
• Go-Back-N
• Selective repeat
How to reliably transfer data ?
• Hypothesis
• Internet is fully reliable
A B
Data.request(a) segment(a)
Data.ind(a)
Data.request(b) segment(b)
Data.ind(b)
Data.request(c) segment(c)
Data.ind(c)
Does this always work ?
Question
• What do we need to add to our “reliable” transfer to allow a
datacenter to send data to an Internet of Things device without
overflow ?
Finite State Machine
• Sender
• Receiver
Control and data segments
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
Data.ind(b)
C(OK)
Payload
Header Trailer
Round trip time (rtt)
Question
• Two hosts are connected with a 1 Gbps (10^9 bits/sec) network. It
takes one msec to deliver a 1000 bits segment from host A to host B.
What is the bandwidth that this protocol will achieve (in bits per
second) ?
Agenda
• Reliable data transfer over a reliable network
• How unreliable is the Internet ?
• Reliable data transfer techniques
• The Alternating Bit Protocol
• Go-Back-N
• Selective repeat
The network is imperfect
• What can happen to a packet sent over the Internet ?
• Packet reaches destination
• Packet can suffer transmission errors
• Packet contents can be corrupted
• Links have typically Bit Error Rates of 10-8 to 10-11
• Wireless suffers from more errors than cable and fiber
• Packet can be dropped before reaching destination
• Packet can be delayed
Measuring Internet performance
Internet packet losses
What can explain
these packet
loss ratios ?
Based on data extracted by François Michel from measurementlab’s big query
Measuring Internet performance (2)
Internet performance in Wallonia
Broadband access at 30 Mbps or better
Initiative Amélie
Améliorer Internet partout
• Objectif
• L’initiative Amélie vise à mettre sur pied une équipe d’étudiant.e.s bénévoles
afin de proposer un service de diagnostic Internet d’habitations privées.
L’objectif est d’aider les habitants à améliorer la qualité de leur connexion
Internet sans nécessairement changer d’offre ou de fournisseur
• Mise en oeuvre
• Formation à l’analyse des performances en utilisant des outils adaptés et au
diagnostic des facteurs qui réduisent les performances
• Coaching par des chercheurs qui améliorent Internet et des étudiant.e.s de
Master
Agenda
• Reliable data transfer over a reliable network
• How unreliable is the Internet ?
• Reliable data transfer techniques
• The Alternating Bit Protocol
• Go-Back-N
• Selective repeat
How to deal with transmission errors ?
• The receiver must be able to detect that the content of a segment
has been modified
• Checksum, CRC
Question
• How should a host react when it receives a data segment with an
incorrect checksum ?
Coping with errors
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
D(b)
Data.ind(b)
start timer
timer expires
What do you think of this protocol ?
Coping with errors
A B
Data.req(b) C(OK) Data.ind(a)
D(a)
Data.req(a)
D(b)
D(b)
Data.ind(b)
start timer
timer expires
C(OK) Data.ind(b)
Is this a problem for you ?
A better approach
• Key ideas
• Identify each data segment with a sequence number
• allows to prevent duplication
• one bit is sufficient
• Indicate the sequence number of the last data segment
in the acknowledgement
Alternating Bit Protocol : basics
A B
Data.req(b) C(OK0) Data.ind(a)
D(0,a)
Data.req(a)
D(1,b)
Data.ind(b)
C(OK1)
Data.ind(c)
D(0,c)
Data.req(c)
C(OK0)
Alternating Bit Protocol : reaction to losses
A B
Data.req(b) C(OK0) Data.ind(a)
D(0,a)
Data.req(a)
D(1,b)
Data.ind(b)
Data.req(c)
Lost
D(0,c)
C(OK1)
D(1,b) recvd
Retransmission timer
Data.ind(c)
D(0,c)
C(OK0)
Alternating Bit Protocol : early timer
A B
Data.req(b) C(OK0) Data.ind(a)
D(0,a)
Data.req(a)
Duplicate detected
Which ack to send ?
D(1,b)
Retransmission timer
D(1,b)
Data.ind(b)
Data.req(c)
C(OK1)
D(1,b) recvd
C(OK1)
D(1,b) recvd
Data.ind(c)
D(0,c)
Question
• Do we need to place a checksum/CRC inside the control segments ?
Alternating Bit Protocol : unprotected control
segments
A B
Data.req(b) C(OK0) Data.ind(a)
D(0,a)
Data.req(a)
Duplicate detected
D(1,b)
Retransmission timer
D(1,b)
Data.ind(b)
Data.req(c)
Lost
D(0,c)
C(OK1)
D(1,b) recvd
C(OK0)
D(0,c) recvd
Data.req(d)
D(1,d)
C(OK1)
Undetected
transmission error
Duplicate detected
Alternating bit : sender
Alternating Bit : Receiver
Alternating Bit Protocol
• Advantages
• Simple to implement
• Reliable data transfer
• Drawback
• Performance
• only one segment per round-trip-time
Agenda
• Reliable data transfer over a reliable network
• How unreliable is the Internet ?
• Reliable data transfer techniques
• The Alternating Bit Protocol
• Go-Back-N
• Selective repeat
Pipelining
• Key ideas
• Allow the sender to send several segments without having an explicit ack
• Sender stores unacked segments in a buffer called the sending window to be
able to retransmit them
Pipelining
• How many segments can A send ?
A B
Data.ind(a)
Data.req(a)
...
D(0,a)
...
D(4,e)
Data.req(b)
Data.req(e)
Data.ind(e)
The sending window
• Buffer managed by a sender
• Stores segments sent but not yet acknowledged
• Content of sending window can be retransmitted if needed
• Sending window size limits the number of segments that a host can
sent without acknowledgements
Pipelining example
A B
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 Data.req(a)
Data.ind(a)
D(0,a)
0 1 2 3 4 5 6 7 8 Data.req(b)
Data.ind(b)
D(1,b)
0 1 2 3 4 5 6 7 8
Data.req(c)
Data.ind(c)
D(2,c)
C(OK0)
C(OK1)
C(OK2)
0 1 2 3 4 5 6 7 8
Data.req(d)
Data.ind(d)
D(3,d)
0 1 2 3 4 5 6 7 8
Data.req(e)
D(4,e)
Sending window
• Sending window must be larger than
bandwidth x round-trip-time to fully use network
Sequence numbers are finite and reused
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.req(a)
Data.ind(a)
D(0,a)
Data.req(b)
Data.ind(b)
D(1,b)
Data.req(c)
Data.ind(c)
D(2,c)
C(OK0)
C(OK1)
C(OK2)
Data.req(d)
Data.ind(d)
D(3,d)
Data.req(e)
D(0,e)
Sending window
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
How to deal with losses ?
• Go-back-n
• Sender stores transmitted segments in sending
window to be able to retransmit them if needed
• Simple receiver, accepts only in-sequence segments. If
a segment is errored, sender retransmits all unacked
segments
• Selective repeat
• Sender stores transmitted segments in sending
window to be able to retransmit them if needed
• Advanced receiver, stores out-of-sequence segments.
If a segment is errored, sender only retransmits the
errored segments
Go-back-n
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.req(e)
Data.req(a)
Data.ind(a)
D(0,a)
Data.req(c)
D(2,c)
C(OK,0)
C(OK,0)
Sending window
Data.req(b)
D(1,b)
Lost
Not expected seq num,
discarded
Retransmission
timer expires
Sending window is full
0 1 2 3
0 1 2 3
D(1,b)
Data.ind(b)
Data.req(d)
D(3,d)
Data.ind(d)
D(2,c)
Data.ind(c)
Go-back-n : receiver
Go-back-n : sender
Go-back-n : example
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.req(e)
Data.req(a)
Data.ind(a)
D(0,a)
Data.req(c)
D(2,c)
C(OK,0)
C(OK,0)
Sending window
Data.req(b)
D(1,b)
Lost
Not expected seq num,
discarded
Retransmission
timer expires
Sending window is full
0 1 2 3
0 1 2 3
D(1,b)
Data.ind(b)
Data.req(d)
D(3,d)
Data.ind(d)
D(2,c)
Data.ind(c)
Question
• You implement a go-back-n receiver using 3 bits
to encode the sequence number. You have
correctly received segment 7 and delivered its
content. You now receive a correct segment 0,
how do you react ?
• you ignore the segment and send ACK(7)
• you accept the segment, deliver it and send ACK(7)
• you accept the segment, deliver it and send ACK(0)
Question
• Go-back-n is used in a network where all data segments are
correctly received, but every second acknowledgement is
corrupted. How many data segments will be retransmitted
by the sender if it needs to reliably send 20 data segments ?
Question
• Go-back-n is used by a protocol that encodes sequence numbers
using 5 bits. What is the largest possible sending window (in
segments) ?
Question
• Go-back-n is used in a satellite network with a round-trip-time of 1
sec. What is the minimum sending window (in segments) to fully
use a 1 Mbps link using 10.000 bits segments ?
Agenda
• Reliable data transfer over a reliable network
• How unreliable is the Internet ?
• Reliable data transfer techniques
• The Alternating Bit Protocol
• Go-Back-N
• Selective repeat
The receive window
• Buffer managed by receiver
• Stores segments received out-of-order
• Segments remain in receive window until gaps are filled
• Receive window size limits the number of segments that the sender
can send without acknowledgements
• Sending window cannot be larger than the other side receive’s window
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Forbidden seq. num.
Window
Already delivered
Not yet received Received
Selective repeat
A B
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.ind(b)
Data.req(a)
Data.ind(a)
D(0,a)
0 1 2 3
Data.req(c)
D(2,c)
C(OK,0)
C(OK,0)
Sending window
Data.req(b)
D(1,b)
Lost
Segment stored
D(1,b)
Retransmission
timer expires
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
0 1 2 3
Data.ind(c)
Data.req(d)
D(3,d)
Data.ind(d)
0 1 2 3
0 1 2 3
C(OK,2)
C(OK,3)
Rec. window
0 1 2 3
0 1 2 3
Buffer management
• A reliable transport serves a variable number of applications with a
limited buffer
• The buffer/window allocated to a given connection may need to change
dynamically as connections start and stop
Buffer management
A B
Data.req(a)
Data.ind(a)
D(0,a)
C(OK,0, w=1)
C(OK,0,w=3)
Data.req(c)
D(2,c)
2 new buffers become
available
Data.req(b)
Data.ind(b)
D(1,b)
0 1 2 3
0 1 2 3
0 1 2 3
C(OK,1,w=3)
Rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
Swin=3, rwin=3
0 1 2 3
Data.req(d)
D(3,d) 0 1 2 3
Buffer management
A B
Data.req(b)
Data.ind(a)
Data.req(a)
D(0,a)
C(OK,0, w=0)
2 new buffers are
available
0 1 2 3
Rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Swin=3, rwin=1
0 1 2 3
Receiver cannot handle
segment immediately
C(OK,0,w=3)
Lost segment
0 1 2 3
Swin=3, rwin=0
Window blocked
No transmission possible
Waits for control segment Waits for data segment
How to recover from this deadlock ?
Persistence timer on receiver,
resend control segment after
timer expiration
Bidirectional transfer
• How to efficiently carry data in both directions ?
Piggybacking
A B
Data.req(a)
Data.ind(a)
D(0,0,a)
Data.req(b)
D(1,0,b)
Error
Discarded
Data.req(c)
D(2,0,c)
Segment -> buffer
Retransmission
Data.ind(b)
D(1,5,b)
Data.ind(c)
Data.req(d)
D(3,6,d)
Data.ind(d)
C(OK,2)
C(OK,3)
Data.req(x)
D(5,0,w)
Data.req(w)
Data.ind(w)
D(6,0,x)
Data.ind(x)
D(5,0,w) acks D(0,0,a)
Bytestream
• How to provide a bytestream service ?
Byte stream service (2)
A B
Data.req(ijkl)
Data.req(mnop)
Data.req(abcdef)
Data.ind(ab)
D(0,ab)
C(OK,1)
C(OK,1)
D(2,cd)
Lost segment
D(4,ef)
Placed in buffer
Data.ind(cdef)
D(2,cd)
Expiration timer
Retransmission
D(6,ijklmnop)
Data.ind(ijklmnop)
C(OK,5)
C(OK,13)
Take back lessons
• Usage of Checksums/CRCs
• Finite State Machines
• Cumulative acknowledgements
• Bandwidth x delay product

More Related Content

Similar to Part3-reliable.pptx

Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layerroma bora
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by romaboraroma
 
COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3MrMRajaCSESTAFF
 
CS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptAnandaSaikia1
 
Features of tcp (part 2) .68
Features of tcp  (part 2) .68Features of tcp  (part 2) .68
Features of tcp (part 2) .68myrajendra
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocolsNitesh Singh
 
Osi model
Osi model Osi model
Osi model maha tce
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit ivJAIGANESH SEKAR
 
Ch3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptCh3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptBlackHat41
 
Ch3.ppt
Ch3.pptCh3.ppt
Ch3.pptThirft
 
ppt presentasi kelompok data link layer
ppt presentasi kelompok  data link layerppt presentasi kelompok  data link layer
ppt presentasi kelompok data link layerrosedinda4
 
transport.pptx
transport.pptxtransport.pptx
transport.pptxjatinder42
 

Similar to Part3-reliable.pptx (20)

Part 1 : reliable transmission
Part 1 : reliable transmissionPart 1 : reliable transmission
Part 1 : reliable transmission
 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Tcp(no ip) review part1
Tcp(no ip) review part1Tcp(no ip) review part1
Tcp(no ip) review part1
 
COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3
 
R2 itesm-02
R2 itesm-02R2 itesm-02
R2 itesm-02
 
CS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.ppt
 
Features of tcp (part 2) .68
Features of tcp  (part 2) .68Features of tcp  (part 2) .68
Features of tcp (part 2) .68
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Osi model
Osi model Osi model
Osi model
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
DLL PPT.ppt
DLL PPT.pptDLL PPT.ppt
DLL PPT.ppt
 
Ch3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptCh3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.ppt
 
datalink.ppt
datalink.pptdatalink.ppt
datalink.ppt
 
Ch3.ppt
Ch3.pptCh3.ppt
Ch3.ppt
 
ppt presentasi kelompok data link layer
ppt presentasi kelompok  data link layerppt presentasi kelompok  data link layer
ppt presentasi kelompok data link layer
 
transport.pptx
transport.pptxtransport.pptx
transport.pptx
 
Ntdd
NtddNtdd
Ntdd
 

More from Olivier Bonaventure

A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchOlivier Bonaventure
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPOlivier Bonaventure
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPOlivier Bonaventure
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Olivier Bonaventure
 
Part 8 : TCP and Congestion control
Part 8 : TCP and Congestion controlPart 8 : TCP and Congestion control
Part 8 : TCP and Congestion controlOlivier Bonaventure
 

More from Olivier Bonaventure (20)

Part10-router.pptx
Part10-router.pptxPart10-router.pptx
Part10-router.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part11-lan.pptx
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptx
 
Part5-tcp-improvements.pptx
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptx
 
Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
Part6-network-routing.pptx
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 
Part 8 : TCP and Congestion control
Part 8 : TCP and Congestion controlPart 8 : TCP and Congestion control
Part 8 : TCP and Congestion control
 
Part 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCP
 

Recently uploaded

20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiMonica Sydney
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsMonica Sydney
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 

Recently uploaded (20)

20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 

Part3-reliable.pptx

  • 1. Part 3 Reliable data transfer over an unreliable network
  • 2. Agenda • Reliable data transfer over a reliable network • How unreliable is the Internet ? • Reliable data transfer techniques • The Alternating Bit Protocol • Go-Back-N • Selective repeat
  • 3. How to reliably transfer data ? • Hypothesis • Internet is fully reliable A B Data.request(a) segment(a) Data.ind(a) Data.request(b) segment(b) Data.ind(b) Data.request(c) segment(c) Data.ind(c)
  • 5. Question • What do we need to add to our “reliable” transfer to allow a datacenter to send data to an Internet of Things device without overflow ?
  • 6. Finite State Machine • Sender • Receiver
  • 7. Control and data segments A B Data.req(b) C(OK) Data.ind(a) D(a) Data.req(a) D(b) Data.ind(b) C(OK) Payload Header Trailer Round trip time (rtt)
  • 8. Question • Two hosts are connected with a 1 Gbps (10^9 bits/sec) network. It takes one msec to deliver a 1000 bits segment from host A to host B. What is the bandwidth that this protocol will achieve (in bits per second) ?
  • 9. Agenda • Reliable data transfer over a reliable network • How unreliable is the Internet ? • Reliable data transfer techniques • The Alternating Bit Protocol • Go-Back-N • Selective repeat
  • 10. The network is imperfect • What can happen to a packet sent over the Internet ? • Packet reaches destination • Packet can suffer transmission errors • Packet contents can be corrupted • Links have typically Bit Error Rates of 10-8 to 10-11 • Wireless suffers from more errors than cable and fiber • Packet can be dropped before reaching destination • Packet can be delayed
  • 12. Internet packet losses What can explain these packet loss ratios ? Based on data extracted by François Michel from measurementlab’s big query
  • 14. Internet performance in Wallonia Broadband access at 30 Mbps or better
  • 15. Initiative Amélie Améliorer Internet partout • Objectif • L’initiative Amélie vise à mettre sur pied une équipe d’étudiant.e.s bénévoles afin de proposer un service de diagnostic Internet d’habitations privées. L’objectif est d’aider les habitants à améliorer la qualité de leur connexion Internet sans nécessairement changer d’offre ou de fournisseur • Mise en oeuvre • Formation à l’analyse des performances en utilisant des outils adaptés et au diagnostic des facteurs qui réduisent les performances • Coaching par des chercheurs qui améliorent Internet et des étudiant.e.s de Master
  • 16. Agenda • Reliable data transfer over a reliable network • How unreliable is the Internet ? • Reliable data transfer techniques • The Alternating Bit Protocol • Go-Back-N • Selective repeat
  • 17. How to deal with transmission errors ? • The receiver must be able to detect that the content of a segment has been modified • Checksum, CRC
  • 18. Question • How should a host react when it receives a data segment with an incorrect checksum ?
  • 19. Coping with errors A B Data.req(b) C(OK) Data.ind(a) D(a) Data.req(a) D(b) D(b) Data.ind(b) start timer timer expires What do you think of this protocol ?
  • 20. Coping with errors A B Data.req(b) C(OK) Data.ind(a) D(a) Data.req(a) D(b) D(b) Data.ind(b) start timer timer expires C(OK) Data.ind(b) Is this a problem for you ?
  • 21. A better approach • Key ideas • Identify each data segment with a sequence number • allows to prevent duplication • one bit is sufficient • Indicate the sequence number of the last data segment in the acknowledgement
  • 22. Alternating Bit Protocol : basics A B Data.req(b) C(OK0) Data.ind(a) D(0,a) Data.req(a) D(1,b) Data.ind(b) C(OK1) Data.ind(c) D(0,c) Data.req(c) C(OK0)
  • 23. Alternating Bit Protocol : reaction to losses A B Data.req(b) C(OK0) Data.ind(a) D(0,a) Data.req(a) D(1,b) Data.ind(b) Data.req(c) Lost D(0,c) C(OK1) D(1,b) recvd Retransmission timer Data.ind(c) D(0,c) C(OK0)
  • 24. Alternating Bit Protocol : early timer A B Data.req(b) C(OK0) Data.ind(a) D(0,a) Data.req(a) Duplicate detected Which ack to send ? D(1,b) Retransmission timer D(1,b) Data.ind(b) Data.req(c) C(OK1) D(1,b) recvd C(OK1) D(1,b) recvd Data.ind(c) D(0,c)
  • 25. Question • Do we need to place a checksum/CRC inside the control segments ?
  • 26. Alternating Bit Protocol : unprotected control segments A B Data.req(b) C(OK0) Data.ind(a) D(0,a) Data.req(a) Duplicate detected D(1,b) Retransmission timer D(1,b) Data.ind(b) Data.req(c) Lost D(0,c) C(OK1) D(1,b) recvd C(OK0) D(0,c) recvd Data.req(d) D(1,d) C(OK1) Undetected transmission error Duplicate detected
  • 28. Alternating Bit : Receiver
  • 29. Alternating Bit Protocol • Advantages • Simple to implement • Reliable data transfer • Drawback • Performance • only one segment per round-trip-time
  • 30. Agenda • Reliable data transfer over a reliable network • How unreliable is the Internet ? • Reliable data transfer techniques • The Alternating Bit Protocol • Go-Back-N • Selective repeat
  • 31. Pipelining • Key ideas • Allow the sender to send several segments without having an explicit ack • Sender stores unacked segments in a buffer called the sending window to be able to retransmit them
  • 32. Pipelining • How many segments can A send ? A B Data.ind(a) Data.req(a) ... D(0,a) ... D(4,e) Data.req(b) Data.req(e) Data.ind(e)
  • 33. The sending window • Buffer managed by a sender • Stores segments sent but not yet acknowledged • Content of sending window can be retransmitted if needed • Sending window size limits the number of segments that a host can sent without acknowledgements
  • 34. Pipelining example A B 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 Data.req(a) Data.ind(a) D(0,a) 0 1 2 3 4 5 6 7 8 Data.req(b) Data.ind(b) D(1,b) 0 1 2 3 4 5 6 7 8 Data.req(c) Data.ind(c) D(2,c) C(OK0) C(OK1) C(OK2) 0 1 2 3 4 5 6 7 8 Data.req(d) Data.ind(d) D(3,d) 0 1 2 3 4 5 6 7 8 Data.req(e) D(4,e) Sending window • Sending window must be larger than bandwidth x round-trip-time to fully use network
  • 35. Sequence numbers are finite and reused A B 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Data.req(a) Data.ind(a) D(0,a) Data.req(b) Data.ind(b) D(1,b) Data.req(c) Data.ind(c) D(2,c) C(OK0) C(OK1) C(OK2) Data.req(d) Data.ind(d) D(3,d) Data.req(e) D(0,e) Sending window 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3
  • 36. How to deal with losses ? • Go-back-n • Sender stores transmitted segments in sending window to be able to retransmit them if needed • Simple receiver, accepts only in-sequence segments. If a segment is errored, sender retransmits all unacked segments • Selective repeat • Sender stores transmitted segments in sending window to be able to retransmit them if needed • Advanced receiver, stores out-of-sequence segments. If a segment is errored, sender only retransmits the errored segments
  • 37. Go-back-n A B 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Data.req(e) Data.req(a) Data.ind(a) D(0,a) Data.req(c) D(2,c) C(OK,0) C(OK,0) Sending window Data.req(b) D(1,b) Lost Not expected seq num, discarded Retransmission timer expires Sending window is full 0 1 2 3 0 1 2 3 D(1,b) Data.ind(b) Data.req(d) D(3,d) Data.ind(d) D(2,c) Data.ind(c)
  • 40. Go-back-n : example A B 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Data.req(e) Data.req(a) Data.ind(a) D(0,a) Data.req(c) D(2,c) C(OK,0) C(OK,0) Sending window Data.req(b) D(1,b) Lost Not expected seq num, discarded Retransmission timer expires Sending window is full 0 1 2 3 0 1 2 3 D(1,b) Data.ind(b) Data.req(d) D(3,d) Data.ind(d) D(2,c) Data.ind(c)
  • 41. Question • You implement a go-back-n receiver using 3 bits to encode the sequence number. You have correctly received segment 7 and delivered its content. You now receive a correct segment 0, how do you react ? • you ignore the segment and send ACK(7) • you accept the segment, deliver it and send ACK(7) • you accept the segment, deliver it and send ACK(0)
  • 42. Question • Go-back-n is used in a network where all data segments are correctly received, but every second acknowledgement is corrupted. How many data segments will be retransmitted by the sender if it needs to reliably send 20 data segments ?
  • 43. Question • Go-back-n is used by a protocol that encodes sequence numbers using 5 bits. What is the largest possible sending window (in segments) ?
  • 44. Question • Go-back-n is used in a satellite network with a round-trip-time of 1 sec. What is the minimum sending window (in segments) to fully use a 1 Mbps link using 10.000 bits segments ?
  • 45. Agenda • Reliable data transfer over a reliable network • How unreliable is the Internet ? • Reliable data transfer techniques • The Alternating Bit Protocol • Go-Back-N • Selective repeat
  • 46. The receive window • Buffer managed by receiver • Stores segments received out-of-order • Segments remain in receive window until gaps are filled • Receive window size limits the number of segments that the sender can send without acknowledgements • Sending window cannot be larger than the other side receive’s window 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Forbidden seq. num. Window Already delivered Not yet received Received
  • 47. Selective repeat A B 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Data.ind(b) Data.req(a) Data.ind(a) D(0,a) 0 1 2 3 Data.req(c) D(2,c) C(OK,0) C(OK,0) Sending window Data.req(b) D(1,b) Lost Segment stored D(1,b) Retransmission timer expires 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 Data.ind(c) Data.req(d) D(3,d) Data.ind(d) 0 1 2 3 0 1 2 3 C(OK,2) C(OK,3) Rec. window 0 1 2 3 0 1 2 3
  • 48. Buffer management • A reliable transport serves a variable number of applications with a limited buffer • The buffer/window allocated to a given connection may need to change dynamically as connections start and stop
  • 49. Buffer management A B Data.req(a) Data.ind(a) D(0,a) C(OK,0, w=1) C(OK,0,w=3) Data.req(c) D(2,c) 2 new buffers become available Data.req(b) Data.ind(b) D(1,b) 0 1 2 3 0 1 2 3 0 1 2 3 C(OK,1,w=3) Rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 Swin=3, rwin=3 0 1 2 3 Data.req(d) D(3,d) 0 1 2 3
  • 50. Buffer management A B Data.req(b) Data.ind(a) Data.req(a) D(0,a) C(OK,0, w=0) 2 new buffers are available 0 1 2 3 Rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Swin=3, rwin=1 0 1 2 3 Receiver cannot handle segment immediately C(OK,0,w=3) Lost segment 0 1 2 3 Swin=3, rwin=0 Window blocked No transmission possible Waits for control segment Waits for data segment How to recover from this deadlock ? Persistence timer on receiver, resend control segment after timer expiration
  • 51. Bidirectional transfer • How to efficiently carry data in both directions ?
  • 52. Piggybacking A B Data.req(a) Data.ind(a) D(0,0,a) Data.req(b) D(1,0,b) Error Discarded Data.req(c) D(2,0,c) Segment -> buffer Retransmission Data.ind(b) D(1,5,b) Data.ind(c) Data.req(d) D(3,6,d) Data.ind(d) C(OK,2) C(OK,3) Data.req(x) D(5,0,w) Data.req(w) Data.ind(w) D(6,0,x) Data.ind(x) D(5,0,w) acks D(0,0,a)
  • 53. Bytestream • How to provide a bytestream service ?
  • 54. Byte stream service (2) A B Data.req(ijkl) Data.req(mnop) Data.req(abcdef) Data.ind(ab) D(0,ab) C(OK,1) C(OK,1) D(2,cd) Lost segment D(4,ef) Placed in buffer Data.ind(cdef) D(2,cd) Expiration timer Retransmission D(6,ijklmnop) Data.ind(ijklmnop) C(OK,5) C(OK,13)
  • 55. Take back lessons • Usage of Checksums/CRCs • Finite State Machines • Cumulative acknowledgements • Bandwidth x delay product

Editor's Notes

  1. MSL means Maximum Segment Lifetime