slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
TCP PowerPoint Presentation
Download Presentation
TCP

Loading in 2 Seconds...

play fullscreen
1 / 16

TCP - PowerPoint PPT Presentation


  • 111 Views
  • Uploaded on

TCP. Jean Walrand U.C. Berkeley www.eecs.berkeley.edu/~wlr. Outline. TCP Service State Diagram Flow Control Congestion Control RTT Estimation Fast Recovery Fast Retransmit. TCP Service. Error-Free Byte Stream. Reliable byte stream. TCP. IP. Unreliable packet delivery.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'TCP' - iola-norman


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

TCP

Jean Walrand

U.C. Berkeley

www.eecs.berkeley.edu/~wlr

outline
Outline
  • TCP Service
  • State Diagram
  • Flow Control
  • Congestion Control
  • RTT Estimation
  • Fast Recovery
  • Fast Retransmit
tcp service
TCP Service
  • Error-Free Byte Stream

Reliable byte stream

TCP

IP

Unreliable packet delivery

Actual data path

tcp service c d

ports

p1

p2

p1

p2

p3

p1

p2

TCP

IP

A

B

C

TCP Service (c’d)
  • Multiplexing: Ports

[A | B | p1 | p2 | …]

state diagram

A

(3) Data: k + 1

ACK: n + 1

(4) FIN

(1) SYN: k

(5) FIN.ack

(2) SYN: n

ACK: k + 1

(7) FIN.ack

ACK

B

(6) FIN

  • SYN = Synchronize: A tells B that its bytes start with sequence number k + 1
  • SYN = Synchronize: B tells A that its bytes start with sequence number n + 1
  • ACK = Acknowledgement: B tells A that it agrees that A’s bytes start with k+1

(3) Data: A starts sending bytes with sequence number k + 1

ACK = Acknowledgement: A tells B that it agrees that B’s bytes start with n+1

(4) FIN = Finish: A tells B that it closes the “half-connection” from A to B; (5) B acks

(6)-(7) Similar to (4)-(5)

State Diagram
  • Key Steps:

state diagram c d

Timed Wait

SYN sent

FIN Wait-1

Closed

Closed

Established

FIN Wait-2

(1)

A

SYN

Data + ACK

FIN

Established

Listen

FIN.ack

Last Ack

FIN

FIN.ack

SYN + ACK

ACK

B

SYN received

Closed

Close Wait

(1): A waits in case B retransmits FIN and A must ack again

State Diagram (c’d)
  • States:
flow control

Wrec

[ACK | Wrec | …]

Flow Control
  • Objective: Avoid saturating receiver
  • Mechanism: Receiver advertises window Wrec

W  Wrec – Outstanding

where Oustanding = Last sent – last Acked

congestion control
Congestion Control
  • Objective: Avoid saturating routers
  • Mechanism: Loss => Reduce W; No loss => Increase W
  • Details: See book.
congestion control c d

W = 1

W = 2

W = 4

W = 8

Congestion Control (c’d)
  • Slow Start:ACK => W = W + 1
congestion control c d1

W

RTT

Congestion Control (c’d)
  • Slow Start:ACK => W = W + 1
congestion control c d2

W = 8.125 + 1/8.125

 8 + 2/8

W = 8

+ 1/8

W  8 + 8/8 = 9

W = 8

W  9 + 9/9 = 10

Congestion Control (c’d)
  • Congestion Avoidance: ACK => W = W + 1/W
congestion control c d3

W

RTT

Congestion Control (c’d)
  • Congestion Avoidance: ACK => W = W + 1/W
rtt estimation
RTT Estimation
  • Timeout if delay > average + 4 deviations
  • Average delay and deviation: first order filters:

Average A(n) calculated when n-th ACK arrives:

A(n) = aA(n – 1) + (1 – a)Delay(n)

Deviation D(n) calculated when n-th ACK arrives:

D(n) = aD(n – 1) + (1 – a)|Delay(n) – A(n)|

Note - Obvious corrections when retransmission:

Do not include delays of retransmitted packets

Double timeout after retransmission

fast retransmission

ACK n

ACK n

ACK n

Fast Retransmission
  • When 3 duplicated ACKs, retransmit and W = W/2
  • Motivation: 3 dup to avoid retransmission after misordering
fast recovery

L + 2K – 1, …, L + 4, L+3, L+2, L +1, L, L - 1

Last Received

3 Dup Ack

Fast Recovery
  • Objective: Keep buffer full after setting W = W/2
  • Illustration: Window goes from 2K to K

L, L + 2K – 1, …, L + 4

L + 2K, L, L + 2K – 1, …, L + 4 => W = 2K + 1

L + 2K + 1, L + 2K, L, L + 2K – 1, …, L + 5 => W = 2K + 2

. . . . . . . . .

L + 3K - 2,…, L + 2K + 1, L + 2K, L => W = 3K - 1

L + 3K - 1,…, L + 2K + 1, L + 2K => W = K