DOC PREVIEW
UT Dallas CS 6390 - 13. TCP

This preview shows page 1-2-3-26-27-28 out of 28 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 28 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Advanced Computer Networks TCPTCP: OverviewTCP segment structureTCP services/componentsTCP seq. #’s and ACKsTCP Round Trip Time and TimeoutAdaptive Retransmission (Original Algorithm)Karn/Partridge AlgorithmJacobson/ Karels AlgorithmTCP reliable data transfer (rdt)TCP sender events:TCP sender (simplified)TCP: transmission scenariosTCP transmission scenarios (more)TCP ACK generation [RFC 1122, RFC 2581]Fast RetransmitFast retransmit algorithm:TCP Flow ControlSlide 19TCP Flow control: how it worksTCP Flow controlTCP Connection ManagementTCP Connection Management (cont.)Slide 24TCP Connection Management (cont)Protection Against Wrap AroundKeeping the Pipe FullTCP ExtensionsAdvanced Computer NetworksTCPTCP: OverviewEnd-to-end issues for providing end-to-end reliable and ordered data transferLogical connection between two remote hostsRTT is not fixed, even during a connectionPacket re-ordering is an issue•MSL: Maximum Segment LifetimeResource discovery •Available bandwidth•Buffer spaceCongestion issues in the networkTCP segment structuresource port #dest port #32 bitsapplicationdata (variable length)sequence numberacknowledgement numberReceive windowUrg data pnterchecksumFSRPAUheadlennotusedOptions (variable length)URG: urgent data (generally not used)ACK: ACK #validPSH: push data now(generally not used)RST, SYN, FIN:connection estab(setup, teardowncommands)# bytes rcvr willingto acceptcountingby bytes of data(not segments!)Internetchecksum(as in UDP)TCP services/componentsReliabilitySequence numbers and ACKsTime out mechanismFlow controlConnection managementCongestion controlTCP seq. #’s and ACKsSeq. #’s:byte stream “number” of first byte in segment’s dataACKs:seq # of next byte expected from other sidecumulative ACKHost AHost BSeq=42, ACK=79, data = ‘ABC’Seq=79, ACK=45, data = ‘ABC’Seq=45, ACK=82Usertypes‘ABC’host ACKsreceipt of echoed‘ABC’timesimple telnet scenarioACKs are piggybackedhost ACKsreceipt of‘ABC’, echoesback ‘ABC’TCP Round Trip Time and TimeoutQ: how to set TCP timeout value?longer than RTTbut RTT variestoo short: premature timeoutunnecessary retransmissionstoo long: slow reaction to segment lossQ: how to estimate RTT?SampleRTT: measured time from segment transmission until ACK receiptignore retransmissions(Karn/Partridge algr)SampleRTT will vary, want estimated RTT “smoother”average several recent measurements, not just current SampleRTTAdaptive Retransmission(Original Algorithm)Measure SampleRTT for each segment/ ACK pairCompute weighted average of RTTEstRTT =   EstRTT +  x SampleRTTSet timeout based on EstRTTTimeOut = 2 x EstRTTKarn/Partridge AlgorithmDo not sample RTT when retransmitting Double timeout after each retransmission Sender ReceiverOriginal transmissionACKSampleRTTRetransmissionSender ReceiverOriginal transmissionACKSampleR TTRetransmissionJacobson/ Karels AlgorithmConsider variance when setting timeout valueNew Calculations for average RTTDiff = SampleRTT - EstRTTEstRTT = EstRTT + ( x Diff)Dev = Dev + ( |Diff| - Dev)where  is a factor between 0 and 1TimeOut =  x EstRTT +  x Devwhere  = 1 and  = 4Notesaccurate timeout mechanism important to congestion control (later)TCP reliable data transfer (rdt)TCP creates rdt service on top of IP’s unreliable serviceCumulative acksTCP uses single retransmission timerRetransmissions are triggered by:timeout eventsduplicate acksInitially consider simplified TCP sender:ignore duplicate acksignore flow control, congestion controlTCP sender events:data rcvd from app:Create segment with seq #seq # is byte-stream number of first data byte in segmentstart timer if not already running (think of timer as for oldest unacked segment)expiration interval: TimeOutInterval timeout:retransmit segment that caused timeoutrestart timer Ack rcvd:If acknowledges previously unacked segmentsupdate what is known to be ackedstart timer if there are outstanding segmentsTCP sender(simplified) NextSeqNum = InitialSeqNum SendBase = InitialSeqNum loop (forever) { switch(event) event: data received from application above create TCP segment with sequence number NextSeqNum if (timer currently not running) start timer pass segment to IP NextSeqNum = NextSeqNum + length(data) event: timer timeout retransmit not-yet-acknowledged segment with smallest sequence number start timer event: ACK received, with ACK field value of y if (y > SendBase) { SendBase = y if (there are currently not-yet-acknowledged segments) start timer } } /* end of loop forever */ Comment:• SendBase-1: last cumulatively ack’ed byteExample:• SendBase-1 = 71;y= 73, so the rcvrwants 73+ ;y > SendBase, sothat new data is ackedTCP: transmission scenariosHost ASeq=100, 20 bytes dataACK=100timepremature timeoutHost BSeq=92, 8 bytes dataACK=120Seq=92, 8 bytes dataSeq=92 timeoutACK=120Host ASeq=92, 8 bytes dataACK=100losstimeoutlost ACK scenarioHost BXSeq=92, 8 bytes dataACK=100timeSeq=92 timeoutSendBase= 100SendBase= 120SendBase= 120Sendbase= 100TCP transmission scenarios (more)Host ASeq=92, 8 bytes dataACK=100losstimeoutCumulative ACK scenarioHost BXSeq=100, 20 bytes dataACK=120timeSendBase= 120TCP ACK generation [RFC 1122, RFC 2581]Event at ReceiverArrival of in-order segment withexpected seq #. All data up toexpected seq # already ACKedArrival of in-order segment withexpected seq #. One other segment has ACK pendingArrival of out-of-order segmenthigher-than-expect seq. # .Gap detectedArrival of segment that partially or completely fills gapTCP Receiver actionDelayed ACK. Wait up to 500msfor next segment. If no next segment,send ACKImmediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byteImmediate send ACK, provided thatsegment starts at lower end of gapFast RetransmitTime-out period often relatively long:long delay before resending lost packetDetect lost segments via duplicate ACKs.Sender often sends many segments back-to-backIf segment is lost, there will likely be many


