Presentation is loading. Please wait.

Presentation is loading. Please wait.

William Stallings Data and Computer Communications Chapter 17 Transport Protocols.

Similar presentations


Presentation on theme: "William Stallings Data and Computer Communications Chapter 17 Transport Protocols."— Presentation transcript:

1 William Stallings Data and Computer Communications Chapter 17 Transport Protocols

2 Finding Addresses zFour methods yKnow address ahead of time xe.g. collection of network device stats yWell known addresses yName server ySending process request to well known address

3 Flow Control zLonger transmission delay between transport entities compared with actual transmission time yDelay in communication of flow control info zVariable transmission delay yDifficult to use timeouts zFlow may be controlled because: yThe receiving user can not keep up yThe receiving transport entity can not keep up zResults in buffer filling up

4 Coping with Flow Control Requirements (2) zUse fixed sliding window protocol ySee chapter 7 for operational details yWorks well on reliable network xFailure to receive ACK is taken as flow control indication yDoes not work well on unreliable network xCan not distinguish between lost segment and flow control zUse credit scheme

5 Credit Scheme zGreater control on reliable network zMore effective on unreliable network zDecouples flow control from ACK yMay ACK without granting credit and vice versa zEach octet has sequence number zEach transport segment has seq number, ack number and window size in header

6 Use of Header Fields zWhen sending, seq number is that of first octet in segment zACK includes AN=i, W=j zAll octets through SN=i-1 acknowledged yNext expected octet is i zPermission to send additional window of W=j octets yi.e. octets through i+j-1

7 Connection Establishment

8 Not Listening zReject with RST (Reset) zQueue request until matching open issued zSignal TS user to notify of pending request yMay replace passive open with accept

9 Ordered Delivery zSegments may arrive out of order zNumber segments sequentially zTCP numbers each octet sequentially zSegments are numbered by the first octet number in the segment

10 Retransmission Strategy zSegment damaged in transit zSegment fails to arrive zTransmitter does not know of failure zReceiver must acknowledge successful receipt zUse cumulative acknowledgement zTime out waiting for ACK triggers re-transmission

11 Timer Value zFixed timer yBased on understanding of network behavior yCan not adapt to changing network conditions yToo small leads to unnecessary re-transmissions yToo large and response to lost segments is slow yShould be a bit longer than round trip time zAdaptive scheme yMay not ACK immediately yCan not distinguish between ACK of original segment and re-transmitted segment yConditions may change suddenly

12 Two Way Handshake: Obsolete Data Segment

13 Two Way Handshake: Obsolete SYN Segment

14 Three Way Handshake: State Diagram

15 Three Way Handshake: Examples

16 TCP & UDP zTransmission Control Protocol yConnection oriented yRFC 793 zUser Datagram Protocol (UDP) yConnectionless yRFC 768

17 TCP Services zReliable communication between pairs of processes zAcross variety of reliable and unreliable networks and internets zTwo labeling facilities yData stream push xTCP user can require transmission of all data up to push flag xReceiver will deliver in same manner xAvoids waiting for full buffers yUrgent data signal xIndicates urgent data is upcoming in stream xUser decides how to handle it

18 TCP Header

19 Items Passed to IP zTCP passes some parameters down to IP yPrecedence yNormal delay/low delay yNormal throughput/high throughput yNormal reliability/high reliability ySecurity

20 TCP Mechanisms (1) zConnection establishment yThree way handshake yBetween pairs of ports yOne port can connect to multiple destinations

21 TCP Mechanisms (2) zData transfer yLogical stream of octets yOctets numbered modulo 2 23 yFlow control by credit allocation of number of octets yData buffered at transmitter and receiver

22 TCP Mechanisms (3) zConnection termination yGraceful close yTCP users issues CLOSE primitive yTransport entity sets FIN flag on last segment sent yAbrupt termination by ABORT primitive xEntity abandons all attempts to send or receive data xRST segment transmitted

23 Implementation Policy Options zSend zDeliver zAccept zRetransmit zAcknowledge

24 Send zIf no push or close TCP entity transmits at its own convenience zData buffered at transmit buffer zMay construct segment per data batch zMay wait for certain amount of data

25 Deliver zIn absence of push, deliver data at own convenience zMay deliver as each in order segment received zMay buffer data from more than one segment

26 Accept zSegments may arrive out of order zIn order yOnly accept segments in order yDiscard out of order segments zIn windows yAccept all segments within receive window

27 Retransmit zTCP maintains queue of segments transmitted but not acknowledged zTCP will retransmit if not ACKed in given time yFirst only yBatch yIndividual

28 Acknowledgement zImmediate zCumulative

29 Congestion Control zRFC 1122, Requirements for Internet hosts zRetransmission timer management yEstimate round trip delay by observing pattern of delay ySet time to value somewhat greater than estimate ySimple average yExponential average yRTT Variance Estimation (Jacobson’s algorithm)

30 Use of Exponential Averaging

31 Jacobson’s RTO Calculation

32 Exponential RTO Backoff zSince timeout is probably due to congestion (dropped packet or long round trip), maintaining RTO is not good idea zRTO increased each time a segment is re-transmitted zRTO = q*RTO zCommonly q=2 yBinary exponential backoff

33 Karn’s Algorithm zIf a segment is re-transmitted, the ACK arriving may be: yFor the first copy of the segment xRTT longer than expected yFor second copy zNo way to tell zDo not measure RTT for re-transmitted segments zCalculate backoff when re-transmission occurs zUse backoff RTO until ACK arrives for segment that has not been re-transmitted

34 Window Management zSlow start yawnd = MIN[credit, cwnd] yStart connection with cwnd=1 yIncrement cwnd at each ACK, to some max zDynamic windows sizing on congestion yWhen a timeout occurs ySet slow start threshold to half current congestion window xssthresh=cwnd/2 ySet cwnd = 1 and slow start until cwnd=ssthresh xIncreasing cwnd by 1 for every ACK yFor cwnd >=ssthresh, increase cwnd by 1 for each RTT

35 UDP zUser datagram protocol zRFC 768 zConnectionless service for application level procedures yUnreliable yDelivery and duplication control not guaranteed zReduced overhead ze.g. network management (Chapter 19)

36 UDP Uses zInward data collection zOutward data dissemination zRequest-Response zReal time application

37 UDP Header

38 Required Reading zStallings chapter 17 zRFCs


Download ppt "William Stallings Data and Computer Communications Chapter 17 Transport Protocols."

Similar presentations


Ads by Google