4

I was just downloading a new distro of linux using uTorrent, and started to wonder how uTorrent (and other bittorrents) send files to eachother through NAT routers? They obviously use the trackers to get introduced, but how do they pass info to eachother? Is there a whitepaper on this? I couldn't find one :/
Thanks

Jess
  • 8,628
  • 6
  • 49
  • 67

2 Answers2

2

Most of the time, they don't. I have a restricted network, and every time I run my torrent program it warns me that some of the ports/functionality required is not available to me.

If one party has a restricted network and another has an open network, the restricted client will always connect to the open client. If you have two restricted clients they will not be able to connect to each other. The reason it works at all is that most (enough) of the people on the torrent network do have some kind of port forwarding or UPNP (universal plug and play) to facilitate this.

caesay
  • 16,932
  • 15
  • 95
  • 160
  • 3
    For the most part I would agree, the thing is that some routers have upnp that allow foward ports, you can also use Nat hole punching, etc. But for general purposes, you are right. – Jess Jul 06 '10 at 20:40
0

Torrent clients work on the basis of what are known as Distributed Hash Tables. They start off with a set of known roots, and branch out looking for other, connected nodes (i.e., neighbours). Establish connections to them, and keep this up, up to a set limit. Since the client is initiating the connection, all the remote has to do is feed the data back, and you get it through the NAT just fine. It's how network traffic works.

jer
  • 20,094
  • 5
  • 45
  • 69
  • yes, but how would a client establish a connection to another behind a NAT? This works fine for the net because every web server has a public IP only – Jess Jun 10 '10 at 22:25
  • There are various technologies, like Universal Plug & Play which help facilitate this behaviour. – jer Jun 11 '10 at 00:29
  • 1
    DHT is there to supplement or replace tracker based peer discovery. It's *not* a NAT traversal solution though NAT can affect it as well. – Alex Jasmin Jun 14 '10 at 14:13
  • I didn't say they were, though reading what I did write out, I can easily see how that was inferred. My apologies for not being concise. – jer Jun 14 '10 at 16:05