cse 6590 fall 2010 department of computer science & engineering york university 15 december 2015...
TRANSCRIPT
![Page 1: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/1.jpg)
CSE 6590Fall 2010
Department of Computer Science & Engineering
York University
April 21, 20231
Transport Protocols and TCP: Review
1
![Page 2: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/2.jpg)
Connection Establishment and Termination
22
![Page 3: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/3.jpg)
Connection Establishment and Termination
3
required by connection-oriented transport protocols like TCP
need connection establishment and termination procedures to allow: each end to know the other existsnegotiation of optional parameterstriggers allocation of transport entity resources
3
![Page 4: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/4.jpg)
Connection State Diagram
44
Assume a reliable network (no loss seen at the transport layer).
![Page 5: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/5.jpg)
Connection Establishment Diagram
55
What if either SYN is lost? (discussed later)
Assume a reliable network (no loss seen at the transport layer).
![Page 6: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/6.jpg)
Connection Termination
6
either or both sides by mutual agreementgraceful or abrupt terminationif graceful, initiator must:
send FIN to other end, requesting terminationplace connection in FIN WAIT statewhen FIN received, inform user and close
connectionother end must:
when receives FIN must inform TS user and place connection in CLOSE WAIT state
when TS user issues CLOSE primitive, send FIN & close connection
6
![Page 7: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/7.jpg)
Connection Establishment
7
two way handshakeA send SYN, B replies with SYNlost SYN handled by re-transmissionignore duplicate SYNs once connected
lost or delayed data segments can cause connection problemseg. segment from old connection
7
![Page 8: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/8.jpg)
Two Way Handshake:Obsolete Data Segment
88
Solution: starting SN is far away from the last SN of the previous connection.
Use request of the form SYNi where i +1 is the SN of the first data segment to be sent.
![Page 9: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/9.jpg)
Two Way Handshake:Obsolete SYN Segment
99
![Page 10: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/10.jpg)
TCP Three Way Handshake:State Diagram
1010
![Page 11: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/11.jpg)
TCP Three WayHandshake:Examples
1111
![Page 12: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/12.jpg)
TCP Connection Establishment: Summary
12
three way handshakeSYN, SYN-ACK, ACK
connection determined by source and destination sockets (host, port)
can only have a single connection between any unique pairs of ports
but one port can connect to multiple ports
![Page 13: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/13.jpg)
Connection Termination (2)
13
also need 3-way handshakemisordered segments could cause:
entity in CLOSE WAIT state sends last data segment, followed by FIN
FIN arrives before last data segmentreceiver accepts FIN, closes connection, loses
dataneed to associate sequence number with
FINreceiver waits for all segments before FIN
sequence number
13
![Page 14: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/14.jpg)
Connection Termination: Graceful Close
14
also have problems with loss of segments and obsolete segments
need graceful close which will:send FIN i and receive AN i+1receive FIN j and send AN j+1wait twice maximum expected segment
lifetime
14
![Page 15: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/15.jpg)
TCP Congestion Control
1515
![Page 16: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/16.jpg)
TCP Congestion Control
16
flow control also used for congestion controlrecognize increased transit times & dropped
packetsreact by reducing flow of data
RFC’s 1122 and 2581 detail extensionsTahoe, Reno and New Reno implementations
two categories of extensions:retransmission timer management window management
16
![Page 17: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/17.jpg)
Retransmission Timer Management
17
static timer likely too long or too shortestimate round trip delay by observing
pattern of delay for recent segmentsset time to value a bit greater than
estimated RTTsimple average over a number of
segmentsexponential average using time series
(RFC793)
![Page 18: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/18.jpg)
Computing RTT
18
Simple average
Exponential average
18
1
1
)(1
1)1(
K
i
iRTTK
Kr
)1(1
1)(
1)1(
KRTT
KKr
K
KKr
10
)1()1()()1(
a
KRTTaKraKr
![Page 19: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/19.jpg)
Use of Exponential Averaging
19
![Page 20: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/20.jpg)
Exponential RTO Backoff
20
timeout probably due to congestiondropped packet or long round trip time
hence maintaining same RTO is not good ideabetter to increase RTO each time a segment is
re-transmittedRTO = q*RTOcommonly q = 2 (binary exponential backoff)as in Ethernet CSMA/CD
![Page 21: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/21.jpg)
Window Management
21
slow startlarger windows cause problem on connection
createdat start limit TCP to 1 segmentincrease when data ACK, exponential growth
dynamic windows sizing on congestionwhen a timeout occurs perhaps due to congestionset slow start threshold to half current congestion
windowset window to 1 and slow start until thresholdbeyond threshold, increase window by 1 for each
RTT
![Page 22: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/22.jpg)
Summary
22
Assigns a congestion window Cw:Initial value of Cw = 1 (packet)If trx successful, congestion window doubled.
Continues until Cmax is reachedAfter Cw ≥ Cmax, Cw = Cw + 1If timeout before ACK, TCP assumes congestion
TCP response to congestion is drastic:A random backoff timer disables all transmissions for
duration of timerCw is set to 1Cmax is set to Cmax / 2
Congestion window can become quite small for successive packet losses.
22
![Page 23: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/23.jpg)
Window Management
23
![Page 24: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/24.jpg)
Fast Retransmit, Fast Recovery
24
retransmit timer rather longer than RTTif segment lost TCP slow to retransmitfast retransmit
if receive a segment out of order, issue an ACK for the last in-order segment correctly received. Repeat this until the missing segment arrives.
if receive 4 ACKs for same segment then immediately retransmit (without waiting for timer) since it is likely to have been lost
fast recoverylost segment means some congestionhalve window then increase linearlyavoids slow-start
![Page 25: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/25.jpg)
Window Management Examples
2525
![Page 26: CSE 6590 Fall 2010 Department of Computer Science & Engineering York University 15 December 2015 1 Transport Protocols and TCP: Review 1](https://reader034.vdocuments.mx/reader034/viewer/2022051517/5697bfa51a28abf838c97fca/html5/thumbnails/26.jpg)
Reading
26
Data and Computer Communications by William Stallings, Chapter 20.
26