root / dotorg / v3 / html / ipv6_tracker_extension.html

Revision 10154, 6.8 kB (checked in by dave, 12 months ago)

Update copyright from 2006 to 2008.
Update four years of development to five.

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/screen.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<div class="section">
33<h1><a id="ipv6-tracker-extension" name="ipv6-tracker-extension">IPv6 tracker extension</a></h1>
34<p>This extension extends the tracker response to better support IPv6 peers as
35well as defines a way for multi homed machines to announce multiple addresses
36at the same time.  This proposal addresses the use case where peers
37are either on an IPv4 network running <a class="reference" href="https://www.microsoft.com/technet/network/ipv6/teredo.mspx">Teredo</a> or peers are on
38an IPv6 network with an IPv4 tunnel interface.</p>
39<p>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;,
40&quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to
41be interpreted as described in IETF <a class="reference" href="http://tools.ietf.org/html/rfc2119">RFC 2119</a>.</p>
42<div class="section">
43<h2><a id="announce-parameter" name="announce-parameter">announce parameter</a></h2>
44<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
45to the tracker. The value is either an IPv6 endpoint (address and port) or
46just an IPv6 address. In the case where only an address is supplied, the IPv6
47port is assumed to be the same as specified by the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt> parameter.</p>
48<p>The tracker SHOULD perform a NAT check on the IPv6 endpoint.</p>
49<p>In case the client contacts the tracker on an IPv6 interface, it may add
50an <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> parameter with its IPv4 address or endpoint. The value MUST
51be either an IPv4 endpoint (address and port) or just an IPv4 address. If only
52an address is supplied, the port is assumed to be the same as the <tt class="docutils literal"><span class="pre">&amp;port=</span></tt>
53parameter.</p>
54<p>The endpoints are encoded as strings as defined by <a class="reference" href="http://tools.ietf.org/html/rfc2732">RFC 2732</a>.</p>
55<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
56MAY ignore the address family that is the same as the source address of the
57request. i.e. If the client connects to the tracker with an IPv4 source
58address, the tracker MAY ignore any <tt class="docutils literal"><span class="pre">&amp;ipv4=</span></tt> address and if the client
59connects to the tracker with an IPv6 source address, the tracker MAY ignore
60any <tt class="docutils literal"><span class="pre">&amp;ipv6=</span></tt> parameter.</p>
61</div>
62<div class="section">
63<h2><a id="announce-response" name="announce-response">announce response</a></h2>
64<p>In case the tracker does not support the <tt class="docutils literal"><span class="pre">compact</span></tt> response, no change is
65necessary. Since the original <tt class="docutils literal"><span class="pre">peers</span></tt> response returns peer endpoints in
66their expanded string form, IPv6 addresses can be passed back this way.</p>
67<p>In case a compact response is requested, the tracker MAY add another key
68to 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
69compact mode, but instead of using 6 bytes per endpoint, 18 bytes are used.
70peers6 contains address-port pairs where the addresses are all IPv6.</p>
71</div>
72<div class="section">
73<h2><a id="examples" name="examples">examples</a></h2>
74<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
75address:</p>
76<pre class="literal-block">
77GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
78&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
79&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9
80</pre>
81<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>
82<pre class="literal-block">
83GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
84&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
85&amp;ipv6=%5B2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9%5D%3A6882
86</pre>
87<p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6
88address and <tt class="docutils literal"><span class="pre">261.52.89.12</span></tt> as IPv4 address:</p>
89<pre class="literal-block">
90GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&amp;info_hash=aaaaaaaaaaaaaaaaaaaa
91&amp;port=6881&amp;left=0&amp;downloaded=100&amp;uploaded=0&amp;compact=1
92&amp;ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9&amp;ipv4=261.52.89.12
93</pre>
94<p>Example response:</p>
95<pre class="literal-block">
96d8:intervali1800e5:peers6:iiiipp6:peers618:iiiiiiiiiiiiiiiippe
97</pre>
98</div>
99<div class="section">
100<h2><a id="rationale" name="rationale">rationale</a></h2>
101<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>
102response and to be backwards compatible. It is also a simple addition to the
103current response, using the same encoding.</p>
104</div>
105<div class="section">
106<h2><a id="authors" name="authors">authors</a></h2>
107<div class="line-block">
108<div class="line"><a class="reference" href="mailto:greg&#37;&#52;&#48;bittorrent&#46;com">Greg Hazel</a></div>
109<div class="line"><a class="reference" href="mailto:arvid&#37;&#52;&#48;bittorrent&#46;com">Arvid Norberg</a></div>
110</div>
111</div>
112</div>
113
114</div>
115        <div id="footer">
116<hr/>
117<p>Copyright 2008 BitTorrent.org</p>
118</div>
119
120</div>
121</body>
122</html>
Note: See TracBrowser for help on using the browser.