15-441: Computer Networks Homework 2 Solution

Similar documents
Data Networks Summer 2007 Homework #3

Answer: that dprop equals dtrans. seconds. a) d prop. b) d trans

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

TCP in Wireless Mobile Networks

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Computer Networks - CS132/EECS148 - Spring

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Final for ECE374 05/06/13 Solution!!

17: Queue Management. Queuing. Mark Handley

First Midterm for ECE374 03/24/11 Solution!!

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

First Midterm for ECE374 03/09/12 Solution!!

First Midterm for ECE374 02/25/15 Solution!!

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Digital Audio and Video Data

TCP over Wireless Networks

AN IMPROVED SNOOP FOR TCP RENO AND TCP SACK IN WIRED-CUM- WIRELESS NETWORKS

QoS issues in Voice over IP

Computer Networks Homework 1

Sources: Chapter 6 from. Computer Networking: A Top-Down Approach Featuring the Internet, by Kurose and Ross

Low-rate TCP-targeted Denial of Service Attack Defense

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

CSE 123: Computer Networks

Requirements of Voice in an IP Internetwork

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Congestions and Control Mechanisms n Wired and Wireless Networks

CH.1. Lecture # 2. Computer Networks and the Internet. Eng. Wafaa Audah. Islamic University of Gaza. Faculty of Engineering

Burst Testing. New mobility standards and cloud-computing network. This application note will describe how TCP creates bursty

Improving our Evaluation of Transport Protocols. Sally Floyd Hamilton Institute July 29, 2005

Mobile Communications Chapter 9: Mobile Transport Layer

Lecture 33. Streaming Media. Streaming Media. Real-Time. Streaming Stored Multimedia. Streaming Stored Multimedia

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

A Survey: High Speed TCP Variants in Wireless Networks

Comparative Analysis of Congestion Control Algorithms Using ns-2

2 TCP-like Design. Answer

Transport Layer Protocols

Per-Flow Queuing Allot's Approach to Bandwidth Management

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Sources: Chapter 6 from. Computer Networking: A Top-Down Approach Featuring the Internet, by Kurose and Ross

ECE 333: Introduction to Communication Networks Fall 2002

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

Mul$media Networking. #3 Mul$media Networking Semester Ganjil PTIIK Universitas Brawijaya. #3 Requirements of Mul$media Networking

Professor: Ian Foster TAs: Xuehai Zhang, Yong Zhao. Winter Quarter.

Stop And Wait. ACK received; transmit frame 2 CS 455 3

TCP PACKET CONTROL FOR WIRELESS NETWORKS

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

TCP Westwood for Wireless

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

Requirements for Simulation and Modeling Tools. Sally Floyd NSF Workshop August 2005

The network we see so far. Internet Best Effort Service. Is best-effort good enough? An Audio Example. Network Support for Playback

Computer Networks. Chapter 5 Transport Protocols

TCP based Denial-of-Service Attacks to Edge Network: Analysis and Detection

Analysis of IP Network for different Quality of Service

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

TCP for Wireless Networks

Voice over IP: RTP/RTCP The transport layer

Network Performance: Networks must be fast. What are the essential network performance metrics: bandwidth and latency

TCP, Active Queue Management and QoS

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Chapter 6 Congestion Control and Resource Allocation

Active Queue Management

TCP Adaptation for MPI on Long-and-Fat Networks

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

Classes of multimedia Applications

SJBIT, Bangalore, KARNATAKA

Denial-of-Service Shrew Attacks

Passive Queue Management

Effects of Filler Traffic In IP Networks. Adam Feldman April 5, 2001 Master s Project

Advanced Networking Voice over IP: RTP/RTCP The transport layer

Packet Queueing Delay

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

CS268 Exam Solutions. 1) End-to-End (20 pts)

Multimedia Requirements. Multimedia and Networks. Quality of Service

Basic Multiplexing models. Computer Networks - Vassilis Tsaoussidis

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Homework Assignment #1 Solutions

TCP/IP Performance with Random Loss and Bidirectional Congestion

Homework 3 assignment for ECE374 Posted: 03/13/15 Due: 03/27/15

GREEN: Proactive Queue Management over a Best-Effort Network

Chapter 3 ATM and Multimedia Traffic

CSE3214 Computer Network Protocols and Applications. Chapter 1 Examples and Homework Problems

