CSE 489/589 – Spring 2017 Homework #1
Due: February 28th 2017, at the beginning of class
You should work on this homework individually or in teams of up to 3 members (highly recommended). One submission per team.
0) Academic integrity – Print the following statement: “I (We) have read and understood the course academic integrity policy located under this link: http://www.cse.buffalo.edu/faculty/dimitrio/courses/cse4589_s17/index.html#integrity”. Your submission will NOT be graded without this statement.
Chapter 1:
1) Circuit/packet switching – Suppose users share an 8 Mbps link. Also suppose each user requires a constant bitrate of 2 Mbps when transmitting, but each user transmits only 25% of the time.
- a) When circuit switching is used, how many users can be supported? (5 points)
- b) For the remainder of the question, suppose packet switching is used. Will there be any queuing delay before the link if 4 or fewer users transmit simultaneously? (5 points)
- c) Find the probability that a given user is transmitting. (5 points)
- d) Suppose there are 5 users. Find the probability that at any given time, all 5 users are
transmitting simultaneously. (2.5 points) Find the fraction of time during which the queue grows. (2.5 points)
2) Transmission delay and propagation delay – Consider two hosts, A and B, directly connected by a link of 2500 Km, propagation speed 2.5*108 m/s, and transmission rate 8 Mbps. Assume zero queuing delay.
- a) How long does it take to move a packet of length 1000 bytes from one A to B? (3 points)
- b) Assume the transmission time of the packet is dtrans and the propagation delay dprop.
Suppose that host A begins to transmit a packet at time t=0. At time t= dtrans where is the
last bit of the packet? (3 points)
- c) Suppose dprop is greater than dtrans. At time t= dtrans, where is the first bit of the packet? (3
points)
- d) Suppose dprop is less than dtrans. At time t= dtrans, where is the first bit of the packet? (3
points)
- e) You want to urgently deliver 40 terabytes of data from Buffalo to San Francisco. You
have available a 100 Mbps dedicated link for the data transfer. Would you transmit the data over this link or use FedEx overnight delivery instead? Explain (write down any assumptions). (4 points)
3) Bandwidth-delay product – Suppose two hosts, A and B, are separated by 30,000 Km and are connected by a direct link of R=3 Mbps. Suppose the propagation speed over the link is 2.5*108 m/s.
a) Calculate the bandwidth-delay product R* dprop. (2 points)
- b) Consider sending a file of 1,200,000 bits from host A to host B. Suppose the file is sent continuously as a large message. What is the maximum number of bits that will be in the link at any time? (2 points)
- c) What is the width (in meters) of a bit in the link? (2 points)
- d) Repeat (a), (b) and (c) but now with a link of 3 Gbps. (6 points)
4) Store-and-forward – Consider a packet of length L which begins at Host A and travels over three links to Host B. These three links are connected by two store-and-forward packet switches. Let di, si, Ri denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2, 3. The packet switch delays each packet by dproc.
- a) Assuming no queuing delays, in terms of di, si, Ri (i = 1, 2, 3), and L, what is the total end-to-end delay for the packet? (5 points)
- b) Now suppose R1 = R2 = R3 = R and dproc = 0. Further suppose the packet switches do not store-and-forward but instead immediately transmit each bit they receive before waiting for the entire packet to arrive. What is the end-to-end delay? (5 points)
Chapter 2:
5) HTTP performance – Here, we consider the performance of HTTP, comparing non- persistent HTTP with persistent HTTP. Suppose the page your browser wants to download is 100 Kbits long, and contains 5 embedded images, each of which is 100 Kbits long. The page and the 5 images are stored on the same server, which has 300 msec roundtrip time (RTT) from your browser. We will abstract the network path between your browser and the Web server as a 100 Mbps link. You can assume that the time it takes to transmit a GET message into the link is zero, but you should account for the time it takes to transmit the base file and the embedded objects into the “link”. This means that the server-to-client “link” has both a 150 msec one-way propagation delay, as well as a transmission delay associated with it. In your answers, be sure to account for the time needed to set up a TCP connection (1 RTT).
- a) Assuming non-persistent HTTP (and assuming no parallel connections are open between the browser and the server), how long is the response time – the time from when the user requests the URL to the time when the page and its embedded images are displayed? Be sure to describe the various components that contribute to this delay. (8 points)
- b) Again, assume non-persistent HTTP, but now assume that the browser can open as many parallel TCP connections to the server as it wants. What is the response time in this case? (8 points)
- c) Now assume persistent HTTP (HTTP 1.1). What is the response time assuming no pipelining? (8 points)
- d) Now assume persistent HTTP with pipelining is used. What is the response time? (8 points)
6) BitTorrent – Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to other peers (also called free-riding).
a) Can Bob receive a complete copy of the file that is shared by the swarm? Why or why not? (5 points)
b) Bob claims that he can make his “free-riding” more efficient by using a collection of multiple computers with distinct IP addresses in the computer lab in his department. How can he do that? (5 points)
7) Bonus problem – Consider a short, 10-meter link, over which a sender can transmit at a rate of 150 bits/sec in both directions. Suppose that packets containing data are 100,000 bits long, and packets containing only control (e.g., ACKs, hand-shaking, HTTP GET requests) are 200 bits long. Assume that N parallel connections each gets 1/N of the link bandwidth. Now consider the HTTP protocol and assume each downloaded object is 100 Kbits long, and that the initial downloaded object contains 10 referenced objects from the same sender.
a) Would parallel downloads via parallel instances of non-persistent HTTP make sense in this case? (10 points)
b) Now consider persistent HTTP without pipelining. Do you expect significant gains over the non-persistent case? Justify and explain your answer. (10 points)
State any assumptions you have to make.