root / dotorg / trunk / html / beps / bep_0007.html

Revision 11107, 10.2 kB (checked in by dave, 4 months ago)

rebuild html files.

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
7<title></title>
8<link rel="stylesheet" href="../css/bep.css" type="text/css" />
9</head>
10<body>
11<div class="document">
12
13<div id="upper" class="clear">
14<div id="wrap">
15<div id="header">
16<h1><a href="../index.html">BitTorrent<span>.org</span></a></h1>
17</div>
18<div id="nav">
19<ul>
20<li><a href="../index.html">Home</a></li>
21<li><a href="../introduction.html">For Users</a></li>
22<li><a href="bep_0000.html"><span>For Developers</span></a></li>
23<!-- <li><a href="./blog">Blog</a></li> -->
24<li><a href="http://forum.bittorrent.org"> Forums </li>
25<li><a href="../donate.html">Donate!</a></li>
26</ul>
27</div> <!-- nav -->
28<!-- ### Begin Content ### -->
29<div id="second">
30
31
32
33<table class="rfc2822 docutils field-list" frame="void" rules="none">
34<col class="field-name" />
35<col class="field-body" />
36<tbody valign="top">
37<tr class="field"><th class="field-name">BEP:</th><td class="field-body">7</td>
38</tr>
39<tr class="field"><th class="field-name">Title:</th><td class="field-body">IPv6 Tracker Extension</td>
40</tr>
41<tr class="field"><th class="field-name">Version:</th><td class="field-body">11098</td>
42</tr>
43<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://bittorrent.org/trac/browser/dotorg/trunk/html/beps/bep_0007.rst">2008-05-21 00:08:51 -0700 (Wed, 21 May 2008)</a></td>
44</tr>
45<tr class="field"><th class="field-name">Author:</th><td class="field-body">Greg Hazel &lt;greg&#32;&#97;t&#32;bittorrent.com&gt;, Arvid Norberg &lt;arvid&#32;&#97;t&#32;bittorrent.com&gt;</td>
46</tr>
47<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
48</tr>
49<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
50</tr>
51<tr class="field"><th class="field-name">Created:</th><td class="field-body">31-Jan-2008</td>
52</tr>
53<tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td>
54</tr>
55</tbody>
56</table>
57<hr />
58<div class="contents topic" id="contents">
59<p class="topic-title first">Contents</p>
60<ul class="simple">
61<li><a class="reference internal" href="#announce-parameter" id="id10">Announce Parameter</a></li>
62<li><a class="reference internal" href="#announce-response" id="id11">Announce Response</a></li>
63<li><a class="reference internal" href="#examples" id="id12">Examples</a></li>
64<li><a class="reference internal" href="#rationale" id="id13">Rationale</a></li>
65<li><a class="reference internal" href="#id1" id="id14">References</a></li>
66<li><a class="reference internal" href="#copyright" id="id15">Copyright</a></li>
67</ul>
68</div>
69<p>This extension extends the tracker response to better support IPv6 peers as
70well as defines a way for multi homed machines to announce multiple addresses
71at the same time.  This proposal addresses the use case where peers
72are either on an IPv4 network running <a class="reference external" href="https://www.microsoft.com/technet/network/ipv6/teredo.mspx">Teredo</a> <a class="footnote-reference" href="#id2" id="id3">[1]</a> or peers are on
73an IPv6 network with an IPv4 tunnel interface.</p>
74<p>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;,
75&quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to
76be interpreted as described in IETF <a class="reference external" href="http://tools.ietf.org/html/rfc2119">RFC 2119</a> <a class="footnote-reference" href="#id4" id="id5">[2]</a>.</p>
77<div class="section" id="announce-parameter">
78<h1>Announce Parameter</h1>
79<p>The client MAY add an <tt class="docutils literal"><span class="pre">&amp;ipv6=</span></tt> parameter to the HTTP GET request it sends
80to the tracker. The value is either an IPv6 endpoint (address and port) or
81just an IPv6 address. In the case where only an address is supplied, the IPv6
82port is assumed to be the same as specified by the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt> parameter.</p>
83<p>The tracker SHOULD perform a NAT check on the IPv6 endpoint.</p>
84<p>In case the client contacts the tracker on an IPv6 interface, it may add
85an <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> parameter with its IPv4 address or endpoint. The value MUST
86be either an IPv4 endpoint (address and port) or just an IPv4 address. If only
87an address is supplied, the port is assumed to be the same as the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt>
88parameter.</p>
89<p>The endpoints are encoded as strings as defined by <a class="reference external" href="http://tools.ietf.org/html/rfc2732">RFC 2732</a> <a class="footnote-reference" href="#id6" id="id7">[3]</a>.</p>
90<p>If both an <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> and an <tt class="docutils literal"><span class="pre">&amp;ipv6=</span></tt> parameter are specified, the tracker
91MAY ignore the address family that is the same as the source address of the
92request. i.e. If the client connects to the tracker with an IPv4 source
93address, the tracker MAY ignore any <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> address and if the client
94connects to the tracker with an IPv6 source address, the tracker MAY ignore
95any <tt class="docutils literal"><span class="pre">&amp;ipv6=</span></tt> parameter.</p>
96</div>
97<div class="section" id="announce-response">
98<h1>Announce Response</h1>
99<p>In case the tracker does not support the <tt class="docutils literal"><span class="pre">compact</span></tt> response as
100described in <a class="reference external" href="http://www.bittorrent.org/beps/bep_0023.html">BEP-23</a> <a class="footnote-reference" href="#id8" id="id9">[4]</a>, no change is necessary. Since the
101original <tt class="docutils literal"><span class="pre">peers</span></tt> response returns peer endpoints in their expanded
102string form, IPv6 addresses can be passed back this way.</p>
103<p>In case a compact response is requested, the tracker MAY add another key
104to the response; <tt class="docutils literal"><span class="pre">peers6</span></tt>. This key has the same layout as <tt class="docutils literal"><span class="pre">peers</span></tt> in
105compact mode, but instead of using 6 bytes per endpoint, 18 bytes are used.
106peers6 contains address-port pairs where the addresses are all IPv6.</p>
107</div>
108<div class="section" id="examples">
109<h1>Examples</h1>
110<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
111address:</p>
112<pre class="literal-block">
113GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
114&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
115&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9
116</pre>
117<p>Example announce string with <tt class="docutils literal"><span class="pre">[2001::53aa:64c:0:7f83:bc43:dec9]:6882</span></tt> as IPv6 endpoint:</p>
118<pre class="literal-block">
119GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
120&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
121&amp;ipv6=%5B2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9%5D%3A6882
122</pre>
123<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
124address and <tt class="docutils literal"><span class="pre">261.52.89.12</span></tt> as IPv4 address:</p>
125<pre class="literal-block">
126GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
127&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
128&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9&amp;ipv4=261.52.89.12
129</pre>
130<p>Example response:</p>
131<pre class="literal-block">
132d8:intervali1800e5:peers6:iiiipp6:peers618:iiiiiiiiiiiiiiiippe
133</pre>
134</div>
135<div class="section" id="rationale">
136<h1>Rationale</h1>
137<p>The naming of <tt class="docutils literal"><span class="pre">peers6</span></tt> is chosen not to collide with the current <tt class="docutils literal"><span class="pre">peers</span></tt>
138response and to be backwards compatible. It is also a simple addition to the
139current response, using the same encoding.</p>
140</div>
141<div class="section" id="id1">
142<h1>References</h1>
143<table class="docutils footnote" frame="void" id="id2" rules="none">
144<colgroup><col class="label" /><col /></colgroup>
145<tbody valign="top">
146<tr><td class="label"><a class="fn-backref" href="#id3">[1]</a></td><td><a class="reference external" href="https://www.microsoft.com/technet/network/ipv6/teredo.mspx">https://www.microsoft.com/technet/network/ipv6/teredo.mspx</a></td></tr>
147</tbody>
148</table>
149<table class="docutils footnote" frame="void" id="id4" rules="none">
150<colgroup><col class="label" /><col /></colgroup>
151<tbody valign="top">
152<tr><td class="label"><a class="fn-backref" href="#id5">[2]</a></td><td><a class="reference external" href="http://tools.ietf.org/html/rfc2119">http://tools.ietf.org/html/rfc2119</a></td></tr>
153</tbody>
154</table>
155<table class="docutils footnote" frame="void" id="id6" rules="none">
156<colgroup><col class="label" /><col /></colgroup>
157<tbody valign="top">
158<tr><td class="label"><a class="fn-backref" href="#id7">[3]</a></td><td><a class="reference external" href="http://tools.ietf.org/html/rfc2732">http://tools.ietf.org/html/rfc2732</a></td></tr>
159</tbody>
160</table>
161<table class="docutils footnote" frame="void" id="id8" rules="none">
162<colgroup><col class="label" /><col /></colgroup>
163<tbody valign="top">
164<tr><td class="label"><a class="fn-backref" href="#id9">[4]</a></td><td><a class="reference external" href="http://www.bittorrent.org/beps/bep_0023.html">http://www.bittorrent.org/beps/bep_0023.html</a></td></tr>
165</tbody>
166</table>
167</div>
168<div class="section" id="copyright">
169<h1>Copyright</h1>
170<p>This document has been placed in the public domain.</p>
171<!-- Local Variables:
172mode: indented-text
173indent-tabs-mode: nil
174sentence-end-double-space: t
175fill-column: 70
176coding: utf-8
177End: -->
178</div>
179
180
181</div>
182        <div id="footer">
183<hr/>
184</div>
185
186</div>
187</body>
188</html>
Note: See TracBrowser for help on using the browser.