What is Network Latency and Why Does It Matter?

Broadband Networks. Prof. Dr. Abhay Karandikar. Electrical Engineering Department. Indian Institute of Technology, Bombay. Lecture - 29.

Optimal Bandwidth Monitoring. Y.Yu, I.Cheng and A.Basu Department of Computing Science U. of Alberta

Performance Analysis of AQM Schemes in Wired and Wireless Networks based on TCP flow

Performance Evaluation of AODV, OLSR Routing Protocol in VOIP Over Ad Hoc

La couche transport dans l'internet (la suite TCP/IP)

Transcription:

5-44: omputer Networks Homework 2 Solution Assigned: September 25, 2002. Due: October 7, 2002 in class. In this homework you will test your understanding of the TP concepts taught in class including flow control, congestion control, and reliability. You must solve the homework individually. Make sure you provide all your answers in the space provided in the end. For full credit, show your work in clearly readable writing. Points will be deducted for unreadable answers. The following notation should be used for all the calculations. Parameter Description Units Maximum Segment Size bytes/packet Window Size packets Window Size bytes Round trip time seconds or Throughput bits/sec Utilization dimensionless percentage Loss rate dimensionless proportion/probability Table : Notation of parameters to be used throughout the assignment TP Basics. True or False? (a) Host A is sending a large file to host B over a TP connection. Assume host B has no data to send to host A. Host B will not send acknowledgments to host A because host B cannot piggyback the acknowledgments on data. Answer: FALSE. Piggybacking is an optimization that is used when both sides have to send data to each other so that the receiver, instead of sending two packets i.e., an AK and a data packet, it just sends one. When the receiver (B) does not have any data to send, it will still send an AK with the sequence number field containing the next sequence of data it is supposed to send. (b) The size of the TP RcvWindow never changes throughout the duration of the connection. Answer: FALSE. RcvWindow is used to give the sender an idea of how much free buffer space is available at the receiver. Thus as the amount of unacknowledged TP data varies the RcvWindow also changes. (c) Suppose host A is sending a large file to host B over a TP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the advertised receiver buffer. Answer: TRUE. TP is not permitted to overflow the allocated receiver buffer. Hence when the sender can not send any more data RcvWindow would be 0 and hence all the buffer would have unacknowledged data.

7 6 (d) Suppose that the last SampleRTT in a TP connection is equal to sec. Then the current value of TimeoutInterval for the connection will necessarily be sec. Answer: FALSE. Depending on the value of or EstimatedRTT it may or may not be greater than. 2. Suppose host A is sending a large file to host B over a TP connection. The two end hosts are 0msec apart (20msec RTT) connected by a Gbps link. Assume that they are using a packet size of 000 bytes to transmit the file. Also assume for simplicity that AK packets are extremely small and can be ignored. (a) At least how big would the window size (in packets) have to be for the channel utilization to be greater than 80%. Answer: Bandwidth-delay product of A to B!. For 80% utilization, it will be "# %$ &'( "$ )* +,!. Number of packets.-+/ 8-94:4;4 023-54 < =8>?@A!. (b) Assuming infinite initial threshold, no losses and competing traffic, approximately how long (in seconds) would it take for the normal slow start mechanism to achieve 80% utilization? Answer: Number of RTTs BEDGFH"IKJG MLONP QR. Time SK * %T 3$ KUMAV?. 3. TP waits until it has received three duplicate AKs before performing a fast retransmit. Why do you think the TP designers chose not to perform a fast retransmit after the first duplicate AK for a segment is received? Answer: Packets can arrive out of order from the IP layer. So whenever an out of order packet would be received it would generate a duplicate AK and if we perform retransmission after the first duplicate AK it would lead the sender to introduce too many redundant packets in the network. 2 TP Security onsider a misbehaving TP receiver. The receiver modifies its TP such that upon receiving a data segment containing W bytes, the receiver divides the resulting acknowledgment into, where YX W, separate acknowledgments each covering one of distinct pieces of the received data segment. For e.g. if it receives data acknowledging bytes to 000, then the receiver, for <, will send 2 AKs for 50 and 00. onsider a normal TP sender sending data to this misbehaving TP receiver. The sender sends a 500 byte packet with sequence number. The receiver sends back <Z AKs.. What packets will the sender send next in response to the 3 AKs? Answer: Response will be packets with byte sequence numbers 50, 300, 450 and 600. 2. Assuming no losses and negligible packet transmission time, derive an expression for the sender window size during the slow start phase, in terms of [ (number of RTTs) and. Answer: For each outgoing packet, the receiver sends back AKs. The sender will increment the?\][_^ by. So if initially the window was, after RTT the window size will be N<. In the second RTT, the sender sends NR packets (the window size) and receives `J N L AKs. So now the window will increase by `J N L and become `J NR LaN N J N L I. After [ RTTs, the window size will be J NP VL5b. 3. an you think of a simple enhancement to the sender which can prevent the receiver from launching this attack? Answer: One solution is that the sender should advance the congestion window at byte granularity rather than packet granularity. Hence?\][_^ will be incremented not by a full MSS but only proportional to the amount of data acknowledged. Another solution is to increment?\[_^ by one MSS when a valid AK arrives covering the entire data segment sent. 2

