Unstructured / Structured Unstructured / Structured
Total Page:16
File Type:pdf, Size:1020Kb
Chair for Network Architectures and Services Overview Department of Informatics TU München – Prof. Carle 1.2a) Basics „Unstructured“ / „Structured“ Peer-to-Peer Systems Early unstructured Peer-to-Peer networks and Security Napster IN2194 Gnutella Theory Chapter 1 Random Graphs Peer-to-Peer Systems Small World Theory 1.2a Unstructured Systems Scale-Free Graphs Dipl.-Inform. Heiko Niedermayer Christian Grothoff, PhD Prof. Dr.-Ing. Georg Carle NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 2 Unstructured / Structured Unstructured / Structured Unstructured Network Does not self-organize into a predefined structure. Graph is created by random node interactions. Examples for structures Unstructured / Structured Full Mesh / Clique All nodes are connected with each other. n nodes Î degree = n-1 Diameter = 1 Ring Nodes organized in a ring Degree = 2 n nodes Î diameter = n/2 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 3 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 4 Unstructured networks Early Unstructured P2P Systems Properties No structure has to be created and maintained whenever something changes in the network. Join • Completed once the node is registered at one other node (except for the need of this node to get to know more nodes….) Leave • No need to rework, but to locally remove the link Early Unstructured P2P Unless destination is known, there is no way to know where it is but to search all over the network. Systems v88 v0 Nodes store their own items. v11 Who has item 41. Which way? v39 v5 v74 Go to v11. v54 Which way? v51 v1 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 5 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 6 Napster Filesharing Filesharing Napster Share and announce content A centralized Peer-to-Peer system Search for content Centralized P2P = management and indexing done by central servers data transfer Download content 1999 by Shawn Flemming (student at Northwestern University) Problems Finally shut down in 2001 as result of law suits. Napster Legal issues (see Napster) Æ Decentralization Approach Server How to find content? Central Server String queries • Manages index of files Peers •Substring • Register to server with their shared files Fuzzy queries • Query server for files Îlist of Peers with their hits Usually no exact queries for the query • Download from Peer Æ Thus, the task for the unstructured decentralized network is to search the network for hits. Peer-to-Peer • Only the data exchange between the Peers NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 7 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 8 Gnutella Gnutella Gnutella 0.4 Basic primitives of Gnutella 0.4 Pure Peer-to-Peer approach Ping / pong: discover neighborhood No central entities like in Napster. Query / query hit: discover content Avoid single points of failure, any peer can be removed without loss of functionality. Push: download request sent to firewalled nodes Join Firewalls may only allow connections to be established from inside to the Via any node in the network Internet and not the other way around. • Taken from downloaded host list, peer cache, … The firewall and NAT aspects of Peer-to-Peer are discussed in a later • Receives a list of recently active peers from this node. section. Explore neighborhood with ping/pong messages. Establish connections until a quota is reached. Properties Limited flooding as routing principle Immense bandwidth consumption due to flooding for the signalling and Flood message to neighbors unless TTL of message exceeded. unsuccessful search traffic! Store the source of these messages to be able to return the hit Gnutella 0.4 does not scale (~ overhead dominates the network). to the source (= previous node, not the original source of the Provides a weak form of anonymity as query is without source address request). and hits are returned hop-by-hop on the path. NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 9 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 10 Gnutella2 Theory Gnutella2 Hybrid Peer-to-Peer approach Distinction between client peers and super peers • Super peers form unstructured network data transfer • Client peers connect to some super peers Hubs (super peers) Hub Accept hundreds of leaves (client peers) Hub Many connections to other hubs Hub Query Hit Table Hub Theory • List of files provided by its leaves. Leaves (client peers) Each leaf connects to one or two hubs. Search Gather a list of hubs and iteratively ask them. Properties Less traffic overhead, scales better NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 11 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 12 Theory Theory: Random Graphs Observation Randomly-created Graphs Graphs of unstructured networks are created by random and social Way to model the structure of these networks interactions. Necessary to understand the behaviour of these networks Randomness Social aspects (social network, entry points, uptime, …) Random Graphs / Uniform Random Graphs Content (interesting files, …) Graph G = (V,E) E is created randomly Questions n = |V|, m = |E| What is their form? Assumption Are they good? Nodes randomly connect to each other. We will also call them uniform random graphs to distinguish them from In the following we present some theoretic graph models that are used to other graphs that are also randomly-created, but where nodes are not approximate these graphs and their properties. all equal and strategies bias the link selection. Average distance in random graphs is most likely to be close to optimal for given n and m. NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 13 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 14 Erdös-Rényi model The Small-World Phenomenon Uniform random graphs according to Erdös-Rényi We meet someone we know at a place where we do not expect model (1960) something like that to happen. Î What a small world ?!? Given: n nodes und probability p Degree distribution for n=50, p=0.4 An experiment by Stanley Milgram (1960s) Construction: Milgram sent mail to people in Nebraska. For any two nodes v1, v2 do with probability p: The mail should only be sent to people they personally know who connect(v1,v2) P(k) might know better how to reach to the targeted receiver. Resulting graph: The targeted receivers of the mails were people from Boston. 2 E[|E|] = p * n / 2 0.00 0.04 0.08 The result was that on average six hops were required and that the 0 1020304050 The node degree follows the binomial distribution median was below six. (approx. by Poisson distribution for large n). k Subsequently, this lead to the term ”‘Six degrees of separation”’ and Discussion: the conclusion that we live in ”‘small world”’. Too simple and uniform for a model of real networks. NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 15 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 16 Discussion of the Milgram experiment Graph measure: Characteristic path length (L) First of all, ”‘six degrees of separation”’ sounds more like a maximum, In the following, we introduce two scalar properties that can be used to but it is an average and the maximum, say the diameter of the graph, characterize graphs. may be significantly larger. Judith Kleinfeld [Klei02] looked into the experiments of Milgram in Characteristic path length (L) more detail. L corresponds to the average length of a shortest path in an undirected n n Most of Milgram’s messages did not find their receiver. In fact, the success graph 1 rate (chain completion rate) was below 20 %. L = avg d()i, j = ∑∑d(i, j) i, j∈V ,i≠ j ⎛n⎞ i=+11j=i The people that were selected were also biased in such a way that well-off ⎜ ⎟ higher-ranked people were preferred. Moreover, even six degrees may be ⎝2⎠ a strong barrier in reality, say a big world, that cannot be bridged in Recap of the definition of the diameter particular among different races and classes. A big world afterall….? D = max d()i, j i, j∈V ,i≠ j L and random graphs (e.g. constructed by Erdös-Rényi model) log n L ~ random log()m / n NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SummerSS 2007,2009,9 2010,Chapter Chapter 01 1 17 NetworkPeer-to-Peer Security, Systems WS and2008/09, SecurSecSecurity,urity, Chapterity, SSSummer 2007,2009,9 2010,Chapter Chapter 01 1 18 Graph measure: Clustering coefficient (C) Graph measure: Clustering coefficient cluster Cluster Clustering coefficient C engl. Traube, Bündel, Schwarm, Haufen Given graph G = (V,E) v In data analysis points with similar We define the neighborhood of a vertex v properties. Γv = {}u ∈V | u adjacent to v G(V,E) Clustering in networking Given U as subset of V, we define E(U) the edges outlier Here, a group of nodes that are all closely of the subgraph of V spanned with the nodes U.