root/dotorg/trunk/html/beps/bep_0024.rst

Revision 11085, 2.8 KB (checked in by dave, 19 months ago)

demote external_ip to draft status.

Line 
1BEP: 24
2Title: Tracker Returns External IP
3Version: $Revision$
4Last-Modified: $Date$
5Author:  David Harrison <dave@bittorrent.com>
6Status:  Draft
7Type:    Standards track
8Content-Type: text/x-rst
9Created: 12-May-2008
10Post-History:
11
12
13So that peers may easily determine their IP address.  A BitTorrent
14tracker may return the requesting peer's public IP address.
15
16
17Overview
18========
19
20A BitTorrent client can easily learn the IP address used when sending,
21but because of intervnening Network Address Translators (NATs) the IP
22address of the client's host seen inside the client's private network
23may differ from the IP address used to route the client's packets
24through the public Internet.
25
26In BitTorrent as described in BEP 3 [#BEP-3]_, peers wishing to
27transfer a file contact a central tracker.  This tracker returns a
28list of peers that are currently transferring the file.  For all peers
29that reach the tracker across the public Internet, the source address
30in each request seen by the tracker carries the publicly routable IP
31address of the requesting peer.
32
33A tracker implementing this extension returns the key *external ip*
34with a bencoded string value containing the IPv4 address as a 32 bit
35binary or containing the IPv6 address as a 128 bit binary. 
36
37Using a 32 or 128 packed binary is idiosyncratic since the value for
38the *ip* key returned in a dict within the *peers* list is returned as
39a string using ipv4 dotted notation or a domain name.  However the
40packed representation poses no semantic disadvantage and is negligibly
41smaller.
42
43The IPv4 part of this extension has been supported by uTorrent since
44May of 2007.
45
46The tracker is not unique in its ability to see a peer's public IP
47address.  Any peer reached over the public Internet sees the public IP
48address of the peer on the far side of the connection.  The *Extension
49Protocol* proposed in [#BEP-10]_ provides a mechanism for a client to
50obtains its public IP from any of its peers.  There is no conflict for
51a BitTorrent client to support both tracker and peer methods, and they
52have slightly different advantages.  A peer can learn its external IP
53from a tracker even when there are no peers.  For trackerless swarms,
54a peer can learn its IP from any peer whose reference was obtained from the DHT
55[#BEP-5]_.
56
57
58References
59==========
60
61.. [#BEP-3] BEP_0003. The BitTorrent Protocol Specification, Cohen.
62   (http://www.bittorrent.org/beps/bep_0003.html)
63
64.. [#BEP-5] BEP_0005. DHT Protocol. Loewenstern.
65   (http://www.bittorrent.org/beps/bep_0005.html)
66
67.. [#BEP-10] BEP_0010. Extension Protocol. Norberg, Strigeus, Hazel
68   (http://www.bittorrent.org/beps/bep_0010.html)
69
70
71Copyright
72=========
73
74This document has been placed in the public domain.
75
76
77
78..
79   Local Variables:
80   mode: indented-text
81   indent-tabs-mode: nil
82   sentence-end-double-space: t
83   fill-column: 70
84   coding: utf-8
85   End:
86
Note: See TracBrowser for help on using the browser.