Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Similar documents
Mid Term Exam Results

CNT 6885 Network Review on Transport Layer

Chapter 3 Transport Layer

Chapter III: Transport Layer

Chapter 3 Transport Layer

Chapter 3 Transport Layer

CSCI Topics: Internet Programming Fall 2008

CC451 Computer Networks

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Computer Networking Introduction

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

Flow and Congestion Control (Hosts)

Lecture 15: Transport Layer Congestion Control

Lecture 8. TCP/IP Transport Layer (2)

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Chapter 3 Transport Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

Lecture 11. Transport Layer (cont d) Transport Layer 1

CSCD 330 Network Programming Winter 2015

Chapter 3 Transport Layer

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

CSCI Topics: Internet Programming Fall 2008

Chapter III: Transport Layer

TCP congestion control:

Chapter 3- parte B outline

Chapter 6 Transport Layer

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

CSCI Topics: Internet Programming Fall 2008

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CSC 4900 Computer Networks: TCP

Chapter 3 Transport Layer

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

CSC 8560 Computer Networks: TCP

The Transport Layer: TCP & Congestion Control

Chapter 3 Transport Layer

RSC Part III: Transport Layer 3. TCP

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

CS Lecture 1 Review of Basic Protocols

3.7 TCP congestion. reliable data transfer. sliding window. Lecture 4: Transport layer III: flow control and congestion control & Network layer I: IP

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

Principles of congestion control

Master Course Computer Networks IN2097

Flow and Congestion Control Marcos Vieira

Go-Back-N. Pipelining: increased utilization. Pipelined protocols. GBN: sender extended FSM

Transport Layer: outline

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

TCP Congestion Control 65KB W

Fall 2012: FCM 708 Bridge Foundation I

image 3.8 KB Figure 1.6: Example Web Page

CS321: Computer Networks Congestion Control in TCP

The Transport Layer Congestion control in TCP

Internet Protocols Fall Outline

CSC 401 Data and Computer Communications Networks

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Transport Layer Congestion Control

Chapter 3 Transport Layer

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

Detecting half-open connections. Observed TCP problems

Transport Layer: Outline

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

LECTURE 3 - TRANSPORT LAYER

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Application. Transport. Network. Link. Physical

Transmission Control Protocol

CSE 4213: Computer Networks II

Chapter 3 Transport Layer

Foundations of Telematics

rdt3.0: channels with errors and loss

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

CS Transport. Outline. Window Flow Control. Window Flow Control

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Chapter 3 Transport Layer

TCP Adaptive Retransmission Algorithm - Original TCP. TCP Adaptive Retransmission Algorithm Jacobson

Master Course Computer Networks IN2097

Internet Networking recitation #10 TCP New Reno Vs. Reno

Congestion Control. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Computer Communication Networks Midterm Review

Transport Protocols and TCP

Master Course Computer Networks IN2097

internet technologies and standards

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Bandwidth Allocation & TCP

Course on Computer Communication and Networks. Lecture 5 Chapter 3; Transport Layer, Part B

10 minutes survey (anonymous)

internet technologies and standards

CSCE 463/612 Networks and Distributed Processing Spring 2017

Part1: Lecture 2! TCP congestion control!

CSC358 Week 5. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Outline. CS5984 Mobile Computing

Transcription:

Communication Networks (0368-3030) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner

Kurose & Ross, Chapter 3.5.5, 3.7 (5 th ed.) Many slides adapted from: J. Kurose & K. Ross \ Computer Networking: A Top Down Approach (5 th ed.) Addison-Wesley, April 2009. Copyright 1996-2010, J.F Kurose and K.W. Ross, All Rights Reserved.

TCP ACK generation [RFC 1122, RFC 2581] Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already ACKed Arrival of in-order segment with expected seq #. One other segment has ACK pending Arrival of out-of-order segment higher-than-expect seq. #. Gap detected Arrival of segment that partially or completely fills gap TCP Receiver action Delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK Immediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byte Immediate send ACK, provided that segment starts at lower end of gap Transport Layer 3-3

Fast Retransmit time-out period often relatively long: long delay before resending lost packet detect lost segments via duplicate ACKs. sender often sends many segments back-toback 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 Transport Layer 3-4

timeout Host A Host B X time Figure 3.37 Resending a segment after triple duplicate ACK Transport Layer 3-5

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 Transport Layer 3-6

