Peer discovery is an essential part of the BitTorrent protocol. It’s how its downloads happen so quickly: You connect to multiple people, and each of them upload a little piece of the file to you. This phenomenon has created a very popular way to download and share information on the internet, both legitimate and illegitimate. Regardless of the effects it has had on intellectual property, I’m here to describe one thing: How the whole BitTorrent DHT peer discovery process really works. You may know a little bit (or a lot) about this mechanism, but surely enough you’re curious to know what the term DHT means and how the peers listed under it found you in the first place.

Download Torrent Trackers Using Hashtags

What Does DHT Mean?

Jan 12, 2013  The answer to 'Using info hash to download files' is. The infohash is a MD5 schecksum used to verify the the file(s) are the correct ones and have not been altered since the hash. Jun 25, 2011 - I have started using µTorrent to download torrents. Download the files that are associated with the hash file, then use a tool such as MD5. QBittorrent: how to add a torrent using it's hash? Any idea how to add a torrent from the hash? You must need trackers for a torrent to be downloaded in.

DHT is short for “distributed hash table,” and it represents a medium by which you find peers, also known as “bootstrapping.” I’ll explain that in a bit. Just keep in mind the fact that you can find peers through the DHT.

While many people say it’s decentralized, it’s actually very difficult to do this, given the unicast nature of the Internet. When you connect to the web, you don’t announce your presence to the billions of computers already connected. This would just waste enormous amounts of bandwidth. Instead, your local internet service provider’s router, as well as the destinations you connect to, are the only ones aware you’re even online. That’s what “unicast” means, in layman’s terms. Multicast is what happens when your computer gets into a local network. Its presence is made known to every other computer in the same subnet, and they’re now aware of your presence. Since this doesn’t happen in the external Internet, there’s really no way to actually compose a completely decentralized structure, given the limitations of the BitTorrent protocol itself.

Trackers

As a result, there tends to be two main DHTs that you connect to when you start downloading a torrent file: router.bittorrent.com and router.utorrent.com. In case you’re curious, you connect to them on port 6881. It’s not absolutely necessary to memorize this information. Sometimes peer data is embedded in the torrent file to make the process of finding peers easier.

Bootstrapping

To start gathering peers, one must first bootstrap into the torrent network. Bootstrapping is just a fancy way of describing the process of connecting to the DHT and finding peers. Once connected, the DHT server will send out a handful of peer IP addresses that you’ll also connect to. They’ll give you the addresses of peers connected to them, and so on, and so forth, until your peer list shows all the peers downloading (or seeding) the file you’re trying to get. It’s like following a tree from the roots to the branches.

Theoretically speaking, you only really need one single peer address to get all the other peers, since it will share the rest of the addresses with you. This saves trackers and the DHT a ton of bandwidth which would otherwise be wasted in sending lists of peers to every new peer connected and notifying each person when one of them disconnects. The hassle is minimized by making peers relay information to each other.

After you’ve found all your peers, your download begins!

If DHTs Are Out There, Why Do Most People Still Use Trackers?

DHT can be fun, but most people still use trackers to download their data. This is because of the inherent nature of the DHT. Let’s say I have a site where I upload a bunch of my open-source creations as torrents. To fully control what happens to those torrents, and protect the privacy of the individuals downloading them, it’s more lucrative for me to host my own tracker. Sites that post illicit downloading material use trackers as their medium of preference to maintain an underground aspect and control what gets published on them and what gets removed.

That said, not all torrent downloads are illegal. There’s a massive repository of open-source projects and public domain works by individuals who just want to share what they have without wasting the bandwidth of their web hosts.

Confused?

If you’re still puzzled by the information shared here, leave a comment below and we can discuss!

Image credit: DHT en.svg

by Martin Brinkmann on June 05, 2010 in Tutorials - Last Update: December 02, 2012 - 55 comments

If you have visited a Bittorrent website or torrent search engine lately you might have come upon magnet links that were offered on the torrent download pages. Chance is the magnet link did not really bother you since the torrent link was offered as well on the download page so that it could be downloaded and added to the Bittorrent software.

A closer look at the standard process of downloading files via torrents reveals several factors and parties that are necessary for this. The user needs a Bittorrent client like uTorrent or Vuze, a torrent file that is usually downloaded from a Bittorrent server which functions as a tracker and torrent provider and of course other seeders and leechers of that torrent.

A Bittorrent magnet link contains all the information needed to start downloading the files from peers directly. It is a server-less way of retrieving the right information to start downloading the requested files. A magnet link therefor is theoretically all that is needed to download files from other peers in the Bittorrent network. Magnet links can be distributed by email, messaging and other forms of communication but are most often found on the torrent sites that usually offer both torrent and magnet links to their users.

A magnet consists of several parts:

  • magnet: (This is the magnet link identifier)
  • ?xt=urn:btih: (Defines a Bittorrent Info Hash, the Edonkey identifier would for instance look like this xt=urn:ed2k:)
  • 5dee65101db281ac9c46344cd6b175cdcad53426 (The content hash)
  • &dn=name (The name of the file)

The full magnet link would look like this magnet:?xt=urn:btih:5dee65101db281ac9c46344cd6b175cdcad53426&dn=download. Detailed information about additional Magnet Link parameters are listed on Wikipedia. One useful parameter that has not been mentioned yet is the as= parameter which contains encrypted information about a download source. This speeds up the process of finding the first peers.

Download Torrent Trackers Using Hash On Line

Main Advantages of Magnet Links

The main advantage for Bittorrent indexers is that they do not have to store the torrents on their servers anymore which could be beneficial for them in several ways. It could reduce the pressure from the media creation industry and reduce hardware infrastructure expenses thanks to less tracking and downloading.

The end users on the other hand benefit from Magnet Links as well. All they need is the link to start downloading the files which makes them independent from torrent indexers. It also allows them to distribute the information more easily. Torrent indexers remain on the other hand the main source of information for new files that are available for download.

Magnet Links use DHT

A tracker less environment should raise a question of identification. How can a download be initiated ff there is no tracker to inform the Bittorrent user about other users who download and seed the file? The answer is DHT, Distributed hash tables. DHT is enabled by default in popular clients such as uTorrent or Vuze. Without going into to much detail, the hash of the magnet link is used to find peers using DHT.

Torrent files

Torrents are still essential for Bittorrent as they contain information about the download that need to be present in the swarm. The only aspect that is changing is the way the torrents are distributed which is shifting from Bittorrent trackers and indexers to the server-less DHT procedure.

Many popular Bittorrent clients support magnet links already. This includes uTorrent and Vuze for Windows and Transmission for Linux and Mac systems.

Advertisement