Tutorial 1 (Week 6) Introduction



Similar documents
Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

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

Final for ECE374 05/06/13 Solution!!

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

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

Transport Layer Protocols

Computer Networks - CS132/EECS148 - Spring

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

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Computer Networks - CS132/EECS148 - Spring

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

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Computer Networks Homework 1

First Semester Examinations 2011/12 INTERNET PRINCIPLES

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

Computer Networks UDP and TCP

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

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

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

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

Data Networks Summer 2007 Homework #3

2 TCP-like Design. Answer

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

CMPE 150 Winter 2009

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

Computer Networks. Data Link Layer

15-441: Computer Networks Homework 2 Solution

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

TCP in Wireless Mobile Networks

Sample Network Analysis Report

Solutions to the Sample Questions on Introduction

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

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

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

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

Introduction. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

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

Advanced Computer Networks Project 2: File Transfer Application

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

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

Key Components of WAN Optimization Controller Functionality

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

Computer Networks. Chapter 5 Transport Protocols

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

(Refer Slide Time: 02:17)

Digital Audio and Video Data

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

Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15

LESSON Networking Fundamentals. Understand TCP/IP

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Referring to the above question, the end-to-end delay (transmission delay plus propagation delay) is

SJBIT, Bangalore, KARNATAKA

IP - The Internet Protocol

Mobile Computing/ Mobile Networks

This sequence diagram was generated with EventStudio System Designer (

Access Control: Firewalls (1)

Per-Flow Queuing Allot's Approach to Bandwidth Management

Lecture Computer Networks

Chapter 6 Congestion Control and Resource Allocation

CSE 123b Communications Software

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Behavior Analysis of TCP Traffic in Mobile Ad Hoc Network using Reactive Routing Protocols

[Prof. Rupesh G Vaishnav] Page 1

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Visualizations and Correlations in Troubleshooting

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

Delay, loss, layered architectures. packets queue in router buffers. packets queueing (delay)

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Mobile Communications Chapter 9: Mobile Transport Layer

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

ECE/CS 372 introduction to computer networks. Lecture 2. Midterm scheduled for Tuesday, May 7 th

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

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

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Low-rate TCP-targeted Denial of Service Attack Defense

TCP over Wireless Networks

Operating Systems and Networks Sample Solution 1

EKSAMEN / EXAM TTM

Chapter 5. Transport layer protocols

IP Subnetting and Addressing

Multiple Choice Questions

CSE 123: Computer Networks

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

High Speed Internet Access Using Satellite-Based DVB Networks

1 An application in BPC: a Web-Server

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

Data Link Layer. Flow Control. Flow Control

CPS221 Lecture: Layered Network Architecture

ECE 333: Introduction to Communication Networks Fall 2002

TCP for Wireless Networks

High Performance VPN Solutions Over Satellite Networks

Chapter1: Exercises. Silvia Giordano ICA, EPFL. Project e-1

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

Mathematical Modelling of Computer Networks: Part II. Module 1: Network Coding

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Network Layer: Network Layer and IP Protocol

Ethernet. Ethernet. Network Devices

Improved Digital Media Delivery with Telestream HyperLaunch

Transcription:

COMP 333/933 Computer Networks and Applications Tutorial (Week 6) Introduction Problem Set, Question 7 Suppose two hosts, A and B are separated by, kms and are connected by a direct link of R = Mbps. Suppose the propagation speed over the link is 2.5 x 8 m/s. (a) Calculate the bandwidth-delay product, R.t prop Answer: The propagation delay, tprop =, x 3 /2.5 x 8 = 4 msec. Hence, the bandwidth delay product = 4 msec x Mbps = 4, bits. (b) Consider sending a file of 4, bits from A to B. Suppose the file is sent continuously as one big message. What is the maximum number of bits that will be in the link at any given time? Answer: This is same as (a), i.e., 4, bits. (c) How long does it take to send the above file if it is sent continuously? Answer: t trans + t prop = 4 msec + 4 msec = 44 msec (d) Suppose now that the file is broken up into packets with each packet containing 4, bits. Suppose that each packet is acknowledged by the receiver and the transmission time of an acknowledgement packet is negligible. Finally, assume that the sender cannot send a packet until the preceding packet is acknowledged. How long does it take to send the file? Answer: The delay to send each packet will be t trans + t prop. However there is an additional t prop delay for the acknowledgement packet to arrive at the sender, prior to which the next packet can be transmitted. Hence the total delay to transmit packet is = * (t trans + 2 t prop ) = *(4 msec + 8 msec) =.2 sec Application Layer Problem Set 2, Question 2 Consider the figure below, for which there is an institutional network connected to the Internet. Suppose that the average object size is 9, bits and that that the average request rate from the institution s browsers to the origin server is.5 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards a HTTP request until it receives the response in two seconds on average. Model the total average response time as the sum of the average access delay and the average Internet delay. For the average access delay, use A/(-AB) where A is the average time required to send an object over the access link and B is the arrival rate of objects to the access link. You can assume that the HTTP request messages are negligibly small and thus create no traffic on the network or the access link.

COMP 333/933 Computer Networks and Applications origin servers Public Internet institutional network.5 Mbps access link Figure : Figure for web cache problem institutional cache (a) Find the total average response time. Answer: The time to transmit an object of size L over a link of rate R is L/R. The average time is the average size of the object divided by the transmission rate of the link, R: X = (9, bits)/(,5, bits/sec) =.6 sec The traffic intensity on the link is = AB= (.5 requests/sec)(.6 msec/request) =.9. Thus, the average access delay is (.6 sec)/( -.9) = 6 seconds. The total average response time is therefore 6 sec + 2 sec = 8 sec. (b) Now suppose a cache is installed in the institutional LAN. Suppose the hit rate is.4. Find the total response time. Answer: The traffic intensity on the access link is reduced by 4% since the 4% of the requests are satisfied within the institutional network. Thus, the arrival rate of the objects to the link also changes since only 6% of the objects need to be fetched from the origin servers (the rest are obtained from the cache). As a result, B=.5 x.6 =.9 requests/sec. Thus the average access delay is (.6 sec)/[ (.6)(.9)] =.2 seconds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability.4); the average response time is.2 sec + 2 sec = 3.2 sec for cache misses (which happens 6% of the time). So the average response time is (.4)( sec) + (.6)(3.2 sec) =.92 seconds. Thus the average response time is reduced from 8 sec to.92 sec. 2