TCP Flow Control receive side of TCP connection has a receive buffer: flow control sender won t overflow receiver s buffer by transmitting too much, too fast app process may be slow at reading from buffer speed-matching service: matching the send rate to the receiving app s drain rate Transport Layer 3-7

TCP Flow control: how it works (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 Transport Layer 3-8

Approaches towards congestion control Two broad approaches towards congestion control: end-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP network-assisted congestion control: routers provide feedback to end systems single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) explicit rate sender should send at Transport Layer 3-9

cwnd: congestion window size TCP congestion control: additive increase, multiplicative decrease approach: increase transmission rate (window size), probing for usable bandwidth, until loss occurs additive increase: increase cwnd by 1 MSS every RTT until loss detected multiplicative decrease: cut cwnd in half after loss 24 Kbytes congestion window saw tooth behavior: probing for bandwidth 16 Kbytes 8 Kbytes time time Transport Layer 3-10

TCP Congestion Control: details sender limits transmission: LastByteSent-LastByteAcked roughly, rate = cwnd RTT cwnd Bytes/sec cwnd is dynamic, function of perceived network congestion How does sender perceive congestion? loss event = timeout or 3 duplicate acks TCP sender reduces rate (cwnd) after loss event three mechanisms: AIMD slow start conservative after timeout events Transport Layer 3-11

RTT TCP Slow Start when connection begins, increase rate exponentially until first loss event: initially cwnd = 1 MSS Host A Host B double cwnd every RTT done by incrementing cwnd for every ACK received summary: initial rate is slow but ramps up exponentially fast time Transport Layer 3-12

Refinement: inferring loss after 3 dup ACKs: cwnd is cut in half window then grows linearly but after timeout event: cwnd instead set to 1 MSS; window then grows exponentially to a threshold, then grows linearly Philosophy: 3 dup ACKs indicates network capable of delivering some segments timeout indicates a more alarming congestion scenario Transport Layer 3-13

Refinement Q: when should the exponential increase switch to linear? A: when cwnd gets to 1/2 of its value before timeout. Implementation: variable ssthresh on loss event, ssthresh is set to 1/2 of cwnd just before loss event Transport Layer 3-14

Summary: TCP Congestion Control L cwnd = 1 MSS ssthresh = 64 KB dupackcount = 0 timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment duplicate ACK dupackcount++ slow start New ACK! new ACK cwnd = cwnd+mss dupackcount = 0 transmit new segment(s), as allowed cwnd > ssthresh L timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment timeout ssthresh = cwnd/2 cwnd = 1 dupackcount = 0 retransmit missing segment fast recovery duplicate ACK new ACK cwnd = cwnd + MSS (MSS/cwnd) dupackcount = 0 transmit new segment(s), as allowed cwnd = ssthresh dupackcount = 0 congestion avoidance New ACK! New ACK cwnd = cwnd + MSS transmit new segment(s), as allowed. New ACK! duplicate ACK dupackcount++ dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment Transport Layer 3-15

3-16 Transport Layer שאלה ממבחן )2009/10 ).34KB SS וקובע: 62KB נתון לקוח שמריץ אלגוריתם TCP Reno בזמן t 1 קרה אירוע ששינה את cwnd מ מה המאורע? ל MSS = 1KB התקבלו 3. dup acks כאשר TCP נמצא ב CA או ב ומתקבלים 3 dup acks הוא נכנס ל Recovery Fast sshresh = cwnd 2 cwnd = ssthres + 3MSS ssthresh מה ערך לפי האמור למעלה לאחר המאורע?,31KB

3-17 Transport Layer שאלה ממבחן )2009/10 ).1KB timeout 34KB נתון לקוח שמריץ אלגוריתם TCP Reno בזמן t 2 קרה אירוע ששינה את cwnd מ מה המאורע? או ב ל SS ויש CA נמצא ב TCP וקובע: sshresh = cwnd 2 cwnd = 1MSS MSS = 1KB אירע.timeout כאשר הוא חוזר ל SS ssthresh מה ערך לפי האמור למעלה לאחר המאורע?,17KB