3 RED/AQM onsider a bursty greedy source. Would RED drop more packets for this source or Droptail? Explain briefly your answer. Answer: Bursty traffic suffers more losses with drop tail than RED gateways. onsider the case when the queue gets almost full. In droptail gateways an arrival of a burst would result in several losses as most of the burst will be lost. In contrast in RED gateways, it drops packets early so as not to allow the queue to grow fully. So when a burst arrives, it will only drop some of the packets of the burst. The number of packets dropped will be roughly proportional to their share of the bandwidth. Hence the bursty flow should lose fewer packets in RED. 4 Fast Recovery and TP Modelling Note: Remember to use Table for all symbols and units. Points will be lost for incorrect units.. Harry Bovik says that when during steady state, achieved TP throughput should be 75% of the bottleneck bandwidth. His reasoning is that when the throughput reaches 00% of the bottleneck, there is a packet drop causing the window to be halved to 50% and then it increases linearly back to 00% repeating the same cycle. Is he right or wrong? Explain briefly your answer. Answer: He is wrong. The achieved throughput should be close to 00% because of router buffers. As the TP connection starts sending at rates higher than the bottleneck bandwidth the buffers start to fill up until there is a packet loss. Now the TP will reduce its rate to 50% of that high rate and so on the average TP will be sending at much higher rate than 75% of the bottleneck bandwidth. 2. Let \ represent the congestion window size in TP during steady state. The idealized congestion window size varies from I to during steady state and then a loss occurs. Suppose an additional constraint is added such that the maximum receiver window size for a connection is set to. Assuming a loss occurs when the congestion window has a size of, W (a) Find the loss rate for this TP connection in terms of per loss cycle Answer: Solution (correct): 7 to = 7 7 N I- J 7 N L 7 - - I 7 I Loss rate - - I 7 - Solution 2 (accepted with full points): I to = I I N I- J I N L -;- I I Loss rate - I -;-. Hint : alculate the number of packets sent Approximate Number of Packets sent = Area under the graph = rectangular region + trapezium region Approximate Number of Packets sent = Area under the graph = rectangular region + trapezium region 3W/4 3W/4 W/2 3W/8 W/4 RTT W/2 RTT Time sec. 3W/8 RTT 5W/8 RTT Time sec. Figure : Answer 4.3 : TP Window with flow control (b) Derive an expression for the achieved throughput in terms of and. Answer: Solution (correct): 7 to From previous answer, - I 7 -. 3

7 7 Replacing with bps --542 - I 7 and simplifying we get - -54 I Solution 2 (accepted with full points): I to From previous answer, I. -:- -:- I Replacing with I and simplifying we get -:- I I:I bps 5 ongestion ontrol Harry Bovik thinks that if the sources in the Internet use additive increase additive decrease (AIAD) the system should still converge to fairness and efficiency. onnection 2 throughput Region I Region II Region III Region IV onnection throughput Figure 2: TP Phase-plot Harry decides to use phase-plots (see pg. 269 of the book) to check his intuition for the two-user case. Figure 2 shows a simple phase plot. In the graph, the state of the system is represented by a point (x, x2), where x is stream s current rate and x2 is stream 2 s current rate. The total capacity of the link is bits/s. Assume that after the packet loss the window sizes have been reduced according to AIAD and now the system state is in either one of the labelled regions.. On the figure, for each of the labelled regions, I, II, III, and IV, draw vectors indicating the direction in which the system will move next i.e., after the AIAD response to the packet loss. Answer: See Figure 3. 2. In each of the following regions, does the response after the packet loss increase, reduce or keep fairness the same? Region I: Answer: Increases Region II: Answer: Decreases 4

