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

Similar documents
Transport Layer PREPARED BY AHMED ABDEL-RAOUF

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

CSCI Topics: Internet Programming Fall 2008

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

PROBLEMSAND EXERCISES

CS321: Computer Networks Congestion Control in TCP

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

Problem Set 7 Due: Start of Class, November 2

Answers to Sample Questions on Transport Layer

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

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

CSCI Topics: Internet Programming Fall 2008

Chapter III: Transport Layer

CS4700/CS5700 Fundamentals of Computer Networks

CSCE 463/612 Networks and Distributed Processing Spring 2017

Review Questions for Midterm Exam-2 Fall 2016

Chapter 3 Transport Layer

Problem 7. Problem 8. Problem 9

Lecture 15: Transport Layer Congestion Control

Lecture 8. TCP/IP Transport Layer (2)

Transport Layer Congestion Control

CSC 4900 Computer Networks: TCP

CSCD 330 Network Programming Winter 2015

CS3600 SYSTEMS AND NETWORKS

Reliable Transport II: TCP and Congestion Control

Flow and Congestion Control (Hosts)

Mid Term Exam Results

Chapter 3 Review Questions

c. If the sum contains a zero, the receiver knows there has been an error.

Computer Networking Introduction

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

Chapter 3 Transport Layer

CNT 6885 Network Review on Transport Layer

Computer Networks Spring 2017 Homework 2 Due by 3/2/2017, 10:30am

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CC451 Computer Networks

Chapter 3 Transport Layer

TCP congestion control:

ECE 333: Introduction to Communication Networks Fall 2001

Congestion Control in TCP

COMP/ELEC 429/556 Introduction to Computer Networks

Lecture 4: Congestion Control

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

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

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

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

COMP/ELEC 429/556 Introduction to Computer Networks

a) Adding the two bytes gives Taking the one s complement gives

The Transport Layer Congestion control in TCP

6.033 Spring 2015 Lecture #11: Transport Layer Congestion Control Hari Balakrishnan Scribed by Qian Long

UNIT IV -- TRANSPORT LAYER

Homework 3 1 DNS. A root. A com. A google.com

Communication Networks

Congestion control in TCP

Reliable Transport II: TCP and Congestion Control

Congestion Control in TCP

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

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

Fall 2012: FCM 708 Bridge Foundation I

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

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

Assignment 7: TCP and Congestion Control Due the week of October 29/30, 2015

TCP Congestion Control. Lecture 16. Outline. TCP Congestion Control. Additive Increase / Multiplicative Decrease (AIMD)

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

CSC 8560 Computer Networks: TCP

Transport Protocols and TCP

Congestion Control in TCP

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

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

TCP over Wireless PROF. MICHAEL TSAI 2016/6/3

cs/ee 143 Communication Networks

Computer Networks. Homework #4: No Grading

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

Homework 3 50 points. 1. Computing TCP's RTT and timeout values (10 points)

CSCD 330 Network Programming

Transport Protocols and TCP: Review

TCP Congestion Control

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Review problems (for no credit): Transport and Network Layer

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

Application. Transport. Network. Link. Physical

Exercises TCP/IP Networking With Solutions

Goals of Today s Lecture! Congestion Control! Course So Far.! Congestion Control Overview! It s Not Just The Sender & Receiver! Congestion is Natural!

Preview Test: HW3. Test Information Description Due:Nov. 3

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

CSCD 330 Network Programming Spring 2018 Lecture 11a Transport Layer

Congestion Control in TCP

Chapter 3- parte B outline

Transmission Control Protocol (TCP)

Outline. CS5984 Mobile Computing

Hybrid Control and Switched Systems. Lecture #17 Hybrid Systems Modeling of Communication Networks

The Transport Layer: TCP & Congestion Control

TCP: Flow and Error Control

Practice Problems: P22, 23, P24, P25, P26, P27, P28, P29, P30, P32, P44 and P45. Hand-in the following: P27, P28, P32, P37, P44

CMPSCI 453 Fall Midterm 10/26/2008

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

Principles of congestion control

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

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class

Transcription:

ECE 610: Homework 4 Problems are taken from Kurose and Ross. Problem 1: Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 248. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 40 and 60 bytes of data, respectively. In the first segment, the sequence number is 249, the source port number is 503, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A. a) In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? b) If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? c) If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number? d) Suppose the two segments sent by A arrive in order at B. The first acknowledgement is lost and the second acknowledgement arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgements sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgement that you add, provide the acknowledgement number. Problem 2: Consider the following plot of TCP window size as a function of time. Assuming TCP Reno is the protocol experiencing the behavior shown below, answer the following questions. In all cases, you should provide a short discussion justifying your answer. a) Identify the intervals of time when TCP slow start is operating. b) Identify the intervals of time when TCP congestion avoidance is operating. c) After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? d) After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? e) What is the initial value of Threshold at the first transmission round? f) What is the value of Threshold at the 18th transmission round? g) What is the value of Threshold at the 24th transmission round? h) During what transmission round is the 70th segment sent? i) Assuming a packet loss is detected after the 26th round by the receipt o a triple duplicate ACK, what will be the values of the congestion window size and of the threshold? 1

