Mandriva

BitTorrent

Description

This walkthrough is intended to bring together all the help provided in Mandriva Club and elsewhere into one place.

Please read through the whole of this walkthrough, so that you can decide which is the best way for you to go based on your level of experience.

Bittorrent is a Peer-to-Peer protocol which allows the download of data and has found a lot of use in distributing very large files, in this case Mandriva ISO's.

Unlike FTP access where you are dependent on available bandwidth (and the number of people downloading at any one time) Bittorrent users are downloading from each other, as well as uploading to each other. In this way you will hopefully avoid the flooded FTP servers when a new Mandriva comes out, as well as being able to get the ISO's before they are available to the general public via the Mandriva Club torrent files.

Using Bittorrent will also help Mandriva in terms of reducing the need for costly bandwidth and hardware for download servers. As more people regularly provide their maximum possible upload bandwidth, the faster the downloads will get for everyone!

The BitTorrent files from the Mandriva Club are limited in time. So if your download is already very slow, reopen the BitTorrent file from the Mandriva Club download page after some time.

Please remember that for Bittorrent to work, every connection is important - in other words the more connections, the faster and better for everyone. So please keep your connection going for as long as possible (or resume after you have installed!) so that others can benefit as you have done. Thanks! :-)

The Club forum is here to help! Any problems - please post!

Installation

What do I need?

  1. You will need a .torrent file containing details of your selected ISO (see below).
  2. You will also need a BitTorrent client (application) to manage the actual download itself.
  3. It may be obvious but you need enough space in the partition you are downloading to.
(If downloading to a Windows partition, bear in mind the maximum file size limit in FAT32 is 4Gig, which is not enough for a Powerpack DVD ISO!)

Where do I get these from?

A .torrent file

Your .torrent file is available from http://club.mandriva.com/xwiki/bin/Downloads/MyTorrents. Simply select the ISO of your choice and download the file, which will be called....

mytorrent-(your username).torrent

(Please note that this file is unique to you and your current internet address. This means that in most cases if you log off or disconnect from your ISP, this file will no longer be of any use to you and you will have to download another .torrent file from the above page. This is not as bad as it may seem * see below).

B BitTorrent client

There are various BitTorrent clients that you can use (link details below) but for the purposes of this article we will use the most common - the latest *BitTorrent RPMS and Azureus.

  • The main BitTorrent RPM and GUI RPM (plus their dependencies........wxPythonGTK and libwxPythonGTK RPMS).
You can obviously download the packages seperately if you want to ;-) but the easiest way to get these RPMS installed is either through Mandriva Control Centre > Software Management > Install or using the 'dreaded' commandline (logged on as root) with the command: -

urpmi bittorrent-gui

Both these methods will get the BitTorrent packages and dependencies for you, but although they are in the 'Main' repository make sure you have a 'Contrib' mirror in your source list. This is easy! Simply go to… http://club.mandriva.com/xwiki/bin/Downloads/MirrorFinder and follow the instructions to install the mirror(s).

  • Azureus
To use Azureus, you must have the latest Java package installed. Simply go to Mandriva Club RPM Download page and download the latest J2re rpm.

Then download Azureus from Sourceforge

Place the tar file in the directory of your choice. Use a GUI program such as Ark to extract the files into the directory. If you prefer the commandline, use the command: -

tar xvjf Azureus_x.x.x.x_linux...tar.bz2

This will place the Azureus folder into the directory. Change to the Azureus directory and through the GUI double-click on the Azureus shell script, or from the commandline, go to the directory containing Azureus and type

./azureus

The first time Azureus is run, you will get the Configuration Wizard, like this: -

http://uk.geocities.com/[email protected]/snapshot6.jpg

When you have completed configuration (following this walkthrough), you can open a .torrent file and begin your download, which will look something like this: -

http://uk.geocities.com/[email protected]/snapshot3.jpg