3-18 Transport Layer שאלה ממבחן )מועד א' 2010/11( נתבונן בקישור TCP ובו Host A שולח נתונים ל B.Host הנתונים המוצגים נלקחו אחרי שהערוץ כבר פעיל זמן מה. אנו עוקבים אחר התנהגות ה Control Congestion של A לפי המודל המפושט של TCP Reno שהוצג בהרצאה ובו: חלון העומס cwnd משתנה רק אחרי השלמת השליחה של חלון cwnd שלם וקבלת כל ה acks שלו. אם באמצע סיבוב cwnd עובר את,ssthresh אזי בסוף הסיבוב ערכו של cwnd הוא בדיוק.ssthresh אם היה בסיבוב גם 3 dup acks וגם,timeout תהיה מדיניות הירידה לפי.timeout אין שימוש ביוריסטיקה שמאפשרת להגדיל את cwnd עבור dup acks שהתקבלו כבר ב retransmit fast )בפרט, לא מגדילים את cwnd להיות ssthresh+3 אלא פשוט קובעים אותו להיות.)ssthresh

שאלה ממבחן )מועד א' ) 2010/11 מהו ה - MSS של הקישור?,2000 לפי שלבי ה.CA ארוע מיוחד בשלב זה CC State ssthresh cwnd ש ל ב 1 33,000 2 3 4,000 4 8,000 5 16,000 6 18,000 7 20,000 8

שאלה ממבחן )מועד א' ) 2010/11 מלאו את החלקים החסרים בטבלה עפ"י הנתונים המופיעים בה. בטור "ארוע" יש לרשום אם ארע Timeout או 3Dup עבור אחד הסגמנטים ששודרו במסגרת החלון המתואר בשורה זאת. אם לא ארע ארוע כזה, יש לרשום "אין". קיבלנו גם תשובות שאמרו ש ssthresh בשלב 3 אינו יכול להיות 18,000 )עם כל השינויים שנגזרים מכך(, מפני שאז בשלב 0 )השלב שלפני שלב 1(, נקבל ש cwnd בדיוק עובר את.ssthresh לפי חוקי המינימום שהוגדרו לגרסת TCP הפשוטה שבשאלה, זה אומר שבשלב 1 צריך להיות = 33,000,cwnd מה שלא ייתכן מנתוני השאלה. ש ל ב CC State SSt / CA ssthresh 33,000 cwnd 16,000 / 34,000 1 ארוע מיוחד בשלב זה אין Timeout SSt / CA SSt 33,000 16,000 / 18,000 32,000 / 36,000 2 2000 3 אין " 4,000 4 SSt אין " 8,000 5 " אין CA / S.St " 16,000 6 אין " 18,000 7 CA אין " 20,000 8 " לא ידוע

) 2010/11 שאלה ממבחן )מועד א' מלאו את שורה 9 כהמשך לטבלה הקודמת בהנחה שבשלב זה ערך cwnd ירד. ארוע מיוחד בשלב זה CC State ssthresh SS / CA 33,000 אין Timeout SS / CA 33,000 cwnd 16,000 / 34,000 ש ל ב SS אין 16,000 / 18,000 32,000 / 36,000 1 2 2000 3 " 4,000 4 SS אין " 8,000 5 " אין " 16,000 6 CA SS / אין " 18,000 7 CA אין Timeout / 3 dup acks " " 20,000 8 SS / CA 10,000 לא ידוע 2,000 / 10,000 9

cwnd שאלה ממבחן )מועד א' ) 2010/11 שלב 18,000 7.0 18,222 7.1 18,442 7.2 נניח עתה כי בשלב 7 הערוץ פועל לפי TCP Reno "אמיתי", אשר מכונת המצבים שלו הוצגה בהרצאה. כלומר cwnd מתעדכן אחרי קבלת האישור של כל סגמנט. רשמו את cwnd אחרי קבלת האישורים של שני הסגמנטים הראשונים. זכור את הנוסחה ממכונת המצבים MSS cwnd = cwnd + MSS cwnd

שאלה ממבחן )מועד א' ) 2010/11 הסבירו מדוע מדיניות TCP Reno בתגובה ל- Triple.Timeout שונה מהמדיניות במקרה של Duplicate כאשר יש 3 dup acks סימן שאמנם היה,loss אבל זה גם סימן שהרשת העבירה סגמנטים כשורה לצד השני, כך שהיא עדיין מתפקדת, ולכן אפשר לנקוט בצעדים פחות דרסטיים להתמודדות עם ה.congestion כשיש Timeout אין לנו אינדיקציה שהרשת בכלל מתפקדת, ולכן אנחנו מניחים congestion חמור יותר.