Problem 3: Let s consider the question of fairness in TCP with the following model (see figure below). Let's consider the simple case of two TCP connections sharing a single link with transmission rate R. Assume that the two connections have the same MSS and RTT (so that if they have the same congestion window size then they have the same throughput), that they have a large amount of data to send and that no other TCP connections or UDP datagrams traverse this shared link. Also, ignore the slow-start phase of TCP and assume the TCP connections are operating in Congestion Avoidance mode (AIMD) at all times. Figure 3.55 plots the throughput realized by the two TCP connections. If TCP is to share the link bandwidth equally between the two connections, then the realized throughput should fall along the 45-degree arrow (equal bandwidth share) emanating from the origin. Ideally, the sum of the two throughputs should equal R. (Certainly, each connection receiving an equal, but zero, share of the link capacity is not a desirable situation!) So the 2

goal should be to have the achieved throughputs fall somewhere near the intersection of the equal bandwidth share line and the full bandwidth utilization line in Figure 3.55. Suppose that the TCP window sizes are such that at a given point in time, connections 1 and 2 realize throughputs indicated by point A in Figure 3.55. Because the amount of link bandwidth jointly consumed by the two connections is less than R, no loss will occur, and both connections will increase their window by 1 MSS per RTT as a result of TCP's congestion-avoidance algorithm. Thus, the joint throughput of the two connections proceeds along a 45-degree line (equal increase for both connections) starting from point A. Eventually, the link bandwidth jointly consumed by the two connections will be greater than R, and eventually packet loss will occur. Suppose that connections 1 and 2 experience packet loss when they realize throughputs indicated by point B. Connections 1 and 2 then decrease their windows by a factor of two. The resulting throughputs realized are thus at point C, halfway along a vector starting at B and ending at the origin. Because the joint bandwidth use is less than R at point C, the two connections again increase their throughputs along a 45-degree line starting from C. Eventually, loss will again occur, for example, at point D, and the two connections again decrease their window sizes by a factor of two, and so on. You should convince yourself that the bandwidth realized by the two connections eventually fluctuates along the equal bandwidth share line. You should also convince yourself that the two connections will converge to this behaviour regardless of where they are in the two-dimensional space! Figure 3.55 Throughput realized by TCP connections 1 and 2 Although a number of idealized assumptions lie behind this scenario, it still provides an intuitive feel for why TCP results in an equal sharing of bandwidth among connections. 3

In our idealized scenario, we assumed that only TCP connections traverse the bottleneck link, that the connections have the same RTT value, and that only a single TCP connection is associated with a host-destination pair. In practice, these conditions are typically not met, and client/server applications can thus obtain very unequal portions of link bandwidth. Refer to Figure 3.55, which illustrates the convergence of TCP's AIMD algorithm. Suppose that instead of a multiplicative decrease, TCP decreased the window size by a constant amount. Would the resulting AIAD algorithm converge to an equal share algorithm? Justify your answer using a diagram similar to Figure 3.55 Problem 4: Host A is sending an enormous file to Host B over a TCP connection. Over this connection there is never any packet loss and the timers never expire. Denote the transmission rate of the link connecting Host A to the Internet by R bps. Suppose that the process in Host A is capable of sending data into its TCP socket at a rate S bps, where S = 10R. Further suppose that the TCP receive buffer is large enough to hold the entire file, and the send buffer can hold only one percent of the file. What would prevent the process in Host A from continuously passing data to its TCP socket at rate S bps? TCP flow control? TCP congestion control? Or something else? Elaborate. Problem 5: Consider sending a large file from a host to another over a TCP connection that has no loss. a) Suppose TCP uses AIMD for its congestion control without slow start. Assuming CongWin increases by 1 MSS every time a batch of ACKs is received and assuming approximately constant round-trip times, how long does it take for CongWin to increase from 1 MSS to 6 MSS (assuming no loss events)? b) What is the average throughout (in terms of MSS and RTT) for this connection up through time = 5 RTT? Problem 6: Given the saw-toothed behavior of TCP, it's natural to consider what the average throughput (that is, the average rate) of a long-lived TCP connection might be. In this analysis we'll ignore the slow-start phases that occur after timeout events. (These phases are typically very short, since the sender grows out of the phase exponentially fast.) During a particular round-trip interval, the rate at which TCP sends data is a function of the congestion window and the current RTT. a) When the window size is w bytes and the current round-trip time is RTT seconds, then what is roughly the TCP's transmission rate? b) TCP then probes for additional bandwidth by increasing w by 1 MSS each RTT until a loss event occurs. Denote by W the value of w when a loss event occurs. Assuming that RTT and W are approximately constant over the duration of the connection, the TCP transmission rate ranges from W/(2. RTT) to W/RTT. These assumptions lead to a 4

highly simplified macroscopic model for the steady-state behavior of TCP. The network drops a packet from the connection when the rate increases to W/RTT, the rate is then cut in half and then increases by MSS/RTT every RTT until it again reaches W/RTT. This process repeats itself over and over again. Noting that the TCP's throughput (that is, rate) increases linearly between the two extreme values, give a formula for the average throughput of a connection. c) Recall the macroscopic description of TCP throughput. In the period of time from when the connection's rate varies from W/(2. RTT) to W/RTT, only one segment is lost (at the very end of the period). Show that the loss rate (fraction of packets lost) is equal to d) Use the result above to show that if a connection has loss rate L, then its average rate is approximately given by Problem 7: In our discussion of TCP congestion control, we implicitly assumed that the TCP sender always had data to send. Consider now the case that the TCP sender sends a large amount of data and then goes idle (since it has no more data to send) at t1. TCP remains idle for a relatively long period of time and then wants to send more data at t2. What are the advantages and disadvantages of having TCP use the Congestion Window and Threshold values from t1 when starting to send data at t2? What alternative would you recommend? Why? 5