Bittorrent

23
BITTORRENT Introduction BitTorrent is a protocol that enables fast downloading of large files using minimum Internet bandwidth. It costs nothing to use and includes no spyware or pop-up advertising. Unlike other download methods, BitTorrent maximizes transfer speed by gathering pieces of the file you want and downloading these pieces simultaneously from people who already have them. This process makes popular and very large files, such as videos and television programs, download much faster than is possible with other protocols Now we'll examine how BitTorrent works and how it is different from other file-distribution methods. In addition, you'll learn how to use BitTorrent and what the future might hold for this innovative approach to serving files over the Internet. BitTorrent is the name of a peer-to-peer or P2P file distribution protocol, and is the name of a free software implementation of that protocol. The protocol was originally designed and created by programmer Bram Cohen, and is now maintained by BitTorrent Inc. BitTorrent is designed to distribute large amounts of data widely without 1

description

 

Transcript of Bittorrent

BITTORRENT

Introduction

BitTorrent is a protocol that enables fast downloading of large files using

minimum Internet bandwidth. It costs nothing to use and includes no spyware or pop-up

advertising.

Unlike other download methods, BitTorrent maximizes transfer speed by gathering

pieces of the file you want and downloading these pieces simultaneously from people

who already have them. This process makes popular and very large files, such as videos

and television programs, download much faster than is possible with other protocols

Now we'll examine how BitTorrent works and how it is different from other file-

distribution methods. In addition, you'll learn how to use BitTorrent and what the future

might hold for this innovative approach to serving files over the Internet.

BitTorrent is the name of a peer-to-peer or P2P file distribution protocol, and is

the name of a free software implementation of that protocol. The protocol was originally

designed and created by programmer Bram Cohen, and is now maintained by BitTorrent

Inc. BitTorrent is designed to distribute large amounts of data widely without incurring

the corresponding consumption in costly server and bandwidth resources. CacheLogic

suggests that BitTorrent traffic accounts for ~35% of all traffic on the Internet while other

sources are skeptical.

The original BitTorrent client was written in Python. Its source code, as of version

4.0, has been released under the BitTorrent Open Source License, which is a modified

version of the Jabber Open Source License. There are numerous compatible clients,

written in a variety of programming languages, and running on a variety of computing

platforms.

1

Terminology

Like most Internet phenomena, BitTorrent has its own jargon. Some of the

more common terms related to BitTorrent include:

1. Leeches - People who download files but do not share files on their own computer

with others

2. Seed or seeder - A computer with a complete copy of a BitTorrent file .At least

one seed computer is necessary for a BitTorrent download to operate.

3. Swarm - A group of computers simultaneously sending or uploading or receiving

or downloading the same file

4. .torrent - A pointer file that directs your computer to the file you want to

download

5. Tracker - A server that manages the BitTorrent file-transfer process

6. Availability or distributed copies

The number of full copies of the file available to the client. Each seed

adds 1.0 to this number, as they have one complete copy of the file. A connected

peer with a fraction of the file available adds that fraction to the availability, if no

other peer has this part of the file. ie. a peer with 65.3% of the file downloaded

increases the availability by 0.653. However, if two peers both have the same

portion of the file downloaded - say 50% - and there is only one seeder, the

availability is 1.5.

7. choked

Describes a peer to whom the client refuses to send file pieces. A client chokes

another client in several situations:

a. The second client is a seed, in which case it does not want any pieces ie. it is

completely uninterested

b. The client is already uploading at its full capacity ie. the value for

max_uploads has been reached

2

8. interested

Describes a downloader who wishes to obtain pieces of a file the client has. For

example, the uploading client would flag a downloading client as 'interested' if

that client did not possess a piece that it did, and wished to obtain it.

9. leech

A leech is usually a peer who has a negative effect on the swarm by having a very

poor share ratio - in other words, downloading much more than they upload. Most

leeches are users on asymmetric internet connections and do not leave their

BitTorrent client open to seed the file after their download has completed.

However, some leeches intentionally avoid uploading by using modified clients or

excessively limiting their upload speed. The term leech, however, can be used

simply to describe a peer - or any client that does not have 100% of the data.

10. lurker

Lurkers are users that only download files from the group but do not add new

content. Unlike a Leech or computing, a lurker will seed (see Seeder, below) what

he has downloaded.

11. peer

A peer is one instance of a BitTorrent client running on a computer on the

Internet to which other clients connect and transfer data. Usually a peer does not

have the complete file, but only parts of it. However, in the colloquial definition,

"peer" can be used to refer to any participant in the swarm in this case, it's

synonymous with "client".

12. scrape

