1 / 28

Peer to Peer Protocol

Gnutella. CISC-856 TCP/IP & Upper Layer Protocols. Peer to Peer Protocol. Abuthahir November 25, 2008. Acknowledgements Prof. Paul Amer Kurose and Ross. What is Gnutella?. Gnutella is a protocol for distributed search Each node in a Gnutella network acts as both a client and server

willians
Download Presentation

Peer to Peer Protocol

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gnutella CISC-856 TCP/IP & Upper Layer Protocols Peer to Peer Protocol Abuthahir November 25, 2008 Acknowledgements Prof. Paul Amer Kurose and Ross

  2. What is Gnutella? • Gnutella is a protocol for distributed search • Each node in a Gnutella network acts as both a client and server • Nodes are called “Servents” (Server and Client) • Peer to Peer, decentralized model for file sharing • Any type of file can be shared

  3. Peer Discovery • IP addresses of a peer in Gnutella network: - GWebCache server -Host Cache File List of IP addresses IP Addresses

  4. Peer A Peer B Gnutella Connection SYN SYN + ACK ACK TCP Connection Established TCP Connection Established GNUTELLA CONNECT/0.4 <CR> <LF> GNUTELLA/0.4 OK <CR> <LF> GNUTELLA/0.4 OK <CR> <LF> Gnutella Connection Established Gnutella Connection Established

  5. Flooding • Node forwards Ping and Query descriptors (Gnutella PDUs) to all nodes connected to it • Except: • If descriptor’s TTL is decremented to 0 • Descriptor has already been received before - Loop detection is done by storing Descriptor ID’s • Pong and QueryHit descriptors retrace the exact path of their respective Ping and Query descriptors

  6. Peer A Peer B Peer C Ping/Pong Routing PING PING PONG Peer A learns info related to Peer B PING PONG Peer B learns info related to Peer A PONG Peer B updates info related to Peer C PONG Peer A learns info related to Peer C PING PING PONG PONG Peer B updates info related to Peer A Peer C learns info related to Peer A

  7. TTL=0 What happens if TTL =4? Peer C Pong TTL=2 TTL=1 Pong Pong Ping Loop Detection Pong Ping Ping Pong Peer B Peer A Pong Peer D TTL=0

  8. Querying • Servent sends Query descriptor to nodes it is connected to. • Queried Servents check to see if they have the file. • If query match is found, a QueryHit is sent back to querying node

  9. I have Dhoom.mp3 Peer C File download using HTTP Queryhit Query Querhit Query Query Peer A Peer B Who has Dhoom.mp3 Peer D

  10. Incoming Connection is blocked Firewalled Servents Downloading… GIV Peer C HTTP GET Push Push Peer B Peer A Peer D

  11. Firewalled Servents • If a servent is behind a firewall, it does not permit incoming connections to its Gnutella port. • The Servent attempting to download sends “push” message to the servent which has sent the query hit message. • The servent on receipt of “push” message, opens a TCP/IP connection and sends the following message: GIV<File Index>:<Servent Identifier>/<Filename>\n\n • The Servent receives GIV message and sends a HTTP GET message to download the file.

  12. Graceful Termination (optional) Peer C Bye Peer B Peer A Peer D

  13. Gnutella Terminology • GUID:Short for Global Unique Identifier, a randomized string that is used to uniquely identify a host or message on the Gnutella Network. This prevents duplicate messages from being sent on the network. • GWebCache:a distributed system for helping servents connect to the Gnutella network, thus solving the "bootstrapping" problem. Servents query any of several hundred GWebCache servers to find the addresses of other servents. GWebCache servers are typically web servers running a special module. • Host Catcher:Pong responses allow servents to keep track of active gnutella hosts • On most servents, the default port for Gnutella is 6346

  14. Gnutella Messages

  15. Gnutella Message Header

  16. Gnutella Message Header (Cont.)

  17. Ping Descriptor

  18. Pong Descriptor

  19. Query Descriptor

  20. Query Hit Descriptor

  21. Query Hit Descriptor (cont.)

  22. Push Descriptor

  23. Advantages • Simple Protocol • No centralized server - no single point of failure - low maintenance overhead • Anonymity of queries • Support more flexible queries

  24. Disadvantages • Scales poorly: Querying and Pinging generate a lot of unnecessary traffic Example: • If TTL = 10 and each site contacts six other sites • Up to 10^6 (approximately 1 million) messages could be generated. • Heavy messaging can result in poor performance • Vulnerable to denial-of-service attacks • TTL imposes a horizon • Upload speed << Download speed • Authentication

  25. Exploiting heterogeneity: Gnutella 0.6 • Each peer is either a supernode or assigned to a supernode. • TCP connection between peer and its group leader. • TCP connections between some pairs of group leaders. • Supernode tracks the content in all its children.

  26. Gnutella 0.6 : Querying • On connection client updates,supernode with all the files that the client shares. • Client sends keyword query to supernode • Supernode responds with matches. • Supernode forwards query to other supernodes • Client then selects files for downloading

  27. References • www9.limewire.com/developer/gnutella_protocol_0.4.pdf • rfc-gnutella.sourceforge.net/src/rfc-0_6-draft.html • en.wikipedia.org/wiki/Gnutella • computer.howstuffworks.com/file-sharing.htm • Text book :Computer Networking: A Top-Down Approach • by James F. Kurose, Keith W. Ross

More Related