DOC PREVIEW
UCLA COMSCI 118 - Chapter3C_4th_ed

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:

CS 118 Spring 2014Chapter 3 outlineTCP: Overview RFCs: 793, 1122, 1323, 2018, 2581TCP segment structureTCP seq. #’s and ACKsTCP Round Trip Time and TimeoutSlide 7Example RTT estimation:Slide 9Chapter 3: Transport LayerSlide 11Slide 12TCP reliable data transferGo-Back-NGBN in actionTCP sender events:TCP: retransmission scenariosTCP retransmission scenarios (more)TCP ACK generation [RFC 1122, RFC 2581]Fast RetransmitSlide 23TCP Flow ControlTCP Flow control: how it worksSlide 26TCP Connection ManagementTCP Connection Management (cont.)Slide 29TCP Connection Management (cont)Transport Layer 3-1CS 118 Spring 2014Chpt 3 - Section 3CTransport Layer 3-2Chapter 3 outline3.1 Transport-layer services3.2 Multiplexing and demultiplexing3.3 Connectionless transport: UDP3.4 Principles of reliable data transfer3.5 Connection-oriented transport: TCPsegment structurereliable data transferflow controlconnection management3.6 Principles of congestion control3.7 TCP congestion controlTransport Layer 3-3TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581full duplex data:bi-directional data flow in same connectionMSS: maximum segment sizeconnection-oriented: handshaking (exchange of control msgs) init’s sender, receiver state before data exchangeflow controlled:sender will not overwhelm receiverpoint-to-point:one sender, one receiver reliable, in-order byte stream:no “message boundaries”pipelined:TCP congestion and flow control set window sizesend & receive bufferss o c k e td o o rT C Ps e n d b u f f e rT C Pr e c e i v e b u f f e rs o c k e td o o rs e g m e n ta p p l i c a t i o nw r i t e s d a t aa p p l i c a t i o nr e a d s d a t aTransport Layer 3-4TCP 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)Transport Layer 3-5TCP seq. #’s and ACKsSeq. #’s:byte stream “number” of first byte in segment’s dataACKs:seq # of next byte expected from other sidecumulative ACKQ: how receiver handles out-of-order segmentsA: TCP spec doesn’t say, - up to implementorHost AHost BSeq=42, ACK=79, data = ‘C’Seq=79, ACK=43, data = ‘C’Seq=43, ACK=80Usertypes‘C’host ACKsreceipt of echoed‘C’host ACKsreceipt of‘C’, echoesback ‘C’timesimple telnet scenarioTransport Layer 3-6TCP 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SampleRTT will vary, want estimated RTT “smoother”average several recent measurements, not just current SampleRTTTransport Layer 3-7TCP Round Trip Time and TimeoutEstimatedRTT = (1- )*EstimatedRTT + *SampleRTTExponential weighted moving averageinfluence of past sample decreases exponentially fasttypical value:  = 0.125Transport Layer 3-8Example RTT estimation:Transport Layer 3-9TCP Round Trip Time and TimeoutSetting the timeoutEstimtedRTT plus “safety margin”large variation in EstimatedRTT -> larger safety marginfirst estimate of how much SampleRTT deviates from EstimatedRTT: TimeoutInterval = EstimatedRTT + 4*DevRTTDevRTT = (1-)*DevRTT + *|SampleRTT-EstimatedRTT|(typically,  = 0.25) Then set timeout interval:Transport Layer 3-10Chapter 3: Transport LayerOur goals: understand principles behind transport layer services:multiplexing/demultiplexingreliable data transferflow controlcongestion controllearn about transport layer protocols in the Internet:UDP: connectionless transportTCP: connection-oriented transportTCP congestion controlTransport Layer 3-11Chapter 3 outline3.1 Transport-layer services3.2 Multiplexing and demultiplexing3.3 Connectionless transport: UDP3.4 Principles of reliable data transfer3.5 Connection-oriented transport: TCPsegment structurereliable data transferflow controlconnection management3.6 Principles of congestion control3.7 TCP congestion controlTransport Layer 3-12Chapter 3 outline3.1 Transport-layer services3.2 Multiplexing and demultiplexing3.3 Connectionless transport: UDP3.4 Principles of reliable data transfer3.5 Connection-oriented transport: TCPsegment structurereliable data transferflow controlconnection management3.6 Principles of congestion control3.7 TCP congestion controlTransport Layer 3-13TCP reliable data transferTCP creates rdt service on top of IP’s unreliable servicePipelined segments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 controlTransport Layer 3-14Go-Back-NSender:k-bit seq # in pkt header“window” of up to N, consecutive unack’ed pkts allowedACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK”may receive duplicate ACKs (see receiver)timer for each in-flight pkttimeout(n): retransmit pkt n and all higher seq # pkts in windowTransport Layer 3-15GBN inactionTransport Layer 3-16TCP 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 segmentsTransport Layer 3-18TCP: retransmission 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= 100Transport Layer 3-19TCP retransmission


View Full Document

UCLA COMSCI 118 - Chapter3C_4th_ed

Download Chapter3C_4th_ed
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 Chapter3C_4th_ed 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 Chapter3C_4th_ed 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?