BitTorrent Internet Technologies and Applications.

Slides:



Advertisements
Similar presentations
Rarest First and Choke Algorithms are Enough Arnaud LEGOUT INRIA, Sophia Antipolis France G. Urvoy-Keller and P. Michiardi Institut Eurecom France.
Advertisements

The BitTorrent Protocol
The BitTorrent Protocol. What is BitTorrent?  Efficient content distribution system using file swarming. Does not perform all the functions of a typical.
The BitTorrent protocol A peer-to-peer file sharing protocol.
Incentives Build Robustness in BitTorrent Bram Cohen.
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
End-to-end Publishing Using Bittorrent. Bittorrent Bittorrent is a widely used peer-to- peer network used to distribute files, especially large ones It.
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
The BitTorrent content distribution system CS217 Advanced Topics in Internet Research Guest Lecture Nikitas Liogkas, 5/11/2006.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Peer to Peer (P2P) Networks and File sharing. By: Ryan Farrell.
Paul Solomine Security of P2P Systems. P2P Systems Used to download copyrighted files illegally. The RIAA is watching you… Spyware! General users become.
Presented by Stephen Kozy. Presentation Outline Definition and explanation Comparison and Examples Advantages and Disadvantages Illegal and Legal uses.
Peer-to-Peer Intro Jani & Sami Peltotalo.
Definitions, Definitions, Definitions Lead to Understanding.
BitTorrent Background. Common Scenario Millions want to download the same popular huge files (for free) –ISO’s –Media (the real example!) Client-server.
Introduction to client/server architecture
Middleware for P2P architecture Jikai Yin, Shuai Zhang, Ziwen Zhang.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
Client-Server vs P2P or, HTTP vs Bittorrent. Client-Server Architecture SERVER client.
The Bittorrent Protocol
Introduction Widespread unstructured P2P network
Content Overlays (Nick Feamster) February 25, 2008.
Bit Torrent (Nick Feamster) February 25, BitTorrent Steps for publishing – Peer creates.torrent file and uploads to a web server: contains metadata.
Open up Evernote, mini whiteboards.  2 minutes – write down as many as you can think of.
BitTorrent Presentation by: NANO Surmi Chatterjee Nagakalyani Padakanti Sajitha Iqbal Reetu Sinha Fatemeh Marashi.
Peer to Peer Network Anas Hardan. What is a Network? What is a Network? A network is a group of computers and other devices (such as printers) that are.