This is when a client sends a request to the tracking server for information about

the statistics of the torrent, such as with whom to share the file and how well

those other users are sharing.

3

13. seeder

A seeder is a peer that has a complete copy of the torrent and still offers it for

upload. The more seeders there are, the better the chances are for completion of

the file.

14. snubbed

An uploading client is flagged as snubbed if the downloading client has not

received any data from it in over 60 seconds.

15. superseed

When a file is new, much time can be wasted because the seeding client

might send the same file piece to many different peers, while other pieces have not

yet been downloaded at all. Some clients, like ABC, Azureus, BitTornado,

TorrentStorm, and µTorrent have a "superseed" mode, where they try to only send out

pieces that have never been sent out before, making the initial propagation of the file

much faster. This is generally used only for a new torrent, or one which must be re-

seeded because no other seeds are available.

16. swarm

Together, all peers including seeders sharing a torrent are called a swarm. For

example, six ordinary peers and two seeders make a swarm of eight.

17. torrent

A torrent can mean either a .torrent metadata file or all files described by it,

depending on context. The torrent file contains metadata about all the files it

makes downloadable, including their names and sizes and checksums of all pieces

in the torrent. It also contains the address of a tracker that coordinates

communication between the peers in the swarm.

18. tracker

A tracker is a server that keeps track of which seeds and peers are in the swarm.

Clients report information to the tracker periodically and in exchange receive

information about other clients to which they can connect. The tracker is not

directly involved in the data transfer and does not have a copy of the file.

4

Traditional Client-Server Downloading

To understand how BitTorrent works and why it is different from other

file-serving methods, let's examine what happens when you download a file from a Web

site. It works something like this:

1. You open a Web page and click a link to download a file to your computer.

2. The Web browser software on your computer or the client tells the server or a

central computer that holds the Web page and the file you want to download to

transfer a copy of the file to your computer.

3. The transfer is handled by a protocol a set of rules, such as FTP or File Transfer

Protocol or HTTP or HyperText Transfer Protocol.

The transfer speed is affected by a number of variables, including the type of

protocol, the amount of traffic on the server and the number of other computers that are

downloading the file. If the file is both large and popular, the demands on the server are

great, and the download will be slow.

5

Peer-To-Peer File Sharing

Another file-transfer method that you may have heard about is called peer-to-peer

file sharing. In this process, you use a software program rather than your Web browser to

locate computers that have the file you want. Because these are ordinary computers like

yours, as opposed to servers, they are called peers. The process works like this:

1. You run peer-to-peer file-sharing software for example, a Gnutella program on

your computer and send out a request for the file you want to download.

2. To locate the file, the software queries other computers that are connected to the

Internet and running the file-sharing software.

3. When the software finds a computer that has the file you want on its hard drive,

the download begins.

4. Others using the file-sharing software can obtain files they want from your

computer's hard drive.

The file-transfer load is distributed between the computers exchanging files, but

file searches and transfers from your computer to others can cause bottlenecks. Some

people download files and immediately disconnect without allowing others to obtain files

6

from their system, which is called leeching. This limits the number of computers the

software can search for the requested file.

What BitTorrent Does

Unlike some other peer-to-peer downloading methods, BitTorrent is a protocol

that offloads some of the file tracking work to a central server called a tracker. Another

difference is that it uses a principal called tit-for-tat. This means that in order to receive

files, you have to give them. This solves the problem of leeching -- one of developer

Bram Cohen's primary goals. With BitTorrent, the more files you share with others, the

faster your downloads are. Finally, to make better use of available Internet bandwidth

(the pipeline for data transmission), BitTorrent downloads different pieces of the file you

want simultaneously from multiple computers.

Here's how it works:

7

1. You open a Web page and click on a link for the file you want.

2. BitTorrent client software communicates with a tracker to find other computers

running BitTorrent that have the complete file (seed computers) and those with a

portion of the file (peers that are usually in the process of downloading the file).

3. The tracker identifies the swarm, which is the connected computers that have all

of or a portion of the file and are in the process of sending or receiving it.

4. The tracker helps the client software trade pieces of the file you want with other

computers in the swarm. Your computer receives multiple pieces of the file

simultaneously.

5. If you continue to run the BitTorrent client software after your download is

complete, others can receive .torrent files from your computer; your future

download rates improve because you are ranked higher in the "tit-for-tat" system.

Downloading pieces of the file at the same time helps solve a common problem with

other peer-to-peer download methods: Peers upload at a much slower rate than they

download. By downloading multiple pieces at the same time, the overall speed is greatly

improved. The more computers involved in the swarm, the faster the file transfer occurs

