36

I use Transmission to download files but it says that a certain port is required to be opened. However, while this port is closed I noticed that I can still download files with no problem. But when I opened the port via my router I can see a significant difference in the download speed. I know the basics of "port-forwarding" and that it forwards the traffic to a certain device on a certain port. So I was thinking that my downloads would not proceed since the port was closed but it didn't. So my question is:

  1. How does port forwarding help in this situation?
  2. Why do my downloads speed up when port-forwarding is enabled?
4
  • 3
    I, too, am interested in your report of a speed difference. Are you able to check your results more scientifically? Mar 16, 2016 at 1:50
  • Port forwarding allows for seeding, faster seeding, and also allows other peers to find you, rather than your client having to go search for other peers. Not sure if this affects download speed though.
    – ecube
    Mar 16, 2016 at 1:58
  • @tudor not really. I just noticed the significant difference on my Freenas using Transmission.
    – JohnnyQ
    Mar 16, 2016 at 3:10
  • 1
    "significant difference" - that is presumably a significant improvement.
    – MrWhite
    Mar 16, 2016 at 17:41

3 Answers 3

57

In short: for BitTorrent (p2p) protocol to work at least one peer has to have a publicly open port (be an active node).

You can run Transmission without port forwarding (stay a passive node) and you will connect, download and seed files with no problems. However your client would only be able to communicate with active nodes.

With port forwarding enabled on your side (becoming an active node) you are increasing the number of peers you can communicate with (you can then exchange data with passive nodes).

This influences the overall transfer rate as the file would be downloaded simultaneously from a larger number of nodes.

The document Analysis of BitTorrent and its use for the Design of a P2P based Streaming Protocol for a Hybrid CDN contains graphs comparing the transfer speed between "firewalled" and "open" peers (refer to page 8):

enter image description here

2
  • The way I understand it (which may be wrong) is that with no open port, your client has to find and initiate all connections to other clients. It only looks for new connections every so often, sometimes with long delays between tries, so it can be much faster if other clients can find you too whenever they happen to look. This is really just another way of saying the same thing as this answer.
    – Joe
    Mar 21, 2016 at 18:30
  • @techraf So would you completely rule out the possibility of two passive nodes connecting ? But, I heard a concept known as nat hole punching wouldnt it be used by passive nodes ? May 20, 2020 at 18:35
20

If uPnP/NAT-PMP was turned off on your torrent client, router, or both, then Inbound connections wouldn't work. You would then need to forward the port to your machine in your router's config or turn uPnP on. Since the forwarding/uPnP mapping is there for inbound connections, it could allow more peers through that previously couldn't connect to you. So if you had forwarding AND uPnP off, then enabled one of them, that might result in an increase.

Barring that, as far as I know, there are no large differences between uPnP vs. manual port forwarding in regards to speed. Maybe some other event happened around that time e.g. you were connected to more peers, your ISP does port based traffic shaping, interference from other programs, etc. but assuming that's not the case, there should be no difference.

(My original answer was not that clear, I'm sorry. Hopefully this is better.)

2
  • 10
    Anyone who cares about security would ensure uPnP is off. It's a terrible idea!
    – hookenz
    Mar 17, 2016 at 2:20
  • @MattH Yeah, I didn't bother getting into that because I wanted to be concise. Good to point out though.
    – BrianC
    Mar 17, 2016 at 3:05
3

If you have port forwarding enabled, then incoming connections can find your torrent node. Otherwise, the only connections made will be outbound ones.

Of course, you can download using only outbound connections, but you will have a smaller pool of potential nodes to connect to (as other nodes without port forwarding cannot be connected to). As a result, you will likely get a slower overall download speed as you will have fewer active peers. You will also be less likely to find out about isolated peer pools via DHT.

This will affect you even more if you have encryption set and mandated as this further reduces your potential pool of peers.

If your router has uPNP enabled, then most torrent clients will take advantage of this to automatically set up port forwarding. Otherwise, you will need to set it up manually in the router configuration - the method to do this depends on your router, and the port range to forward depends on your client setup.

1
  • This is what I was going to say. Some torrents have almost no activity with the port closed. I often see that a vast majority of my connections are incoming. And they don't happen unless a port is open. Also, aside from any security concerns, if you have an old router, using uPNP can fill up the table in the router and cause other problems.
    – Joe
    Mar 21, 2016 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .