1 / 18

CS 5565 Network Architecture and Protocols

CS 5565 Network Architecture and Protocols. Godmar Back. Lecture 22. Announcements. Project 1B due this Friday March 17, 11:59pm Midterm March 22 See sample midterm from last year Reading Assignment: Chapter 3 3.5-3.8 TCP, except for 3.7.2 FAST TCP Paper. Study of TCP: Outline.

jmathews
Download Presentation

CS 5565 Network Architecture and Protocols

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 5565Network Architecture and Protocols Godmar Back Lecture 22

  2. Announcements • Project 1B due this Friday March 17, 11:59pm • Midterm March 22 • See sample midterm from last year • Reading Assignment: Chapter 3 • 3.5-3.8 TCP, except for 3.7.2 • FAST TCP Paper CS 5565 Spring 2006

  3. Study of TCP: Outline • segment structure • reliable data transfer • flow control • connection management [ Network Address Translation ] [ Principles of congestion control ] • TCP congestion control CS 5565 Spring 2006

  4. TCP Timeout & Fast Retransmit

  5. Q: how to set TCP timeout value? longer than RTT but RTT varies too short: premature timeout unnecessary retransmissions too long: slow reaction to segment loss Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt SampleRTT will vary, want estimated RTT “smoother” average several recent measurements, not just current SampleRTT TCP Round Trip Time and Timeout CS 5565 Spring 2006

  6. RTT Distributions (a) Probability density of ACK arrival times in the data link layer. (b) Probability density of ACK arrival times for TCP. CS 5565 Spring 2006

  7. TCP Round Trip Time and Timeout EstimatedRTT = (1 - ) * EstimatedRTT +  * SampleRTT • exponential weighted moving average • influence of past sample decreases exponentially fast • typical value:  = 0.125 CS 5565 Spring 2006

  8. Example RTT estimation: CS 5565 Spring 2006

  9. Setting the timeout EstimatedRTT plus “safety margin” large variation in EstimatedRTT  larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: TCP Round Trip Time and Timeout EstimatedRTT = (1-)*EstimatedRTT + *SampleRTT DevRTT = (1-)*DevRTT + *|SampleRTT-EstimatedRTT| (typically,  = 0.125,  = 0.25) TimeoutInterval = EstimatedRTT + 4*DevRTT CS 5565 Spring 2006

  10. RTT Measurement & Retransmissions • How should you handle acks for retransmitted segments when measuring RTT? • Note: ACK could be delayed for original segment or early for retransmitted segment • Choices: • Associate with original packet  may overestimate true RTT • Associate with retransmitted packet  may underestimate true RTT CS 5565 Spring 2006

  11. Karn’s Algorithm • Idea: don’t consider samples from retransmitted segments • Ok, but what if current timeout value is too small for network delay? • In this case, would keep timing out but couldn’t adjust timeout according to formula • Solution: If measurement can’t be made, use exponential backoff until new measurement can be made • By factor of 2 with limit • Resume normal sampling algorithm afterwards • Usual sampling period is once per RTT • See also RFC 2988 – TCP timestamp option can be used to remove ambiguity which ack matches which packet CS 5565 Spring 2006

  12. Time-out period often relatively long: long delay before resending lost packet Detect lost segments via duplicate ACKs. Sender often sends many segments back-to-back If segment is lost, there will likely be many duplicate ACKs. If sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost: fast retransmit: resend segment before timer expires Fast Retransmit CS 5565 Spring 2006

  13. Fast retransmit algorithm: event: ACK received, with ACK field value of y if (y > SendBase) { SendBase = y if (there are currently not-yet-acknowledged segments) start timer } else { increment count of dup ACKs received for y if (count of dup ACKs received for y = 3) resend segment with sequence number y } a duplicate ACK for already ACKed segment fast retransmit CS 5565 Spring 2006

  14. TCP Flow Control

  15. receive side of TCP connection has a receive buffer: speed-matching service: matching the send rate to the receiving app’s drain rate flow control sender won’t overflow receiver’s buffer by transmitting too much, too fast TCP Flow Control • app process may be slow at reading from buffer CS 5565 Spring 2006

  16. (Suppose TCP receiver discards out-of-order segments) spare room in buffer = RcvWindow = RcvBuffer-[LastByteRcvd - LastByteRead] Rcvr advertises spare room by including value of RcvWindow in segments Sender limits unACKed data to RcvWindow guarantees receive buffer doesn’t overflow TCP Flow Control (cont’d) CS 5565 Spring 2006

  17. Flow Control: Persistence Timer • Suppose sender is blocked cause receiver application hasn’t picked up data • Then receiver app reads n bytes • TCP receiver advertises new window of size RcvWindow = n • But suppose this advertisement is lost • Sender would be stuck • Solution: persistence timer, sender sends probe after a period of inactivity to provoke window update CS 5565 Spring 2006

  18. Flow Control: Silly Window Syndrome Clark’s solution: don’t advertise windows below a certain size CS 5565 Spring 2006

More Related