views:

64

answers:

2

Hey guys, 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,
Max

A: 

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
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
mazzzzz
jer
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.
Alexandre Jasmin
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
+1  A: 

Well, in reality, most of the time, they don't. Almost every time I run my uTorrent program it warns me that some of the ports/functionality required is not available to me. The way that it works in that case, is if one of you are not behind any firewall/router restrictions. The restricted client will connect to the open client and data exchange will happen that way, to my knowledge. That is why sometimes you will get great speeds from some people, but nothing from others... because you can't connect to them, and are just informed of their presence.

This is what I was told, I can not verify or nullify it.

Tommy
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.
mazzzzz