18-TL-TCP2 - ReliableDataTransferin...

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

View Full Document Right Arrow Icon
Reliable Data Transfer in Transmission Control Protocol (TCP)
Background image of page 1

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

View Full DocumentRight Arrow Icon
TCP Data Transfer TCP creates  reliable, ordered   data transfer service on top of  IP’s unreliable service Pipelined segments Cumulative ACKs Uses single retransmission  timer Retransmissions are triggered  by: timeout events duplicate ACKs Window size controlled by  receiver and inferred from  network Flow control Congestion control
Background image of page 2
Receiver Sender Sender/Receiver Overview Sent & Acked Sent Not Acked OK to Send Not Usable Last frame acceptable Receiver window Last ACK received Last Frame Sent Received & Acked Acceptable Packet Not Usable Sender window Next frame expected
Background image of page 3

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

View Full DocumentRight Arrow Icon
TCP Sender/Receiver Invariants Sending application LastByteWritten TCP LastByteSent LastByteAcked Receiving application LastByteRead TCP LastByteRcvd NextByteExpected Snd:  LastByteAcked ≤ LastByteSent ≤ LastByteWritten Rcv:  LastByteRead < NextByteExpected ≤ LastByteRcvd + 1       LastByteAcked < NextByteExpected ≤ LastByteSent+1
Background image of page 4
TCP sender   (simplified) NextSeqNum = InitialSeqNum + 1  SendBase = InitialSeqNum + 1    /* == LastByteAcked + 1 */ loop (forever) {       switch(event)            event:   data received from application above              1. create TCP segment with sequence number NextSeqNum              2. if (timer currently not running)                 2.1. start timer – timeout after  TimeOutInterval  later             3. pass segment to IP              4. NextSeqNum = NextSeqNum + length(data)           event:   timer timeout              1. retransmit not-yet-acknowledged segment with                       smallest sequence number              2. start timer – timeout after  TimeOutInterval  later          event:   ACK received, with ACK field value of y                1. if (y > SendBase) {                      SendBase = y                     if (there are currently not-yet-acknowledged segments)                          restart timer                  }  }  /* end of loop forever */   Comment:  SendBase-1: last  cumulatively  ack’ed byte, i.e., the  receiver has received  bytes up to  SendBase –1 and is  expecting the byte  starting at SendBase
Background image of page 5

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

View Full DocumentRight Arrow Icon
TCP: retransmission scenarios Host A Seq=100, 20 bytes data ACK=100 time premature timeout Host B Seq=92, 8 bytes data ACK=120 Seq=92 timeout Host A loss timeout lost ACK scenario Host B X time SendBase = 100 SendBase = 120 SendBase = 120 Sendbase = 100
Background image of page 6
TCP retransmission scenarios (more) Host A Seq=92, 8 bytes data ACK=100 loss timeout Cumulative ACK scenario Host B Seq=100, 20 bytes data ACK=120 time SendBase = 120
Background image of page 7

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

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

This note was uploaded on 11/03/2009 for the course NET NET taught by Professor N/a during the Spring '09 term at Anadolu University.

Page1 / 38

18-TL-TCP2 - ReliableDataTransferin...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online