BitTorrent How it applies to networking. What is BitTorrent P2P file sharing protocol Allows users to distribute large amounts of data without placing.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
Forensics Investigation of Peer-to- Peer File Sharing Networks Authors: Marc Liberatore, Robert Erdely, Thomas Kerle, Brian Neil Levine & Clay Shields.
Chapter 10 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain how the functions of the application layer,
思科网络技术学院理事会. 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
Chapter 4. After completion of this chapter, you should be able to: Explain “what is the Internet? And how we connect to the Internet using an ISP. Explain.
File Sharing Prepared By: Mahmud Gabareen Eyal Biber Itamar Arie Lecturer Iris Reinhartz-Berger.
Securing Data Authentication with Cryptographic Signatures in BitTorrent Du Wei cc.hut.fi / Supervisor : Professor Jukka Manner Instructor.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
P2P Web Standard IS3734/19/10 Michael Radzin. What is P2P? Peer to Peer Networking (P2P) is a “direct communications initiations session.” Modern uses.
BitTorrent Dr. Yingwu Zhu. Bittorrent A popular P2P application for file exchange!
A P2P file distribution system ——BitTorrent Pegasus Team CMPE 208.
Vulnerabilities in peer to peer communications Web Security Sravan Kunnuri.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Application Layer Functionality and Protocols Network Fundamentals.
Do incentives build robustness in BitTorrent? Michael Piatek, Tomas Isdal, Thomas Anderson, Arvind Krishnamurthy, Arun Venkataramani.
Bit Torrent A good or a bad?. Common methods of transferring files in the internet: Client-Server Model Peer-to-Peer Network.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
FastTrack Network & Applications (KaZaA & Morpheus)
PEER TO PEER (P2P) NETWORK By: Linda Rockson 11/28/06.
B IT T ORRENT T ECHNOLOGY Anthony Pervetich. H ISTORY Bram Cohen Designed the BitTorrent protocol in April 2001 Released July 2, 2001 Concept Late 90’s.
Flashback: A Peer-to-Peer Web Server for Flash Crowds Presented by Tom Batkiewicz CS 587x Fall ‘07.
ADVANCED COMPUTER NETWORKS Peer-Peer (P2P) Networks 1.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
Communications & Networks National 4 & 5 Computing Science.
Bit Torrent Nirav A. Vasa. Topics What is BitTorrent? Related Terms How BitTorrent works Steps involved in the working Advantages and Disadvantages.
Peer to Peer Networking. Network Models => Mainframe Ex: Terminal User needs direct connection to mainframe Secure Account driven  administrator controlled.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
End-to-end Publishing Using Bittorrent. Bittorrent Bittorrent is a widely used peer-to- peer network used to distribute files, especially large ones It.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
November 19, 2016 Guide:- Mrs. Kale J. S. Presented By:- Hamand Amol Sambhaji. Hamand Amol Sambhaji. Pardeshi Dhananjay Rajendra. Pardeshi Dhananjay Rajendra.
An example of peer-to-peer application
Introduction to BitTorrent
BitTorrent Vs Gnutella.
Some Common Terms The Internet is a network of computers spanning the globe. It is also called the World Wide Web. World Wide Web It is a collection of.
Angelo Sapello University of Delaware
The BitTorrent Protocol
PEER-TO-PEER SYSTEMS.
Computer Networks Protocols
Chapter 2 Application Layer
Presentation transcript:

BitTorrent Internet Technologies and Applications

ITS BitTorrent2 Aims and Contents Aims –Show benefits of P2P for file downloads –Explain concepts of BitTorrent as a P2P file sharing application –Show how BitTorrent protocol works Contents –Example: File Transfer P2P versus Client/Server –P2P File Sharing Systems –BitTorrent

Example: File Transfer Client/Server Peer-to-peer (P2P)

ITS BitTorrent4 File Transfer using Client/Server A server has a 1000Mbit file for download Every user (including server) has a 1Mb/s full duplex connection in a network Initially, 5 users download the file from the server –Each user can receive at a maximum of 1Mb/s –Server can send at 1Mb/s, or 0.2Mb/s to each user 0.2Mb/s: 5,000 seconds Some time later, 100 users download the file from the server –Each user can receive at a maximum of 1Mb/s –Server can send at 1Mb/s, or 0.01Mb/s to each user 0.01Mb/s: 100,000 seconds

ITS BitTorrent5 File Transfer using P2P The 5 “seed” users all download from the server (same as client/server approach) –5,000 seconds But some time later, the 100 users download from the 5 seed users (not from the server) –Each user can receive at a maximum of 1Mb/s –Seed users can send at 1Mb/s, or 0.05Mb/s to each user 0.05Mb/s: 20,000 seconds Although the initial step is the same as client/server, subsequent users can download from the seed users, rather than single server –5 servers to download from instead of 1

ITS BitTorrent6 Factors affecting Performance Number of: –Servers –Seed users –Downloading users Connection speeds of each device: –Uplink –Downlink File structure –If the file is divided into pieces, then a user can start uploading pieces before they have downloaded the entire file

ITS BitTorrent7 Technical Tradeoffs of P2P File Sharing Advantages of P2P file sharing: –Not always dependant on original server Redundancy: content is available if server fails Performance: server does not have to handle load from all users; server link does not have to support access from all users at once Disadvantages of P2P file sharing: –Relies on participation of other users As the number of seeding users decreases, the performance decreases Download performance varies over time –No central control of access to content Difficult to control who accesses the content Difficult to find the content (no central index of files) There are many other issues regarding: –Security, privacy, accounting, legality, …

