You are on page 1of 4

Network Services Problems #5

FIT - HUI Oct, 2012

Web-caching and P2P related questions

Overlay network

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?

BitTorrent
1. Suppose Tn joins a BitTorrent torrent, but he does not want to upload any data to any other peers (so called freeriding). Tn claims that he can receive a complete copy of the file that is shared by the swarm. Is Tns claim possible? Why or why not? Tn further claims that he can further make his freeriding 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? 2. In this problem. we are interested in finding out the efficiency of a BitTorrent-like P2P file sharing system. Consider two peers Bob and Alice. They join a torrent with M peers in total (including Bob and Alice) that are sharing a file consisting of N chunks. Assume that at a particular time t, the chunks that a peer has are uniformly at random chosen from all N chunks, and no peer has all N chunks. Answer the following questions: a What is the probability that Bob has all the chunks that Alice has, given that the numbers of chunks that Bob and Alice have are denoted by nb and na ? b Remove part of the conditioning in part a) to find out the probability that Bob has all the chunks that Alice has, given that Alice has na chunks? c Suppose that each peer in BitTorrent has 5 neighbors. What is the probability that Bob has data that is of interest to at least one of his five neighbors?

Those problems are derived from CMU Computer Networks course

DHT
1. Consider a circular DHT with node and key identifiers in the range [0, 63]. Suppose there are eight peers with identifiers 0, 8, 16, 24, 32, 40, 48, and 56. Suppose each peer can have one shortcut peer. For each of the eight peers, determine its shortcut peer so that the number of messages sent for any query (beginning at any peer) is minimized Repeat above question, but now allow each peer to have two shortcut peers 2. As DHTs are overlay networks, they may not necessarily match the underlay physical network well in the sense that two neighboring peers might be physically very far away; for example, one peer could be in Asja and its neighbor could be in North America. If we randomly and uniformly assign identifiers to newly joined peers, would this assignment scheme cause such a mismatch? Explain. And how would such a mismatch affect the DHTs performance?

Chord-ring

To set up a P2P network to share poor jokes with other mates, but hes worried that the RIAV will shut down his centralized server 1 , just like NMPA did to Napster. So he set up a Chord ring for lookups and routing in his peer to peer network. Sadly, Tos network is not popular, consisting of only four peers. The peers contain the listed have successor tables as shown (the id + 2i column is there to remind you how the successor table is set up).

1. Now, jokes (items) are added to the DHT. Which node(s) would store the jokes with the following ids: 3, 5, 0, 2, 7, 1?
1 http://tuoitre.vn/Van-hoa-Giai-tri/Am-nhac/506943/1-11-bat-dau-thu-phi-tai-nhac-truc-tuyen. html

2. List the nodes that will receive a query from node 4 for item 2. 3. List the nodes that will receive a query from node 2 for item 5. 4. Tn thinks that these jokes are awful, so he launches a DDoS attack and takes out node 4. Time passes, and the nodes converge on new routing tables that dont involve node 4. Later, node 7 queries for Item 5. List the nodes that will receive this query.

Web transfer

In the topology shown below, machine A is a desktop client, N is a name server (but not the authoritative name server for S), C is a Web cache, R is a router and S is a Web server. Client A is configured to use Web cache C for all requests (assume that the Web cache resolves the name for any Web server and that the client is configured with the IP address of the cache). All wires/links are ethernet segments.

Assume the following: All the machines were just booted and their associated caches (ARP, DNS, Web, persistent connection) are all empty http://S/index.html fits in a single packet Persistent HTTP connections are used among A, C, and S (i.e. you should assume that once any connection between these hosts is established it is never closed) Web caches respond to TCP requests that look like packet two in table 1 below (e.g., GET http://foo/bar/). They reply with the normal web cache contents. 1. The user on machine A, requests the web page http://S/index.html. The table below shows a number of messages sent/received in servicing this request (this is not necessarily a complete list of all packets). In addition, there are a few bogus packets that are never sent/received. The packets are not listed in temporal order fill in the order column to indicate the order in which each packet was sent/received (1=first, 2=second, etc.). Place an X in the order column if the packet is bogus. 2. Assume that the client A has no local Web or DNS cache and that cache C has no DNS cache. However, all other cacheable things are cached. On a subsequent request for http://S/ index.html which of the messages from Table 1 would be eliminated (use the ID column to name the messages)?

You might also like