Tweaking your system to get the most owut of bittorrent

xiaoxiao2021-03-06  100

Tweaking your system to get the most owut of bittorrent

Purpose How BitTorrent Works (and Most Other P2P Sharing Networks, TOO) Firewall Configuration Bittorrent Client Configuration History Further Reading Version Information

Purpose

Far too many people new to BitTorrent just install the client and expect everything to magically work. Then they connect to a torrent that has a ton of seeds, they get a horrible download rate and a high upload rate, and they think BitTorrent sucks. What they do not know is that their problems are almost certainly due to misconfiguration of their systems and a lack of understanding of how BitTorrent (and other p2p sharing) works. The purpose of this document is to educate you, the reader, and hopefully help You Tweak your system to get the MOST OUT OF BITTORENT.

How Bittorrent Works (and Most Other P2P Sharing Networks, TOO)

Basic Networking: IP Addresses and Port Numbers

I'm going to give a rudimentary explanation of networking as I Go Through this, in an attempt to make sure. Fel free to skip this section step if you already know this stuff.

When your computer connects to the Internet (whether via dialup, DSL, cable modem, or whatever), it has to have a unique identifier associate with it, so that all of the other computers on the Internet can talk to it. (Kindof like a driver's license number, or a Social Security number, or even a telephone number.) This identifier is called an IP address. Since computers work best with numbers, an IP address is actually just a really big number. When your computer wants to download something like a file or a web page (or upload, for that matter) it figures out what the IP address is for the computer you are talking to, and it tells the computers around it that it wants to talk to the target computer. kindof like the old game of telephone, the message eventually gets to the target computer and it talks back to your computer in the same manner.Since computers can talk to many different computers at once, and can talk about a variety of different things (web pages File Sharing, Video Down loading, real time audio, etc.), they have to have a way of differentiating which conversations are about what. Again with the numbers, computers on the Internet group all related things by giving them the same port number. For example, web pages tend to be on port 80, secure web pages are on port 443, programs from companies for download (like shareware) tend to be on 21, and so on. It is the combination of the IP address and the port number that makes the conversation Between Two Computers happen.

Basic Filesharing: Client-Server and P2P

Again, Skip Ahead if you know this part. I Won't be offended.

A few years ago the Internet was pretty easily divided into two groups:. Servers and clients (. Just like at a restaurant) There were not that many servers, but their primary job was to hold web pages and files to be downloaded They. did not do much other than sit there and wait for people like you to request a web page or file. you, as the client, probably did not share any files or web pages with anyone. This segregation was primarily due to the fact that it takes a lot of outgoing bandwidth to share stuff. in a time before broadband DSL and cable modems, back in the days of dialup, most people did not have the bandwidth, let alone the knowhow to share stuff on their own. This old system was called client-server, appropriately enough, and it is still used today for the vast majority of stuff on the Internet, including web pages.With the advent of broadband technologies such as DSL and cable modems, the everyday user like yourself suddenly HAS A Big Chunk of Bandwidth, Not Only For Download d, but also upload. Sharing files directly from your computer (without first sending them to a server) is now a reality. This is where p2p comes in. The acronym p2p stands for peer-to-peer, which basically means client to client . That is, you download files from people like you instead of from big servers, and in turn they download files from you. you share your files, your friends share their files, and everyone talks directly to each other.

Basic P2P

We'll use three people to demonstrate the concepts here:. Alice, Bob, and Charlie For all of the examples, we assume that Alice is a total newbie and has just installed her first p2p software, has nothing to share, and is looking to download something. Bob is sharing a few things, but is also looking for more stuff to download. Charlie is sharing a bunch of stuff but does not spend much of his time looking for new stuff to download.For pretty much all p2p systems Most People Follow these Basic Steps:

Search for something Get a list of everyone who is sharing what they want Go through the list and ask each person on it if they will please send the file Once the file is complete, start sharing it with other people in the system

So, Alice searches for Matrix Reloaded, finds out that both Charlie and Bob have it, and asks both of them to please send her the file. If they are not too busy helping other people, hopefully they'll be able to help her Out. Once She Has The File, She Starts Sharing IT As Well, So That Other People Can Get IT.

BitTorrent follows this progression closely, with a few differences. In many systems (such as Napster, KaZaA, or eDonkey) searching for a file is built right into the program. BitTorrent is not meant to be a full-blown network like they are And So it Doesn't Have this feature built-in. You Have to find the Torrents yourself, Probably with Google or Some Other Popular Search Engine. The Other Difference is in the Way Sharing Works.

Basic Bittorrent Sharing

The problem with most P2P networks is that many people just do not like to share. They open up their program, download their files, then close the program before they can help anyone else. It's called leeching. Behavioral judgements aside, if everyone did this then nothing would ever get shared to combat this, BitTorrent has gone back to the way of sharing you were probably taught as a young child:!. trading Instead of waiting for the complete file to download before it starts to share, BitTorrent downloads the file in small pieces and shares each piece as it finishes. This makes it easier to get the file from many different people at once, thereby increasing the probably that you'll get a good download speed. It also means that downloading a file is more reliable than in some other networks. If Charlie has half of a file and Bob has the other half, Alice can get each half and put them together to get the whole file. Spiff, eh? But this piecewise downloading does not necessarily combat th E Leech Problem. As A Backup Plan, Bittorrent Builtin The Other Half of Trading You Probably Learned As A Kid: Tit-for-Tat. That IS, IF You Give Me One Piece, I'll Give You One Piece Back. Bittorrent will give you a few pieces of the file for free to help you get started, but after that you need to start giving some pieces back if you want to keep downloading. If you do not share, eventually everyone else will stop talking to you . Just like when you were a kid with your toys on the playground. In fact, BitTorrent goes one step futher and actually starts to favor the people who share the most. This means that the more you upload, the faster you'll download.

For example, Alice gets a few pieces of a file from Bob for free. She can then give those pieces to Charlie, if he does not already have them, which will motivate Charlie to return the favor and give her a bunch of pieces that she does not have. She then goes back to Bob with those pieces, and the cycle continues and grows. Why do not Bob and Charlie talk directly? Maybe they do but they have not gotten to those pieces yet. Or maybe their systems are not configured right and they can not talk directly to each other.How does all this start? with BitTorrent, it starts with a tracker. Like the name suggests, a tracker keeps track of people who are interested in torrents. When you download a .torrent file it contains a link to a tracker as well as an identifier (hash) which is unique to that specific torrent. Your BitTorrent client then connects to the tracker and asks for a list of all people interested in that torrent. At the Same Time, The Tracker Adds You To That List So That Other People Kno w that you are interested Your BitTorrent client will also periodically asks the tracker for an updated list That's all a tracker does:... keep track of that list for each torrent, and give it out to people who are interested The tracker does not know ...................... ..

Firewalls

This is where things get hairy. In all likelihood, you may be behind a firewall. Many people are. A firewall is like a personal bodyguard for the Internet. You talk to your firewall, and your firewall talks to the Internet for you. That way, you do not have to talk to the Internet directly, and any bad people on the Internet can not bug you. By their very nature, firewalls are paranoid and untrusting things. For the most part, a firewall will not let anyone talk to your computer unless you tell it to let them, and telling it to let them is tricky. Since most firewalls assume that if you talk to another computer then that computer is allowed to talk back to you, many P2P networks will try both methods.Let's assume that both Bob and Charlie are behind firewalls, while Alice is not. Alice can not start a private conversation with either of them, as she can not get past their firewalls. Both Charlie and Bob can easily start a conversation with Alice HOWEVER, BOB AND Charlie Can't Talk to Each Othe R Because They is Both Behind firewalls and neither can start the conversation. like SO:

Nat and port forwarding

But wait, it gets worse! In addition to being behind a firewall, your firewall probably performs something called Network Address Translation, or NAT for short. (Some geeks also call it masq, but the rest of the world calls it NAT.) Remember how having your IP address is the key to other computers talking to you? An extra layer of paranoia and security is to have your firewall give you a fake IP address so that even if they wanted to people could not talk directly to you. Like having a phone number that starts with 555-. you start a conversation with someone else, your firewall intercepts it and actually starts the conversation for you, and the computer on the other end talks with your firewall as if it were you. In fact, the computer probably can not tell the difference between you and your firewall. The problem is that your computer probably only knows about this fake IP address, so when it talks to the tracker and tells the tracker to add it to the list, it gives Tracker the Wrong IP address. When the tracker gives out that fake IP address to someone else and they try to connect to you to give you some of the file you want, they can not find you because your IP address is bogus. So instead of giving out Your Fake IP Address To The Rest of the World, You NEED TO GIVE The AN IP Address That The CAN Actually Talk To: The IP Address for your firewall.

One more hurdle to go. Remember how firewalls do not normally let other people start talking to you without you talking to them first? Even if you give out your firewall's IP address to everyone else, when they try to start a conversation with your firewall it will just ignore them, as it does not know what they want and it does not trust anyone. Logically then, you need to explain to your firewall that in some instances it is okay for people to start conversations with you. This is where those port numbers come back in. The port number that the other computers use to describe the conversation they are starting will let the firewall know what they are talking about. The firewall can then check and see if that port number matches something you want people to come directly to you for, and it will let them start talking to you. Since your firewall is forwarding on the conversation to you, this is called port forwarding.Once you get the bogus IP address issue and the port forwarding straighte ned out, people will be able to talk to you. Let's say that Charlie, being such a hip and knowledgeable guy, has this all set up. Bob, on the other hand, has not figured it out yet and is still setup incorrectly This Means That Now Alice and Bob Can Start Talking Directly To Charlie, But Neither Alice Nor Charlie CAN Start Conversations with bob. Like So:

But what does it all mean?!?!?!?

Look at the diagram above. Remember how BitTorrent requires you to trade pieces in order to get good download speeds? If Alice and Charlie can not upload pieces to Bob, Bob will eventually start ignoring them. When that happens, Bob loses out because they 'll start ignoring him back. Everybody loses. Since Alice and Charlie can converse freely, they are going to probably get good download rates from each other. In other words, the more people that can talk to you, the better your speeds are going To Be. configuring your firewall and bittorrent client correiff goods essential for getting goodwload speeds! firewall configuration

Forward The Bittorrent Ports to your computer

Most hardware firewalls (such as firewall routers) have the capability for port forwarding. If you are running a software firewall (such a ZoneAlarm or BlackIce), then portforwarding is probably called something else, like "Application Internet Permissions" or somesuch. The BitTorrent client will normally use ports 6881 to 6889, so when you are adding the ports to your firewall, make sure you cover the whole block. Many newer BitTorrent clients have larger or changeable port ranges, so check with the instructions for your client software first. For most of these instructions you will need to know what your computer's IP address is. Under Windows NT, 200, and XP, go to Start >> Run >> type cmd and click OK >> at the prompt type ipconfig and press Enter. Under Windows 95, 98, Or Me, Go To Start >> Run >> Type Winipcfg and Press Enter.

Linksys firewall router

Access your Linksys Firewall Router's web admin page, according to the instructions in the manual for your router. You will probably need to enter a password. At the top of the web page there is a series of navigational links, and you want the one that Says "Advanced". from there "Forwarding". Find An Empty Row in The Form On That Page, And Fill in The Name ("Bittorrent"), The Port Range (6881 To 6889), Check The TCP Box And set the ip address to the one thing your computer is. Check the enable box kilick the apply button to save the change #NETGEAR RT 314 (AND POSSIBLY Other Models)

From Pezko Stenmark:

Access the web administration interface. Then click Advanced in the menu to the left, then click Ports. Use an empty row (everything is zero) and enter in the first column ( "Start Port") 6881, in the second column, enter 6889 , And the Last One, Enter the IP Address for the Computer Running Bittorrent. Click The Apply Button, And You're DONE

NETGEAR RP114

From adam johnston:

Under Windows NT, 200, And XP, Go To Start >> Run >> Type Cmd and Click >> At The Prompt Type Ipconfig and Press Enter. Under Windows 95, 98, Or Me, Go To Start >> Run >> type winipcfg and press Enter. 'IP address' is the address of your PC, 'Default Gateway' is the IP address of the router in Internet Explorer (or another browser) type the IP address of the router into the address bar. Enter in Your name and password. (Defaults Are 'Admin' and '1234') Go To 'Advanced' >> 'Ports' In The "Start Port" and "end" fields enter the port range (6881 to 6889), and in The "Server IP Address Field" ENTER in the ip address of your pc. Apply.usr Broadband Router

From ANDY HANINGER:

ON The USR Router, It's An Option In The Web-Based Config Tool. The Option IS Called "Virtual Server" and you enter the port and the ip of the virtual server for it to forward. (The Computer Running Bittor "

Linux iptables

From SDE:

iptables -t nat -i preording -p tcp --dport 6881: 6889 -j dnat --to-destination ... Where

.

Shorewall for Linux

From mike808:

For Systems That Are Using Masquerading (NAT) And Have Something Like The Following:

IN / etc / showall / masc:

# All outgoing traffic from 192.168.1.X going out the eth0 interface # will be NATed / masqueraded to appear to be originating from your external # internet address A.B.C.D (i.e. SNAT outgoing packets) eth0 192.168.1.0/24 A.B.C.D

AND IN / ETC / ShoreWall / Rules:

# Allow net zone traffic on the external interface to be destination NATed (DNAT) # to your computer's internal IP address (for example, 192.168.1.X) # Allow BitTorrent traffic through - port 6969 is if you run a tracker # And ports 6881 THROUGH 6889 Are For Incoming Bittorrent Connections.dnat Net Loc: 192.168.1.x TCP 6969DNAT NET LOC: 192.168.1.x TCP 6881: 6889Linux ipmasqadm

From ANDY HANINGER:

Ipmasqadm portfw -f (Flushes All Other Rules .. Optional)

Ipmasqadm portfw -a -p tcp -l [firewall ip] 6881 -r [client ip] 6881

Other firewalls

I'll try to add new firewall configuration instructions here as I go. If you have a firewall and can type up clear instructions that you think will help others, please email them to me at the address provided in the Version Information section of this page .

BitTorrent Client Configuration

Setting your External IP Address Correctly

This is actually pretty tricky. Every time you disconnect and reconnect to the Internet, you have a good chance of getting a different IP address. If you are a dialup modem user, it's pretty much a guarantee. Broadband cable and DSL users get new addresses somewhat infrequently, since they are always online. (you probably only get a new one when your service provider is doing network maintenance.) If you are behind a firewall, it probably handles all that for you without you having to worry about it. However If you are going to set your bittorrent client up to tell the TRACKER TELL TELL TRACKER TORRECT IP Address, you need to know what it is. The Easiest Way Is To Go To a Web Site Which Will Tell You, And A Search for "Check IP address "will probably turn up a few (checkip.dyndns.org, whatismyipaddress.com, bnl.gov, dnsart.com). The official BitTorrent clients all support a commandline option to tell them what your IP address is (--ip 1.2 .3.4) SO Just Substitution in your ip address and you are good to go. If you start getting weird errors from the tracker, or you can not seem to download anything, your IP address may have changed and you may need to update the BitTorrent commandline options. Yes, it sucks to have to do this manually , But it really does help. Your Bittorrent CommandLine Will Then Probably Look Something Like this: "c: / program files / bittorrent / btdownloadgui.exe" - IP 123.45.67.89 --Responsefile "% 1"

This step may be unnecessary, depending on how smart the tracker you are talking to is. You should try the port forwarding instructions in the previous section first, and then do this if it does not seem to work.

History

The BitTorrent client that runs Deliver8r's Alias ​​site has been set to only send data to people that it can connect directly to. People who are incorrectly configured (behind a firewall without port forwarding) can still join the swarm and download from other clients, but since the primary seeding client will not talk to them they are at a serious disadvantage. If a torrent is out of seeds and they can not talk to the primary seeding client, odds are they will never get the file they want. Hopefully, this document has helped anyone suffering from this problem to resolve their issues by correctly configuring their system. This probably was not the first site to go to such a system, and it probably will not be the last. Configure your system correctly now and save Yourself Future Headaches.further Reading

How BitTorrent Works, 101 Official Bittorrent FAQ

Version Information

2003-05-21 -

First Version.

转载请注明原文地址:https://www.9cbs.com/read-104839.html

New Post(0)