onnection 2 throughput Region I Region II Region III Region IV onnection throughput Figure 3: Answer 5. : TP Phase-plot Region III: Answer: Decreases Region IV: Answer: Increases On the 45 degree line through the origin: Answer: Unchanged 3. Does Harry s scheme converge to a fair allocation? Explain your answer briefly. Answer: No it does not. Both the connections will decrease their share equally on a packet loss (additive decrease) rather than in proportion to their share of (multiplicative decrease). Similarly both the connections will attempt to grab bandwidth equally when it is available. So the movement will remain on the 45 degree line parallel to the fairness line based on their initial starting point. 4. Does Harry s scheme converge to an efficient allocation? Explain your answer briefly. Answer: Yes it does. They adaptively increase their share when they are below the efficiency line (Regions I and IV) to move towards the efficiency line. Similarly they decrease their share on losses and hence move towards the efficiency line when they are above the efficiency line (Regions II and III). 6 Multimedia. Harry Bovik decides that for his video application to recover from losses over the Internet he should set the video buffer playout time equal to the current RTT to the sender. He runs his multimedia application playing videos from all around the world. He notices that for larger RTT values his video works fine while for shorter RTT values his video misses several frames. What is the mistake that Harry is making? Answer: The buffer playout time should be based on the delay jitter rather than end-to-end delay (RTT) to ensure smooth playing. In this case what is happening is that for shorter RTTs the jitter is more than the RTT and these delayed packets result in missed frames while for large RTT values, the jitter is smaller than the RTT and so fewer packets are missed. 2. Why do you think TP is not used for streaming multimedia (audio, video) files? Answer: Providing timely delivery is more crucial in multimedia applications than providing reliability. The multimedia applications can tolerate occasional losses without any need to retransmit all the lost packets. In regards to congestion control, multimedia applications usually have their own application level mechanisms to handle congestion because it often requires understanding of the application data (e.g. B, I and P frames in mpeg) and TP is not a suitable layer for providing such congestion control mechanisms. 5

3. Harry Bovik says that since there are negligible losses within the US, the streaming multimedia applications do not need to have a playback buffer in US. What would be your response? Answer: The playback buffer is required to smooth out the video. Delay variance causes packets to arrive after their playout time and hence are missed. The playback buffer is needed even if there are no losses. 7 Reliability For all parts of this question, refer to figure 4. The graph shows the packets sent and AKs received by a TP Reno sender. The x-axis shows the time in seconds and the y-axis shows the sequence number of the packet (or AK) being sent (or received). Assume that all packets that are not lost will arrive in order at both the sender and receiver. Also assume that receiver keeps all the out of order received packets. Seqno 50.0000 Sender view of packets and AKs in TP Reno Packets AKs 45.0000 40.0000 35.0000 30.0000 25.0000 20.0000 5.0000 0.0000 5.0000 0.0000 0.0000.0000 2.0000 3.0000 4.0000 Time Figure 4: Reno : Fast Retransmission. Mark on the x-axis of the graph, the time interval when the connection is in slow-start. Answer: Slow start is approximately from time 0 to.4sec, 2.2 to 3. sec, and 3.5 to 3.7 (though it is fine if you missed this last one). 2. Mark the packets (if any) with that are lost. Answer: Packet Numbers: 25, 26, 27, 29, 32, 36, 4, 46, 47, 48, 49 6

3. Mark the duplicate packets received by the receiver (if any) with a. Answer: Packet Numbers: 28(2nd), 30(2nd), 3(2nd), 33(2nd), 34(2nd), 35(2nd), 36(3rd), 37(2nd), 38(2nd), 39(2nd), 40(2nd), 4(3rd), 42(2nd), 43(2nd), 44(2nd), 45(2nd), 46(3rd), 50(2nd) 4. Mark the timed out packet (if any) with a T. Answer: Packet Number: 26 5. Draw on the graph an approximate curve showing how a Tahoe TP Sender would behave. Answer: Tahoe will behave the same as Reno for the first.5sec. Then while Reno would wait for a timeout, Tahoe will start slow start around.5sec and continue roughly parallel to Reno but being about sec earlier than Reno. 7