because there are more sources of each piece of the file. For this reason, BitTorrent is

especially useful for large, popular files.

Downloading Files with BitTorrent

To use BitTorrent for file downloads, you need to install the BitTorrent client software.

You may also need to tweak your firewall and network router (if you use these) to accept

BitTorrent files. We'll give you all the details to get started. But first, here's a synopsis of

the steps:

1. Download and install the BitTorrent client software.

2. Check and configure firewall and/or router for BitTorrent (if applicable).

3. Find files to download.

4. Download and open the .torrent pointer file.

5. Let BitTorrent give and receive pieces of the file.

8

6. Stay connected after the download completes to share your .torrent files with

others.

Download the BitTorrent Client Software

BitTorrent is open-source software, which means the program is available to you

and to software developers for free see What does "open source" mean?. Therefore, some

developers have created their own versions of BitTorrent software, and you can choose

from a number of client programs. Note: This article assumes you are using the official

version. If you want to experiment with different clients, see Brian's BitTorrent FAQ and

Guide for a list.

To start off, go to BitTorrent.com and click the link for the client software that matches

your operating system. After you download the client software, double-click on the

desktop icon to install it. The installation program is quick, and it displays this window

when it is complete:

You'll also see Bram Cohen's Web page, where you can send donations to support

development of BitTorrent. Mr. Cohen develops and distributes BitTorrent as open-

source software at no cost to users or other developers.

If you have a firewall installed on your computer, you will obtain faster download rates if

you configure it to have an open pathway for BitTorrent file transfers. A firewall protects

your system from intruders by disallowing unauthorized access to your computer's ports.

A port is a way for Internet communications to travel into and out of your computer.

Ports are numbered, and each communication type has a standard port number.

9

BitTorrent also uses specific port numbers, normally ports 6881 through 6889. Because

firewalls block these ports by default, you'll need to configure your firewall to accept this

incoming traffic in order to receive .torrent files. You may also have to enable port

forwarding of your computer's IP address for ports 6881 through 6889 so that other

BitTorrent computers can find you. Because every product is unique, check the

documentation or product Web site for your firewall/router for specific instructions on

how to accomplish these tasks. You can also check out PortForward.com for help.

Find, Download and Open Torrent Files

After you set up your computer, you're ready to download .torrent files. You can

search for the term ".torrent" using an Internet search engine to find sites that offer

BitTorrent files. There are also a number of sites dedicated to BitTorrent file searching.

These include isoHunt and TorrentSpy. Other sites that offer BitTorrent files directly

include bt.etree.org for shareable music, Legal Torrents for music, videos and books, and

BT on EFnet for recent television shows.

When you find the file you want, right-click the .torrent link, choose "save target as" and

save the file in a convenient place on your computer, such as the Windows desktop.

The .torrent file, which is a pointer to the actual file you want, will download quickly.

Next, double-click the .torrent file you saved to your computer. The BitTorrent client

software displays and starts the download process:

10

As we mentioned before, the more computers in the sending/receiving swarm, the quicker

the download process. If you are downloading a file with only a few other computers in

the swarm, the transfer speed will be relatively slow.

After the download is complete, leave the BitTorrent client software open so that other

peers can download .torrent files from your computer.*

Peers using BitTorrent can download only .torrent files from your computer. Once you

have a complete copy of a file, your computer becomes a potential seed for that file -- as

long as you're still running the software. Sharing what you have causes speedier

BitTorrent downloads for you in the future. You can leave the client software running for

a few hours or overnight.* Simply close the software when you're done.

*Note: Does your ISP charge for uploads? It's rare, but it's possible. Before leaving the

BitTorrent client software open overnight, be sure your ISP doesn't charge for uploads --

otherwise, moving up in the tit-for-tat hierarchy could end up costing you an arm and a

leg.

Legal Ramifications

Similar to other peer-to-peer software, BitTorrent can be used to download copyrighted

material. Because BitTorrent handles large files remarkably well, it is especially popular

for downloading video files. The Motion Picture Association of America has filed

countless lawsuits, causing at least many high-traffic .torrent download sites to shut

down.

11

BitTorrent itself is perfectly legal to use. When you select a file to download, however, it

is your responsibility to make sure the file not copyrighted. BitTorrent downloads are not

anonymous; information about your computer's IP address and the files you download

can be traced back to you.

Despite its improper use by distributors of copyrighted material, the BitTorrent program

itself both legal and innovative. With additions such as tit-for-tat and an open-source

philosophy, BitTorrent will likely build a legacy of its own while serving as a bridge to

the next generation of file-serving software.

Comparison To Other File Sharing Systems

