Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm considering a file distribution between branch offices that uses Bittorrent. I understand that a Bittorrent client needs ports in the range of 6881-6999 to be forwarded to the internet to make the transfer faster.

What I don't understand is: how does this make things faster? I could understand if failing to provide proper means of communication between clients would prevent them from speaking to each other. But everywhere I look I just see the advice "Just forward the ports and the transfer will speed up".

Sorry if this seems off topic, but it strikes me as network related.

share|improve this question

7 Answers

There is a ton of poor data in this question. Bittorrent works with a "tit for tat" scheme, wherein clients that are uploading get preference in downloading. To upload data, other clients need to be able to connect in to you, which can't happen if you're NATed or firewalled off. Thus, you open ports to allow other clients to connect in, you upload some data, and you get higher priority downloads.

There's some NAT circumvention stuff in there if the other client isn't firewalled/NATed, but at least one side has to have the open ports.

If it's all your private network, you could fudge the client to not do that preferential sending, but that's probably a lot more work than just opening the ports.

Here's a trivial reference for this behavior.

Also, you don't need to use those ports. Any port range will work as long as your client knows what's open to it so that it can inform the tracker.

share|improve this answer
It doesn't have to do with NAT translation being slower, nor will the BT tracker proxy sending between clients. Where did all of this misinformation come from? – Bill Weiss Sep 2 '10 at 20:23

I could be wrong but the ports that bit torrent needs are used more for sharing than the downloading side.

share|improve this answer

It is for connectivity so that other bittorrent clients can 'see' your machine. If they can see you, then can send or receive data from you.

I wouldn't worry about it if you are just transferring private files. The clients will see each other some how. In fact you should shut off other DHT or discovery.

share|improve this answer

I believe that it allows the trackers and clients to poll the Bittorrent server (your machine) more accurately and faster because it doesn't rely on NAT translation to get where it needs to go.

share|improve this answer

When you're download via bittorrent, you can transfer the data over a proxy, or by forming direct connections with other users. Because users are connecting to your machine, they need the ports to be opened. Otherwise, it will use NAT to resolve connections to your machine--which is slower and not supported by all clients. Hence, less clients equals slower downloads.

share|improve this answer

"I'm considering a file distribution between branch offices that uses Bittorrent."

This doesn't strike me as the best idea. Why not use something like DropBox? https://www.dropbox.com/

share|improve this answer

In order for BitTorrent to be able to download chunks, it first needs to connect to a client that has the chunks that they need. There are two ways to establish this connection

  • Connect to the client and ask for chunks
  • Upload a chunk to a client, and while that connection is open, ask for chunks in return

For the first one to work, the firewall needs to be set up to allow incoming connections on the ports that Bittorrent is listening on. This is no different then if you set up a web or FTP server.

The second one is generally used as a fallback, as most firewalls are configured to restrict incoming connections, but allow any outgoing connection, and to continue to allow connections that have been established between two computers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.