View Full Document

UT Dallas CS 6390 - 13. TCP

Documents in this Course
VoIP

VoIP

44 pages

TE-MPLS

TE-MPLS

38 pages

TCP

TCP

28 pages

QoS

QoS

27 pages

P2P

P2P

50 pages

IPv6

IPv6

81 pages

IPv6

IPv6

64 pages

AODV-v2

AODV-v2

19 pages

aodv

aodv

32 pages

19. P2P

19. P2P

50 pages

18. VoIP

18. VoIP

44 pages

17. QoS

17. QoS

27 pages

13. TCP

13. TCP

28 pages

6. IPv6

6. IPv6

81 pages

19. P2P

19. P2P

50 pages

18. VoIP

18. VoIP

44 pages

17. QoS

17. QoS

27 pages

6. IPv6

6. IPv6

81 pages

6. IPv6

6. IPv6

81 pages

19. P2P

19. P2P

50 pages

18. VoIP

18. VoIP

44 pages

17. QoS

17. QoS

27 pages

CC

CC

74 pages

19. P2P

19. P2P

50 pages

18. VoIP

18. VoIP

44 pages

17. QoS

17. QoS

27 pages

13. TCP

13. TCP

28 pages

6. IPv6

6. IPv6

81 pages

CC

CC

74 pages

Load more
Download 13. TCP
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 13. TCP and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 13. TCP 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?