BitTorrent 4.0.4 running under Windows XP

The method used by BitTorrent to distribute files parallels the one used by the

eDonkey2000 network, but nodes in eDonkey's file sharing network usually share and

download a much larger number of files, making the bandwidth available to each transfer

much smaller. Also eDonkey has queue-based system wherein there might be 200 people

sharing the file but only one or two have queue free. Hence a user ends up getting files

from only a few and rising up in rank in other users' queue list (while getting no

download from them). BitTorrent transfers are typically very fast, because all nodes in a

group concentrate on transferring a single file or collection of files. While the original

eDonkey2000 client provided little "leech resistance", most new clients have some sort of

system to encourage uploaders. eMule, for example, has a credits system whereby a client

rewards other clients that upload to it by increasing their priority in its queue. However,

12

the nature of the eDonkey2000 concept means download speeds tend to be much more

variable, although the number of available files is far greater.

A similar method to BitTorrent was the Participation Level introduced in Kazaa in 2002.

A user's Participation Level would increase when they uploaded and decrease when they

downloaded. Then when a user uploaded a file, the person with the highest Participation

Level would get it first, then the next highest, and so on. This can be visualised as a

pyramid, with the clients who have the most upload bandwidth available at the top and

those with less bandwidth on progressively lower levels. This is the most efficient way to

distribute a file to a large number of users: it is probable that even the people at the

bottom of the pyramid will get the file faster than if the file was served by a non-P2P

method. Unfortunately the Kazaa implementation is flawed as it relies on the client

accurately reporting their Participation Level, making it easy to cheat using one of the

many unofficial clients.

Limitations And Security Vulnerabilities

BitTorrent does not offer its users anonymity. It is possible to obtain the IP addresses of

all current, and possibly previous, participants in a swarm from the tracker. This may

expose users with insecure systems to attacks.

Another drawback is that BitTorrent file sharers, compared to users of client/server

technology, often have little incentive to become seeders after they finish downloading.

The result of this is that torrent swarms gradually die out, meaning a lower possibility of

obtaining older torrents. Some BitTorrent websites have attempted to address this by

recording each user's download and upload ratio for all or just the user to see, as well as

the provision of access to older torrent files to people with better ratios. Also, users who

have low upload ratios may see slower download speeds until they upload more. This

prevents users from leeching, since after a while they become unable to download much

faster than 1-10 kB/s on a high-speed connection. Some trackers exempt dial-up users

from this policy, because they cannot upload faster than 1-5 kB/s.

13

BitTorrent is best suited to continuously connected broadband environments, since dial-

up users find it less efficient due to frequent disconnects and slow download rates.

Applications

Because of the open nature of the protocol, many clients have been developed

that support numerous platforms and written using various programming languages

1. Anime fansub communities often use BitTorrent for their releases, and the most

popular announce sites like Animesuki and downloadanime.org have RSS feeds.

2. Blog Torrent offers a simplified BitTorrent tracker to enable bloggers and non-

technical users to run a tracker off their site with the added functionality of letting

visitors download a file even if they do not have a BitTorrent client installed by

automatically installing a client to download the desired file.

3. GunZ The Duel is a game with built-in torrent client (for in game use).

4. Blizzard Entertainment uses a version of BitTorrent in World of Warcraft to

distribute patches.

5. Popular Linux distributions, such as Ubuntu and Fedora, offer BitTorrent as one

of the download methods for installation CDs

Podcasting is starting to integrate BitTorrent to help podcasters deal with the download

demands of their MP3 "radio" programs. Specifically, Juice supports BitTorrent for the

RSS 2.0 enclosures that power podcasting.

14

CONCLUSION

BitTorrent does not offer its users anonymity. It is possible to obtain the IP

addresses of all current, and possibly previous, participants in a swarm from the tracker.

This may expose users with insecure systems to attacks.Another drawback is that

BitTorrent file sharers, compared to users of client/server technology, often have little

incentive to become seeders after they finish downloading. The result of this is that

torrent swarms gradually die out, meaning a lower possibility of obtaining older torrents.

Some BitTorrent websites have attempted to address this by recording each user's

download and upload ratio for all or just the user to see, as well as the provision of access

to older torrent files to people with better ratios. Also, users who have low upload ratios

may see slower download speeds until they upload more. This prevents users from

leeching, since after a while they become unable to download much faster than 1-10 kB/s

on a high-speed connection. Some trackers exempt dial-up users from this policy,

because they cannot upload faster than 1-5 kB/s.BitTorrent is best suited to continuously

connected broadband environments, since dial-up users find it less efficient due to

frequent disconnects and slow download rates.

15