P2P File Sharing Systems

ITS BitTorrent9 P2P File Sharing Systems Protocols –Communication protocols for locating other users and transferring the data –Examples: BitTorrent, Gnutella, Naptser, FastTrack, eDonkey, … Software –Client programs that implement the protocols and provide a user- interface –Examples: BitTorrent: BitTorrent, BitComet, uTorrent, Transmission, Azeurus Vuze, … Gnutella: Limewire, Morpheus, Shareaza, gtk-gnutella, … Napster: Napster, WinMX, … FastTrack: Kazaa, Grokster, iMesh, … eDonkey: eDonkey, eMule, … –Some clients also support multiple protocols Networks –Collections of users (including servers) using the same protocol

BitTorrent

ITS BitTorrent11 Terminology and Concepts A file (or set of files) is referred to as a torrent –A.torrent file is a specific file that describes the torrent Users accessing a torrent are called peers –Downloading and/or uploading A peer that has downloaded the entire torrent is a seed –That user is seeding the torrent A peer that has not yet downloaded the entire torrent is a downloader or a leech –Normally a leecher has downloaded more than they have uploaded A swarm is the set of users connected to a torrent –All the peers, including seeds

ITS BitTorrent12 Terminology and Concepts Files are divided into pieces –When a piece is downloaded by a peer, it is then made available for upload Pieces are divided into blocks A tracker is a server that manages the list of peers in a swarm –Keeps a list of peer IP addresses and port numbers An indexer is a server that manages a list of torrents –Normally a website that allows search for.torrent files by name and other descriptive data –A.torrent file also lists the address of the tracker

ITS BitTorrent13 Files, Torrent, Pieces and Blocks

ITS BitTorrent14 Steps using BitTorrent A peer is a BitTorrent client software running on a computer. It can be identified by the IP address of the computer and the applications port number. Initially the peer does not know any other peers.

ITS BitTorrent15 To start downloading a file, the corresponding.torrent file is needed. The peer contacts an indexer, which has a list of known torrents. The process of obtaining the.torrent file is not part of the BitTorrent protocol. Normally it is performed using a web browser contacting a web server (the index). The.torrent file may be downloaded using HTTP, and then loaded in the BitTorrent client software.

ITS BitTorrent16 The.torrent file describes the file(s), as well as identifies the tracker for the torrent (by an IP address and port number) The peer contacts the tracker to obtain the list of peers in the swarm for the torrent.

ITS BitTorrent17 The peer contacts other peers in the swarm, and begins the process of downloading (as well as uploading) the file(s) in the torrent. The peer maintains contact with the tracker, providing updates of its status, as well as obtaining address of new peers as they enter the swarm.

ITS BitTorrent18.torrent File The.torrent file describes the contents of the files as well as the tracker that manages the swarm A text file with various (encoded) fields: –info: describes the file(s) of the torrent. Includes: File names, file length, length of pieces in torrent, and for each piece the SHA1 hash of the piece –announce: URL of the tracker An optional list of backup trackers may also be included –creation date: when the torrent was created –created by: name of software that created torrent –comment: textual description of the contents

ITS BitTorrent19 Example.torrent File d8:announce39: 7:comment29:Ubuntu CD releases.ubuntu.com 13:creation datei e 4:infod 6:lengthi e 4:name28:ubuntu-8.10-desktop-i386.iso 12:piece lengthi524288e 6:pieces27960: þý“!.ÈTO ™îðÿB2ÅÉҐóý¨úþ9tz>©‘U… Hash values of all pieces

ITS BitTorrent20 Peer to Tracker Communications The Tracker implements a HTTP web server Peers communicate with the tracker using HTTP –Peer sends HTTP GET requests. URL contains information about the peers activities in the torrent: ID of peer Port number the client is listening on Bytes uploaded/downloaded so far; Bytes remaining to download Status of download (started, stopped, completed) … –Tracker sends HTTP responses, containing plain text: Interval that client should send requests to tracker Number of peers completed (seeds) and incomplete (leechers) in the swarm A list of peers (peer ID, IP address, port number) Warning/error messages …