COMP 333/933 Computer Networks and Applications Question: Consider an HTTP client that wants to retrieve a web document at a given URL. The IP address of the HTTP server is initially unknown. The web document at the URL has one embedded GIF image that resides at the same server as the original document. What transport and application layer protocols besides HTTP are needed in this scenario? Answer: Before the HTTP GET request can be sent for the web document, the HTTP client needs to obtain the IP address of the HTTP server hosting the document. So a DNS request is sent out to obtain the hostname to IP address mapping. Recall that DNS runs over UDP. Once the mapping is obtained, the HTTP client first establishes a TCP connection with the server (Recall that HTTP runs over TCP). Following the TCP connection establishment a GET request for the web document is sent over this connection. In summary, the following are the protocols that are used: Application layer protocols: DNS and HTTP Transport layer protocols: UDP for DNS; TCP for HTTP Transport Layer Problem Set 3, Question 3: Solution is in the file Transport_Q3_Answer.pdf 3

COMP 333/933 Computer Networks and Applications Problem Set 3, Question 6 Consider the GBN and SR protocols. Suppose the sequence number space of size k. What is the largest allowable sender size window that will avoid the occurrence of the problems such as that in Figure 3.27 (of the textbook or as discussed towards the end of Week 4 lecture slides). Answer: In order to avoid the scenario of Figure 3.27, we want to avoid having the leading edge of the receiver's window (i.e., the one with the highest sequence number) wrap around in the sequence number space and overlap with the trailing edge (the one with the "lowest" sequence number in the sender's window). That is, the sequence number space must be large enough to fit the entire receiver window and the entire sender window without this overlap condition. So we need to determine how large a range of sequence numbers can be covered at any given time by the receiver and sender windows. Suppose that the lowest-sequence number that the receiver is waiting for is packet m. In this case, its window is [m, m+w-] and it has received (and ACKed) packet m- and the w- packets before that, where w is the size of the window. If the sender has yet received none of those w ACKs, then ACK messages with values of [m-w, m-] may still be propagating back. If the sender has received no ACKs with these ACK numbers, then the sender's window would be [m-w, m-]. Thus, the lower edge of the sender's window is m-w, and the leading edge of the receiver s window is m+w-. In order for the leading edge of the receiver's window to not overlap with the trailing edge of the sender's window, the sequence number space must thus be big enough to accommodate 2w sequence numbers. That is, the sequence number space must be at least twice as large as the window size, k 2w. 4

