root / dotorg / v8 / html / beps / bep_0007.html

Revision 10853, 9.6 kB (checked in by dave, 11 months ago)

regenerated html.

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