Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transmission Control Protocol TCP Part 2 University of Glamorgan Networked & Distributed Systems.

Similar presentations


Presentation on theme: "Transmission Control Protocol TCP Part 2 University of Glamorgan Networked & Distributed Systems."— Presentation transcript:

1 Transmission Control Protocol TCP Part 2 University of Glamorgan Networked & Distributed Systems

2 Today’s menu n Establishing A TCP Connection n Timeouts and Retransmission n Congestion n Push n Silly Window Syndrome n Closing A TCP Connection

3 TCP Connections n There are obviously two end points to a connection n An end point is identified by a combination of host IP address & port number n One end point that initiates the connection. This performs an active open n One end point that accepts the connection. This performs a passive open n The passive open must occur before the active open can succeed n The passive end point can support multiple connections

4 Establishing A TCP Connection

5 Timeouts and Retransmission n Selecting the correct value for the timeout is crucial to efficiently implementing TCP.

6 Round-Trip Time (RTT)

7 n RTT varies according to ä Different hosts ä Different times of day ä Even from second to second n If we need to retransmit then what is the RTT? ä Time from original transmission to receiving ACK ä Time from last re transmission to receiving ACK

8 Measuring RTT: Karn’s Algorithm n Ignore retransmission when trying to estimate RTT n Increase timeout value until transmission succeeds n Then recalculate RTT when retransmission no longer needed

9 Estimating Timeout Value Original Method rtt = ALPHA * rtt + ( 1 – ALPHA ) * sample timeout = BETA * rtt 0 ≤ ALPHA < 1typically 0.9 BETA > 1typically 2 Old New Last Measured value

10 RTT trajectory using Karn’s Algorithm

11 RTT: Karn’s Algorithm

12 Estimating Timeout Value Revised Method diff = sample – rtt rtt = rtt + DELTA * diff dev = dev + RHO * ( abs(diff) – dev ) timeout = rtt + ETA * dev 0 < DELTA < 1typically ⅛ 0 < RHO < 1typically ¼ ETA ≥ 1typically 3

13 Congestion

14 Slow-Start (Additive) Recovery When starting a new connection or increasing traffic after congestion is over n congestion window = one segment n for each ACK received n congestion window = congestion window + one segment

15 Multiplicative Decrease Congestion Avoidance Sender also maintains a congestion window If a segment is lost then congestion window = MIN (congestion window/2, one segment ) allowed window = MIN ( receive window, congestion window )  increase retransmission timer for all segments in allowed window

16 How does it work?

17 Exponential Increase Exponential Increase : Increase CW with for each received ACK

18 How does it work? Can be 64 Kbyte Exponential Increase

19 How does it work? Exponential Increase : Increase CW with for each received ACK Linear Increase : Increase CW with one for each ACK- ed Window

20 How does it work? Probably due to loss or congestion Exponential Increase Linear Increase

21 Push n Normally TCP decides when to send a segment n If user needs to make sure data is sent, they can issue a PUSH

22 Silly Window Syndrome n Early TCP implementations had problems with the receiver advertising small windows and then the sender sending small segments n Modern implementations avoid this by ä The receiver only advertising zero or “sensible” windows ä Delaying ACKs which would advertise small windows ä Sender only sends when it has a “large” segment or it receives an ACK

23 Closing A TCP Connection

24 Next : Higher Layer Protocols n BOOTstrap Protocol (BOOTP) n Dynamic Host Configuration Protocol (DHCP) n Domain Name System (DNS)


Download ppt "Transmission Control Protocol TCP Part 2 University of Glamorgan Networked & Distributed Systems."

Similar presentations


Ads by Google