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

Revision 11040, 9.9 kB (checked in by dave, 8 weeks ago)

All HTML docs now reference the new SVN server running at bittorrent.org

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">11031</td>
42</tr>
43<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://svn.bittorrent.org/trac/browser/dotorg/trunk/html/beps/bep_0007.rst">2008-02-28 16:43:58 -0800 (Thu, 28 Feb 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="#ipv6-tracker-extension" id="id8">IPv6 tracker extension</a><ul>
62<li><a class="reference internal" href="#announce-parameter" id="id9">announce parameter</a></li>
63<li><a class="reference internal" href="#announce-response" id="id10">announce response</a></li>
64<li><a class="reference internal" href="#examples" id="id11">examples</a></li>
65<li><a class="reference internal" href="#rationale" id="id12">rationale</a></li>
66<li><a class="reference internal" href="#copyright" id="id13">Copyright</a></li>
67</ul>
68</li>
69<li><a class="reference internal" href="#id1" id="id14">References</a></li>
70</ul>
71</div>
72<div class="section" id="ipv6-tracker-extension">
73<h1>IPv6 tracker extension</h1>
74<p>This extension extends the tracker response to better support IPv6 peers as
75well as defines a way for multi homed machines to announce multiple addresses
76at the same time.  This proposal addresses the use case where peers
77are 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
78an IPv6 network with an IPv4 tunnel interface.</p>
79<p>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;,
80&quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to
81be 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>
82<div class="section" id="announce-parameter">
83<h2>announce parameter</h2>
84<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
85to the tracker. The value is either an IPv6 endpoint (address and port) or
86just an IPv6 address. In the case where only an address is supplied, the IPv6
87port is assumed to be the same as specified by the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt> parameter.</p>
88<p>The tracker SHOULD perform a NAT check on the IPv6 endpoint.</p>
89<p>In case the client contacts the tracker on an IPv6 interface, it may add
90an <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> parameter with its IPv4 address or endpoint. The value MUST
91be either an IPv4 endpoint (address and port) or just an IPv4 address. If only
92an address is supplied, the port is assumed to be the same as the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt>
93parameter.</p>
94<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>
95<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
96MAY ignore the address family that is the same as the source address of the
97request. i.e. If the client connects to the tracker with an IPv4 source
98address, the tracker MAY ignore any <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> address and if the client
99connects to the tracker with an IPv6 source address, the tracker MAY ignore
100any <tt class="docutils literal"><span class="pre">&amp;ipv6=</span></tt> parameter.</p>
101</div>
102<div class="section" id="announce-response">
103<h2>announce response</h2>
104<p>In case the tracker does not support the <tt class="docutils literal"><span class="pre">compact</span></tt> response, no change is
105necessary. Since the original <tt class="docutils literal"><span class="pre">peers</span></tt> response returns peer endpoints in
106their expanded string form, IPv6 addresses can be passed back this way.</p>
107<p>In case a compact response is requested, the tracker MAY add another key
108to 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
109compact mode, but instead of using 6 bytes per endpoint, 18 bytes are used.
110peers6 contains address-port pairs where the addresses are all IPv6.</p>
111</div>
112<div class="section" id="examples">
113<h2>examples</h2>
114<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
115address:</p>
116<pre class="literal-block">
117GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
118&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
119&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9
120</pre>
121<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>
122<pre class="literal-block">
123GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
124&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
125&amp;ipv6=%5B2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9%5D%3A6882
126</pre>
127<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
128address and <tt class="docutils literal"><span class="pre">261.52.89.12</span></tt> as IPv4 address:</p>
129<pre class="literal-block">
130GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
131&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
132&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9&amp;ipv4=261.52.89.12
133</pre>
134<p>Example response:</p>
135<pre class="literal-block">
136d8:intervali1800e5:peers6:iiiipp6:peers618:iiiiiiiiiiiiiiiippe
137</pre>
138</div>
139<div class="section" id="rationale">
140<h2>rationale</h2>
141<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>
142response and to be backwards compatible. It is also a simple addition to the
143current response, using the same encoding.</p>
144</div>
145<div class="section" id="copyright">
146<h2>Copyright</h2>
147<p>This document has been placed in the public domain.</p>
148<!-- Local Variables:
149mode: indented-text
150indent-tabs-mode: nil
151sentence-end-double-space: t
152fill-column: 70
153coding: utf-8
154End: -->
155</div>
156</div>
157<div class="section" id="id1">
158<h1>References</h1>
159<table class="docutils footnote" frame="void" id="id2" rules="none">
160<colgroup><col class="label" /><col /></colgroup>
161<tbody valign="top">
162<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>
163</tbody>
164</table>
165<table class="docutils footnote" frame="void" id="id4" rules="none">
166<colgroup><col class="label" /><col /></colgroup>
167<tbody valign="top">
168<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>
169</tbody>
170</table>
171<table class="docutils footnote" frame="void" id="id6" rules="none">
172<colgroup><col class="label" /><col /></colgroup>
173<tbody valign="top">
174<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>
175</tbody>
176</table>
177</div>
178
179
180</div>
181        <div id="footer">
182<hr/>
183</div>
184
185</div>
186</body>
187</html>
Note: See TracBrowser for help on using the browser.