ITS BitTorrent21 Example Peer/Tracker Exchange GET /announce?info_hash=3%82%0d%b6%dd%5eY%28%d2%3b%c8%11%bb%ac%2fJ%e9L%b8%82 &peer_id=-UT1810-_1%02A%ba%d4%9a%0c%e8JBB &port=11541&uploaded=0&downloaded=0&left= &corrupt=0&key=82D434AB&event=started&numwant=200 &compact=1&no_peer_id=1&ipv6= HTTP/1.1 Host: torrent.ubuntu.com:6969 User-Agent: uTorrent/1810 Accept-Encoding:gzip HTTP/ OK Content-Length: 362 Content-Type: text/plain Pragma: no-cache d8:completei1328e10:incompletei97e8:intervali1800e5:peers300:<.#...Z..... Peer Tracker

ITS BitTorrent22 Peer Exchange Protocol A TCP connection is created from a peer (client) to a remote peer and they exchange messages to inform of current status and download blocks –At the start, the client sends a Handshake message to remote peer Informs remote peer of PeerID –This may be followed by a Bitfield message, where the remote peer indicates the set of pieces it has available for download Once the Handshake is sent, a peer (client or remote peer) may send: –Request message to request a specific block –Piece message which includes a block Note: although called “Piece” message, it is sending a block –Have message to indicate a piece a peer has –Cancel message to cancel a previous Request for a block –Keepalive message to keep the TCP connection open In the case nothing has been sent between the peers recently

ITS BitTorrent23 Peer Exchange Protocol BitTorrent aims to implement a ‘tit-for-tat’ algorithm for data transfer –For every one piece the client downloads, it uploads one piece –Aim to maintain equal amount of upload/download –BitTorrent applies this while a peer is downloading a torrent Once the peer has completed (i.e. becomes a Seed), there is no way for the protocol to enforce the peer to keep uploading Peers uses two concepts: –Choking: when a client is choked by a remote peer, then no requests will be handled by the remote peer –Interested: when a remote peer is interested in the client, then it would like to receive a piece that the client has –Client maintains status of remote peer (values may be true or false): am_choking: the client is choking the remote peer am_interested: the client is interested in the remote peer peer_choking: the remote peer is choking the client peer_interested: the remote peer is interested in the client

ITS BitTorrent24 Peer Exchange Protocol The peers may send following messages to change state: –Choked message –Unchoked message –Interested message –Uninterested message Each peer implements a choking algorithm to determine when to choke/unchoke peers –Need to consider many factors, including the download rate from different peers For a torrent, a client may have connections with many (10’s of peers), but generally only several (4 to 10) will be unchoked at anyone time

ITS BitTorrent25 Peers in a Swarm

ITS BitTorrent26 Torrent, Pieces and Blocks Although there is no size limits, using BitTorrent is usually most efficient for large sizes, e.g. MBytes to GBytes Pieces are normally 256KB, 512KB or 1MB Blocks are normally 16KB Which pieces does a client download first? –Random is one option –Rarest-first is another (more common) option A client peer keeps track of the pieces all other peers in the swarm have –Original Bitfield message, and regular Have messages Client peer downloads the pieces which are least common, so that it will become more common Availability of a torrent: number of copies of torrent in swarm –1 = all pieces are available at peers in the swarm; 0.5 = only 50% of pieces are available (you will not be able to download entire file); 20 = 20 copies of the torrent are available

ITS BitTorrent27 Performance Issues How many peers to connect to? –About 10 to 30 for each torrent How many peers to download from (unchoked)? What are the optimal piece and block sizes? What is the best choking algorithm? –When do you try a different peer (in the hope that they will offer faster download)? How to ensure users upload content? How to maintain fairness with other applications? –Remember, TCP aims to provide fairness amongst connections. If BitTorrent has 100 connections and web browser has only 10 connections, there may be extreme unfairness …