(Azureus potentially contains a lot of information which it can display graphically and as such it is advisable to check out the home page for full details of what's available. * Please see the Azureus homepage).

Where can I find a Windows or Linux alternative?

There are many others as well. The Bittorrent FAQ is a perfect place to find a BitTorrent client:

http://www.dessent.net/btfaq/#where

So that's it then?

No – there needs to be a little tweaking to get the best download performance. The most important points to note are: -

  • you need to open certain *ports in your firewall to allow Torrent connections.
  • you need to specify your system's upload speed, otherwise your download speed will be adversely affected (due to the peer-to-peer nature of the torrent).

What ports are needed?

Mileage varies here with the main port being port 6881. However opening the below ports have been reported to assist in getting best speeds: -
6881-6889
6969
and 7070

What upload speed shall I set?

Your upload speed should be set at 80% of your connection's maximum upload capacity. For instance, on a 512k ADSL line, the upload limit to set for BitTorrent should be between 10 and 12KiB/s. On a 1024k ADSL line, 20KiB/s has been reported as giving good results. If you have an even faster 'pipe', set at 80% of upload capacity or tweak away, but remember that you are penalised if you restrict upload speed too much, * after all it's a peer-to-peer system!*

Everything set, so how do I start the download?

Open the Bittorrent GUI window by going to the directory where your .torrent file is and use this command (but remember to change the upload rate to your correct setting!): -

btdownloadgui.py ––max_upload_rate 12 mytorrent-yourusername.torrent

Select 'Open with' > 'OK'

As from the latest Bittorrent RPM at time of writing (May 2005* Bittorrent v4.01) there is now a slider within the GUI which does the same as the above commandline, which makes things even easier: -

http://uk.geocities.com/[email protected]/snapshot2.jpg

Typically the download will start slowly, so don't get put off if you see 100hrs+ estimated time left to begin with! You will connect to peers and after a while (all things being equal) the download will increase in speed. This download speed will fluctuate throughout the whole download process, depending on how many peers and seeds are available to you, internet traffic, ISP bandwidth throttling, etc.

One of the reasons why some people experience slow speeds is that some folks simply disconnect from the torrent as soon as they have downloaded their file, instead of leaving it running for a while to allow more upload/transfer to others.

Can I use a browser?

If you click on a ".torrent" link from your browser, the bittorrent downloadclient should start and download the target of the torrent-link automatically. But most browsers by default are not configured to handle ".torrent" links.

To configure Mozilla, go to "Edit > Preferences > Navigator > Helper Applications". Click on "New Type" and specify a new MIME Type "application/x-bittorrent", with Extension ".torrent". Click on "Open it with" and enter "btdownloadgui.py" in the box. Click OK and close the preferences window.

To configure Opera, go to "File > Preferences > File Types" and click on "New". Specify a MIME Type "application/x-bittorrent", with File extension ".torrent". Click on "Open with other application" and enter "btdownloadgui.py" in the box. Click "OK > Apply > OK" to close the preferences window. For most browsers the procedure is similar as with Mozilla/Opera.

If you install mailcap-2.0.4-9mdk or higher, the above steps won't be necessary for most browsers. Download it from the Mandriva RPM Download Page

Common Error Messages

'404 Not found'

  • Your internet address may have changed since you downloaded the .torrent file.
Line dropped? Had to disconnect? Simply re-download the .torrent file!

Don't worry – you will NOT have to start from the beginning, as the BitTorrent client will check the download so far and then resume from where you left off! (phew!)

  • Your ISP may be using a Transparency Proxy where your true internet address is behind your ISP, so the tracker cannot see it.
One easy fix for this issue which works for many users is to download the .torrent file via https instead of http. On the My Torrents page, copy the link to the torrent file to the clipboard (you can right-click the link and select "Copy Link Location" in Firefox: other browsers usually have similar options). Paste the link back into the URL bar of the browser, change the http:// at the start to https:// , and hit enter. Now proceed as normal.

If this doesn't work, please try the step below.

It may clear this problem if you forward the torrent data to the correct address. This is particularly relevant if you are behind a router. Go to the Club torrent main page..... http://club.mandriva.com/xwiki1/bin/view/Downloads/MyTorrents and copy your internet address. Then, open a terminal as root and paste the internet address into the following command: -

iptables -t nat -I PREROUTING -p tcp ––dport 6881:6889 -j DNAT –– to your_current_ internet_address

You can check if your Internet connection uses a proxy on this page: http://www.lagado.com/proxy-test

*ISO's are not working

Every ISO has an md5sum file attached to it which contains a 'sum' of the original ISO, based on an algorithm. With this md5sum file you can check the byte-for-byte integrity of the downloaded ISO, by checking the md5sum file against the downloaded ISO file.

If the md5sum of the ISO does not match the posted md5sum, then the download is corrupted * that is it is not a true copy of the original.

Always verify your download! Although Bittorrent checks file integrity, it is still advisable to check the *md5sum before you burn to CD/DVD. See http://www.linuxiso.org/viewdoc.php/verifyiso.html

(For information, the burner software K3b can also check the ISO md5sum for you, prior to burning).

Some md5sums: -

132d0fea15e901f4ef7f1a9647a77d49 
Mandrakelinux-10.1-Official-Powerpack-CD1.i586.iso
19d00e9fcbaad73e1b082b26f28695d1 
Mandrakelinux-10.1-Official-Powerpack-CD2.i586.iso
85c08d954186531363e8533e107d8897 
Mandrakelinux-10.1-Official-Powerpack-CD3.i586.iso
c06ecf43e722b37c90e4ba14a0b68302
Mandrakelinux-10.1-Official-Powerpack-CD4.i586.iso
efe85416a3f3d69e8b0931e7db604377
Mandrakelinux-10.1-Official-Powerpack-CD5.i586.iso
e72652acaeb21059a536d3d6fb8a3055
Mandrakelinux-10.1-Official-Powerpack-CD6.i586.iso

1.1'Bad file info'

You may not have downloaded the torrent file properly. The file needs to be named 'mytorrent-yourusername.torrent' and have 'd8:announce95:' at the beginning of the file. This problem is normally avoided by clicking on the provided links.

A similar error is caused by saving the torrent files with "End Of Line" (CR+LF) characters in Mozilla 1.4 and 1.5rc2. The files may be fixed by using the 'dos2unix' command, or manually remove the characters by hand. Another solution is to download the files with Konqueror or Opera instead of Mozilla.

!–– "I am using Mandriva but I'm not able install the 'bittorrentgui' package"

Use the bittorrent package which provides a command line 'ncurses' version. The GUI version doesn't provide any additional features yet requires 'wxPythonGTK' and 'libwxPythonGTK2.4' (which is located in Contribs). Some members have experienced problems because two different python packages were installed at the same time.

To use BitTorrent from the command line, you just need to enter the following at a console (but remember to change the upload rate to your correct setting!): -

btdownloadcurses.py –max_upload_rate 12 mytorrent-login.torrent

'Import Error-No module named BitTorrent'

The problem may occur if one replaced python2.2 by python2.3, the BitTorrent modules will not be found, since the default search path is different. In this case, setting the environment variable PYTHONPATH to "/usr/lib/python2.2/site-packages/" may help (Note: this is dependent on the version of your BitTorrent rpm, but setting this variable doesn't hurt in any case)

'General problem with download'

Due to unpatched software or hardware errors the download can stop or be slow. So restart your Torrent client program. It could help to stop and start a Torrent download or toggle the force to download (context menu option).

Advanced

Configuring bandwidth rates with trickle

Currently, bittorrent has no option to limit the overall upload rate for several clients at once. However, it is possible to accomplish this with "trickle". Install the trickle RPM from Club and start the daemon with: 'service trickle start'.

You can now start your download clients with 'trickle btdownloadgui.py file.torrent', or put 'trickle btdownloadgui' in the MIME-setting of your browser, as detailed above. The overall bandwidth of all clients will be limited by the trickled daemon.

Configuring bandwidth rates with CBQ

There is also a possibility to configure your bandwidth at kernel level in much more detail with Fair Queueing with 'CBQ'. You can download an init script at: - http://sourceforge.net/projects/cbqinit

Put the initscript in /etc/rc.d/init.d/ and put the below example configuration in the file

/etc/sysconfig/cbq/cbq-104.bittorrent-client0

DEVICE=eth0,10Mbit,1Mbit
RATE=104Kbit
WEIGHT=10Kbit
PRIO=5
RULE=,:6881
RULE=,:6882
RULE=,:6883
RULE=,:6884
RULE=,:6885
RULE=,:6886
RULE=,:6887
RULE=,:6888
RULE=,:6889
RULE=:6881,
RULE=:6882,
RULE=:6883,
RULE=:6884,
RULE=:6885,
RULE=:6886,
RULE=:6887,
RULE=:6888,
RULE=:6889,

Read the information in the initscript to configure CBQ for your system. The main drawback of using CBQ is that it's so much more difficult to configure than trickle. The advantage is that, if you know how to configure it, it is much more flexible.

Shorewall firewall

"As far as speed, I have a Linksys BEFSR41 router. I opened ports 6881 * 6889, but I was only getting about 50 to 80kbs. I took the router out and connected the computer directly to the modem, and speed jumped to 380Kbs on a 3.5mbs cable connection. Very Nice."

“PS if you are using shorewall add the following rule DNAT net loc:192.168.1.1 tcp 6969,6881:6999"

"The correct syntax is explained in the file /etc/shorewall/rules itself… Put the following line in /etc/shorewall/rules net fw tcp 6881:6889,6969 * (Don't forget to restart shorewall). I've also opened same ports in my DSL "router" (don't know if that was needed anyway, but it works now...)"

"Although shorewall uses "loc" for the local machine, Mandrake might configure the local machine as "fw" (firewall), as it happened at my machine. In this case, the following rule seems to work well in order to speed bittorrent downloads: ACCEPT net fw tcp 6881:6889,6969 * (put it in the apropriate location at the file /etc/shorewall/rules)." (by Kadjo)

Job for every day

If you want to make the BitTorrent downloads faster you could help us to accomplish this. If you have a flat rate internet access where you will not get extra costs then why not contribute your internet bitrate to the Mandriva BitTorrent. Every day you could do the following job:

  1. Open some of those BitTorrent files from the Mandriva Club CD download page, which you have already downloaded
2. Select your BitTorrent tool (e.g. Azureus in Windows)
3. If the download does not start, click on 'force download' button or in the context menu
4. Limit the speed or stop other uploads to have more speed for Mandrake CDs

Links

  • For more details about Bittorrent you can check out the BitTorrent homepage.
  • Upgrade from Standard to Silver level to download the Power Pack ISOs (but don't want to pay too much) the system can extend your current membership at the higher level with a fair calculation (i.e. on $60, there is $5 USD month remaining on your standard membership + extra month(s) $10 USD per month): Membership
  • Source code and binaries for other systems can be found here: Bitconjurer
If you have any updates or amendments, please PM Dutch or post on the forum - thanks!

Bittorrent Walkthrough by Dutch

Thanks go to the original posters of this info * Shahrooz, Kadjo, Maxim Heijndijk, Fafane and everyone else who contributed)!

Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrivasoft.

KB - BitTorrent
Version 1.117 last modified by awilliamson on 19/06/2007 at 02:14

Comments (28)

klingerl | 07.10.2005 at 10:49 AM
Among the ports that must be opened in a firewall in order to use BitTorrent, one should also add the 8080 port (to connect to tracker), which may not be opened by default.

Jean-Louis BAILLY | 08.10.2005 at 07:20 PM
Au niveau des media à rajouter, il est important de préciser qu'il faut choisir ceux de la distrib déjà installée et non pas ceux de la distrib que l'on veut télécharger. Exemple : si on tourne une Mandrake 10.1, il faut ajouter les media de la distrib, contrib, contrib club de la 10.1 (et surtout pas ceux de la 2006 qu'on veut télécharger par torrent).

newimr | 09.10.2005 at 06:38 PM
rajouté, merci.

newimr | 09.10.2005 at 06:42 PM
Done in the french version. It has been heavilly reorganised, we need en/us contributors to do the same.

Jesus_Arocho_828 | 09.10.2005 at 11:22 PM
Some of the links do not open.

rjbMandrake | 14.10.2005 at 03:08 AM

rjbMandrake | 14.10.2005 at 03:10 AM
Its a bit absurd that the page that is supposed to help people with problems using bittorrent is full of bugs and almost none of the links actually work.

Why am I paying for the Mandrake Club if the quality of the download facillity (the main reason I joined the club) is so full of bugs and doesn't seem to even work? It looks like the torrent link doesn't even work…


Ansgar_4660 | 26.10.2005 at 02:27 PM
Unfortunately, I need to second that. I spend a lot of money for the membership, so I expect a bit more than what the free sites offer. Please work on this.

cameron_smith | 05.11.2005 at 11:47 AM
I agree, this web page is terrible. I need to get the Transparency Proxy Torrent file, but when I click the relevant link, it no longer works - a classic 404 error. This is 2005, how primitive to have broken links. I regret paying for my club membership.

Warrick Fitzgerald | 08.11.2005 at 12:41 PM
Yup, another complaint her. I can't download the torrent and the login and password that are sent to me in order to download from httpftp does not work. As stated above this is b@!#it.

DominiqueGodon | 14.11.2005 at 04:16 PM
bonjour,

il y ades commentaires un pau acides ci-dessus...je tiens àdire pour ma part que tout fonctionne à merveille, pas de "broken links", un très bon download bittorrent en cours, bref, pas de p!

@+


Craig_Louis_315 | 27.11.2005 at 09:01 AM
Add my criticism to those above. Broken links! I could understand if they were links out to other domains/sites. But these are links to mandriva.com locations. I would gladly help and fix them, but I'm really a newbie, and don't know the correct addresses.

JOSE CARLOS MARCUSSO JR | 21.12.2005 at 12:14 PM
broken links to bittorrent page: it shows me this: HTTP Status 404 - /xwiki1/bin/view/Downloads/MyTorrents
type Status report message /xwiki1/bin/view/Downloads/MyTorrents description The requested resource (/xwiki1/bin/view/Downloads/MyTorrents) is not available.
Apache Tomcat/5.5.9

Sander_Jonkers | 25.12.2005 at 08:28 AM
I think UPnP should be mentioned in this Bittorrent overview: UPnP will take care of the port forwarding (if your modem/router/NAT supports it). Both Azureus, the original Bittorrent client (version 4.3.4+) and utorrent support UPnP.

And UPnP makes changes the ports easier.


Sander_Jonkers | 25.12.2005 at 08:28 AM
I think UPnP should be mentioned in this Bittorrent overview: UPnP will take care of the port forwarding (if your modem/router/NAT supports it). Both Azureus, the original Bittorrent client (version 4.3.4+) and utorrent support UPnP.

050608-Y9VNX0-CE50 | 29.12.2005 at 07:09 PM
this page needs correction ( i think ...)

Just try typing this statement into the Rules file and try re-starting Shorewall .... Good Luck !!

"The correct syntax is explained in the file /etc/shorewall/rules itself… Put the following line in /etc/shorewall/rules net fw tcp 6881:6889,6969 (Don't forget to restart shorewall). I've also opened same ports in my DSL "router" (don't know if that was needed anyway, but it works now...)"


LynnWoods | 11.01.2006 at 01:59 PM
I thought Linux was going to be a reasonable replacement for WINDOZE but here is a page with instructions that do not make sence to a beginner and links given do not work!!!

David Simchen | 17.01.2006 at 08:39 AM
Just joined the club today. Wanted to download new iso's because I'm currently runnin Mandrake 10.0 offical. Followed directions on this post and my downloads are coming down. I added the BitTorrent RPM's with the software installer and got my .bittorrent file, configured Bittorrent creator and clicked on the BitTorrent GUI and it is working great. It is not downloading and uploading as fast as I thing it should, but I will tweak the configuration and pick up speed. My thanks to the community. Dave

Uwe_6571 | 02.03.2006 at 08:46 PM

Uwe_6571 | 02.03.2006 at 08:46 PM

sergei | 20.03.2006 at 02:31 PM
Hi, Could anyone, please, check the links on this page: half of them are not working

Dutch | 15.04.2006 at 09:18 PM

Dutch | 15.04.2006 at 09:21 PM
Edited all links and amended (or removed) links which pointed to non existent sites due to previous transfers from original.

Dutch | 18.04.2006 at 11:12 PM
General tidy-up after the transfers from old forums and tweaks - hopefully it will make more sense to newcomers!

Dutch | 18.04.2006 at 11:12 PM
General tidy-up after the transfers from old forums and tweaks - hopefully it will make more sense to newcomers!

Dutch | 18.04.2006 at 11:16 PM
And double-post fault reported! ;)

Christophe_1839 | 05.01.2007 at 05:04 PM
Débits quasi-nul en P2P et site FTP pas à jour !! Payer 120€ pour un service inexistant relève de l'escroquerie. A ce prix finalement, j'aurais mieux fait de me payer une licence XP PRO OEM. Je rappelle à Mandriva que FREE s'est fait condamné par la justice pour avoir vendu un service qui laissait beaucoup à désirer …

glyj | 22.04.2007 at 01:21 AM
avec azureus, quand on retélécharge le torrent (suite à changement d'IP), il procède à une revérification des fichiers … on ne peut pas éviter cela ?

 


en zh_CN pt_BR fr ar pt el de nl

RSS

Creator: Dutch on 2004/12/13 12:14
(c) Mandriva 2007
18888888