COMP 333/933 Computer Networks and Applications Question: Look at the graph in Figure 3 showing how the congestion window is changed over time in a TCP Reno connection. Certain parts of the graph that are of extra interest have been marked with numbers. Looking at the graph, answer the following questions. Figure 3: Congestion Window for a TCP Reno Connection (a) What is the difference of the loss events happening at and 2 in the figure? Explain why the effect on the size of the congestion window is different in the two cases. Answer: At a loss was detected through triple duplicate ACKs, while at 2 it was detected through a timeout. Since a timeout is considered worse than triple duplicate ACKs, the congestion window is decreased more drastically in that case. (b) Look at the circled segment marked as 3. What phase do you think that TCP is in? Answer: Slow Start. (c) Look at the circled segment marked as 4. What phase do you think that TCP is in? Answer: Congestion Avoidance. (d) Why is the congestion window increased more rapidly in 3 than at 4? Answer: To rapidly increase the transmission rate so that it can approach the capacity of the network briskly. This prevents the wastage of resources that would result with additive increase. Question: UDP and TCP use s complement for their checksms. Suppose you have the following three 8-bit bytes:,,. What is the s complement of the sum of these 8-bit bytes? (Note although TCP and UDP use 6-bit words in computing the checksum, for this problem we will only consider 8-bit summands). Show 5

COMP 333/933 Computer Networks and Applications all work. Why is that UDP takes s complement of the sum, that is, why not just use the sum? With the s complement scheme, how does the receiver detect errors? Is it possible that a -bit error will go undetected? How about a two-bit error? Answer: + + One's complement =. To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a and the last digit of the second word is converted to a ). Question: Consider a situation where you want to transfer a very large file of L bytes from Host A to Host B. Assume an MSS of,46 bytes. (7 marks) (a) What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field has 4 bytes. Answer: There are 2 32 = 4,294,967, 296 possible sequence numbers. The sequence number does not increment by one with each segment. Rather, it increments by the number of bytes of data sent. So the size of the MSS is irrelevant -- the maximum size file that can be sent from A to B is simply the number of bytes representable by 2 32 4.9 Gbytes. (b) For the value of L computed in part (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network and data-link header are added to each segment before the resulting packet is sent out over a Mbps link. Ignore flow control and congestion control so that A can pump the segments back to back continuously. 2 32 Answer: The number of segments is = 2,94, 758 46. 66 bytes of header get added to each segment giving a total of 94,56,28 bytes of header. The total 6

COMP 333/933 Computer Networks and Applications 32 7 number of bytes transmitted is 2 + 94,56,28 = 3,59 bits. Thus it would take 3,59 seconds = 59 minutes to transmit the file over a ~Mbps link. Question: Consider a channel that can lose packets but has a maximum RTT that is known. Modify protocol rdt2. to include sender timeout and retransmit. Informally argue why your protocol can communicate correctly over this channel. Answer: Here, we add a timer, whose value is greater than the known round-trip propagation delay. We add a timeout event to the Wait for ACK or NAK and Wait for ACK or NAK states. If the timeout event occurs, the most recently transmitted packet is retransmitted. Let us see why this protocol will still work with the rdt2. receiver. Suppose the timeout is caused by a lost data packet, i.e., a packet on the senderto-receiver channel. In this case, the receiver never received the previous transmission and, from the receiver's viewpoint, if the timeout retransmission is received, it look exactly the same as if the original transmission is being received. Suppose now that an ACK is lost. The receiver will eventually retransmit the packet on a timeout. But a retransmission is exactly the same action that is take if an ACK is garbled. Thus the sender's reaction is the same with a loss, as with a garbled ACK. The rdt 2. receiver can already handle the case of a garbled ACK 7