CS242 Computer Networks Randy Shull Wellesley College Handout # 15 September 17, 2015 Problem Set 3 Due: Start of Class Thursday, September 24 Reading: Kurose & Ross, 2.2.5, 2.2.6, 2.6 Problem 1 [4]: Cookies Using Wireshark, capture packets as you browse three of your favorite web sites. For each web site, list all the cookies that it uses and discuss what you think the cookies are used for. Attached a copy of the packets containing cookie requests to your assignment. Problem 2 [4]: SPAM Obtain a copy of RFC 5321 for SMTP. What does MTA stand for? Consider the following received spam email (modified from a real spam email). Assuming only the originator of this spam email is malacious and all other hosts are honest, identify the malacious host that has generated this spam email. From - Fri Nov 07 13:41:30 2008 Return-Path: <teniss5@pp33head.com> Received: from barmail.cs.umass.edu (barmail.cs.umass.edu [128.119.240.3]) by cs.umass.edu (8.13.1/8.12.6) for <hg@cs.umass.edu>; Fri, 7, Nov 2008 13:27:10 -0500 Received: from asusu-4b96 (localhost [127.0.0.1]) by barmail.cs.umass.edu (Spam Firewall) for <hg@cs.umass.edu>; Fri, 7 Nov 2008 13:27:07 -0500 (EST) Received: from asusus-4b96 ([58.88.21.177]) by barmail.cs.usmass.edu for ,hg@cs.umass.edu>; Fri, 07 Nov 2008 13:27:07 -0500 (EST) Received: from [58.88.21.177] by inbnd55.exchangedd.com; Sat 8 Nov 2008 01:27:07 + 0700 From: "Jonny" ,tennis5@pp33head.com> To: <hg@cs.umass.edu> Subject: How to secure your savings Problem 3 [6]: Client-Server File Distribution 1 Consider distributing a file of F bits to N peers using a client-server architecture. Assume a fluid model where the server can simultaneously transmit to multiple peers, transmitting to each peer at different rates, as long as the combined rate does not exceed the upload rate of the server’s access link us . Suppose the upload rate of the ith peer access link is ui and its corresponding download rate is di . The server must transmit N F bits with an upload rate of us , so the upload takes N F/us . If dmin = min{d1 , d2 , . . . , dN }, the peer with the lowest download rate cannot obtain all F bits in less than F/dmin seconds. The client-server distribution time, denoted Dcs is at least the maximum of these two lower bounds. a [2]: Suppose that us /N ≤ dmin . Specify a distribution scheme that has a distribution time of N F/us . b [2]: Suppose that us /N ≥ dmin . Specify a distribution scheme that has a distribution time of F/dmin . c [2]: Conclude that the minimum distribution time is in general given by max{N F/us , F/dmin }. Problem 4 [6 + 6 Extra Credit]: Minimizing distribution time using P2P architecture Consider distributing a file of F bits to N peers using a P2P architecture. Assume a fluid model where the server can simultaneously transmit to multiple peers. Adopt the notation of the previous problem and assume for simplicity that dmin is very large, so that peer download bandwidth is never a bottleneck. Let DP 2P denote the minimum distribution time for the the following peer to peer scenario. At the beginning of the distribution, only the server has the file and so must upload the file at least once. Thus, DP 2P ≥ F/us . As before, the slowest peer cannot obtain the file in less than F/dmin seconds. Finally N F bits must be uploaded and since the system’s total upload capacity is us +u1 +. . .+uN , this cannot be done in less than N F/(us +u1 +. . .+uN ) seconds. Putting these three observations together, we obtain the minimum distribution time for P2P as DP 2P ≥ max{F/us , F/dmin , N F/(us + u1 + . . . + uN )} This equation provides a lower bound for the minimum distribution time for the P2P architecture. It we imagine that each peer can redistribute a bit as soon as it receives the bit, then there is a redistribution scheme that 2 actually achieves this lower bound. We investigate a special case in the following exercises. a [4]: Suppose that us ≤ (us + u1 + . . . + uN )/N . Specify a distribution scheme that has a distribution time of F/us . b [6]: Extra Credit Suppose that us ≥ (us +u1 +. . .+uN )/N . Specify a distribution scheme that has a distribution time of N F/(us +u1 +. . .+uN ). c [2]: Conclude that the minimum distribution time is in general given by max{F/us , N F/(us + u1 + . . . + uN )}. Problem 5 [3]: Overlay networks Consider an overlay network with N active peers, with each pair of peers having an active TCP connection. Additionally, suppose that the TCP connections pass through a total of M routers. How many nodes and edges are there in the corresponding overlay network? Problem 6 [4]: Free-riding Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to any other peers (so called freeriding). a [2]: Bob claims that he can receive a complete copy of the file that is shared by the swarm. Is Bob’s claim possible? Why or why not? b [2]: Bob also claims that he can make his “free-riding” more efficient by using a collection of multiple computer (with distinct IP addresses) in the computer lab in his department. ow can he do that? 3