Jack Bowling wrote:
On Tue, May 18, 2004 at 02:21:12PM +1000, Scott Burns wrote:
Paul D. Brown wrote:
Quoting from the bittorrent FAQ at http://btfaq.com/serve/cache/25.html
(no doubt elsewhere as well):
Prior to version 3.2, BitTorrent by default uses ports in the range of
6881-6889. As of 3.2 and later, the range has been extended to
6881-6999. (These are all TCP ports, BitTorrent does not use UDP.) The
client starts with the lowest port in the range and sequentially tries
higher ports until it can find one to which it can bind. This means that
the first client you open will bind to 6881, the next to 6882, etc.
Therefore, you only really need to open as many ports as simultaneous
BitTorrent clients you would ever have open. For most people it's
sufficient to open 6881-6889.
Paul
Let's see if I understand: I download one file by bt, and other people
can connect to 6881 on my machine to download from me. I start a second
simultaneous bt download of another file. Others can now connect to me
on port 6882 to download the second file from me?
This strikes me as slightly loopy given http seems to be able to serve
many files using just one open port...
Scott - As an exercise in how quickly BitTorrent works its magic, start up
a BT download and then fire up iptstate (comes as part of FC2 Golden...not
sure about FC2T3 and earlier). Becoming part of the swarm is virtually
instantaneous. You will also see that the connections are persistent.
I'm running FC1 and iptstate does not seem to be present. I ran netstat and got the following output.
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 9800 192.168.1.100:36342 user1.com:6881 ESTABLISHED
tcp 0 37128 192.168.1.100:36458 user2.com:6881 ESTABLISHED
tcp 0 15928 192.168.1.100:36384 user3.com:6881 ESTABLISHED
tcp 0 6883 192.168.1.100:33648 user4.com:6886 ESTABLISHED
tcp 0 14618 192.168.1.100:34383 user5.com:6881 FIN_WAIT1
tcp 0 9763 192.168.1.100:33649 user6.com:6882 ESTABLISHED
tcp 0 60242 192.168.1.100:33356 user7.com:6881 ESTABLISHED
tcp 0 15928 192.168.1.100:33784 user8.com:6881 ESTABLISHED
tcp 0 33304 192.168.1.100:36287 user9.com:6881 ESTABLISHED
tcp 0 21720 192.168.1.100:36450 user10.com:6881 ESTABLISHED
tcp 0 70000 192.168.1.100:36391 user11.com:6881 ESTABLISHED
tcp 0 0 192.168.1.100:36079 user12.com:6881 ESTABLISHED
I don't understand much of the output. It looks like all users except for user4 and for user6 are on the same port. I assume they are all receiving the same bits.
If I'm able to guess the information on my local address, I check (the torrent actually) their progress using individual ports on my end.
.....
I just checked the output again and there are 11 users, all but the Send-Q numbers are the same. User7 dropped out of the race, 33356 is no longer in the local address output.
Pretty interesting, but confusing!
netstat |grep tcp
Jim