| 65 | | <li><a class="reference internal" href="#abstract" id="id3">Abstract</a></li> |
| 66 | | <li><a class="reference internal" href="#introduction" id="id4">Introduction</a></li> |
| 67 | | <li><a class="reference internal" href="#operation" id="id5">Operation</a><ul> |
| 68 | | <li><a class="reference internal" href="#single-protocol-nodes" id="id6">Single-protocol nodes</a></li> |
| 69 | | <li><a class="reference internal" href="#double-stack-nodes" id="id7">Double-stack nodes</a><ul> |
| 70 | | <li><a class="reference internal" href="#bootstrapping" id="id8">Bootstrapping</a></li> |
| 71 | | <li><a class="reference internal" href="#steady-state-operation" id="id9">Steady-state operation</a></li> |
| 72 | | </ul> |
| 73 | | </li> |
| 74 | | </ul> |
| 75 | | </li> |
| 76 | | <li><a class="reference internal" href="#changes-and-extensions-to-existing-messages" id="id10">Changes and extensions to existing messages</a><ul> |
| 77 | | <li><a class="reference internal" href="#changes-to-existing-parameters" id="id11">Changes to existing parameters</a><ul> |
| 78 | | <li><a class="reference internal" href="#values" id="id12">values</a></li> |
| 79 | | </ul> |
| 80 | | </li> |
| 81 | | <li><a class="reference internal" href="#new-parameters" id="id13">New parameters</a><ul> |
| 82 | | <li><a class="reference internal" href="#nodes6" id="id14">nodes6</a></li> |
| 83 | | <li><a class="reference internal" href="#want" id="id15">want</a></li> |
| 84 | | </ul> |
| 85 | | </li> |
| 86 | | <li><a class="reference internal" href="#changes-to-message-semantics" id="id16">Changes to message semantics</a><ul> |
| 87 | | <li><a class="reference internal" href="#find-nodes-and-get-peers" id="id17">find_nodes and get_peers</a></li> |
| 88 | | <li><a class="reference internal" href="#announce-peers" id="id18">announce_peers</a></li> |
| 89 | | </ul> |
| 90 | | </li> |
| 91 | | </ul> |
| 92 | | </li> |
| 93 | | <li><a class="reference internal" href="#acknowledgements" id="id19">Acknowledgements</a></li> |
| 94 | | <li><a class="reference internal" href="#references" id="id20">References</a></li> |
| 95 | | <li><a class="reference internal" href="#copyright" id="id21">Copyright</a></li> |
| | 65 | <li><a class="reference internal" href="#abstract" id="id5">Abstract</a></li> |
| | 66 | <li><a class="reference internal" href="#introduction" id="id6">Introduction</a></li> |
| | 67 | <li><a class="reference internal" href="#operation" id="id7">Operation</a><ul> |
| | 68 | <li><a class="reference internal" href="#single-protocol-nodes" id="id8">Single-protocol nodes</a></li> |
| | 69 | <li><a class="reference internal" href="#dual-stack-nodes" id="id9">Dual-stack nodes</a><ul> |
| | 70 | <li><a class="reference internal" href="#bootstrapping" id="id10">Bootstrapping</a></li> |
| | 71 | <li><a class="reference internal" href="#steady-state-operation" id="id11">Steady-state operation</a></li> |
| | 72 | </ul> |
| | 73 | </li> |
| | 74 | <li><a class="reference internal" href="#maximum-packet-size" id="id12">Maximum packet size</a></li> |
| | 75 | <li><a class="reference internal" href="#source-address-selection" id="id13">Source address selection</a></li> |
| | 76 | </ul> |
| | 77 | </li> |
| | 78 | <li><a class="reference internal" href="#changes-to-the-bittorrent-protocol" id="id14">Changes to the BitTorrent protocol</a></li> |
| | 79 | <li><a class="reference internal" href="#changes-and-extensions-to-existing-messages" id="id15">Changes and extensions to existing messages</a><ul> |
| | 80 | <li><a class="reference internal" href="#changes-to-existing-parameters" id="id16">Changes to existing parameters</a><ul> |
| | 81 | <li><a class="reference internal" href="#values" id="id17">values</a></li> |
| | 82 | </ul> |
| | 83 | </li> |
| | 84 | <li><a class="reference internal" href="#new-parameters" id="id18">New parameters</a><ul> |
| | 85 | <li><a class="reference internal" href="#nodes6" id="id19">nodes6</a></li> |
| | 86 | <li><a class="reference internal" href="#want" id="id20">want</a></li> |
| | 87 | </ul> |
| | 88 | </li> |
| | 89 | <li><a class="reference internal" href="#changes-to-message-semantics" id="id21">Changes to message semantics</a><ul> |
| | 90 | <li><a class="reference internal" href="#find-nodes-and-get-peers" id="id22">find_nodes and get_peers</a></li> |
| | 91 | <li><a class="reference internal" href="#announce-peers" id="id23">announce_peers</a></li> |
| | 92 | </ul> |
| | 93 | </li> |
| | 94 | </ul> |
| | 95 | </li> |
| | 96 | <li><a class="reference internal" href="#acknowledgements" id="id24">Acknowledgements</a></li> |
| | 97 | <li><a class="reference internal" href="#references" id="id25">References</a></li> |
| | 98 | <li><a class="reference internal" href="#copyright" id="id26">Copyright</a></li> |
| | 173 | <div class="section" id="maximum-packet-size"> |
| | 174 | <h2>Maximum packet size</h2> |
| | 175 | <p>A node obeying this specification must not send UDP datagrams with |
| | 176 | a payload larger than 1024 octets, and must be able to receive UDP |
| | 177 | datagrams with a payload of 1024 octets or less. (In the interest of |
| | 178 | robustness, a node should be able to receive datagrams with larger |
| | 179 | payloads.)</p> |
| | 180 | <blockquote> |
| | 181 | <p><strong>Rationale</strong>: a UDP datagram with a payload of 1024 octets easily |
| | 182 | fits within the IPv6 minimum maximum packet size, which is 1280 |
| | 183 | octets <a class="footnote-reference" href="#ipv6" id="id2">[3]</a>. In particular, such a packet will cross a Teredo |
| | 184 | tunnel with no fragmentation.</p> |
| | 185 | <p>In principle, IPv4 nodes might be unable to reassemble packets |
| | 186 | larger than 576 octets <a class="footnote-reference" href="#ipv4" id="id3">[4]</a>; in practice, however, due to the |
| | 187 | predominance of Ethernet networks, all IPv4 nodes are able to |
| | 188 | reassemble packets up to 1500 octets.</p> |
| | 189 | </blockquote> |
| | 190 | </div> |
| | 191 | <div class="section" id="source-address-selection"> |
| | 192 | <h2>Source address selection</h2> |
| | 193 | <p>The IPv6 DHT should use a socket bound to one of the host's global |
| | 194 | unicast IPv6 addresses rather than the "unspecified address" (::/128). |
| | 195 | When selecting to which address to bind, Teredo addresses (addresses |
| | 196 | in 2001:0000::/32) should be avoided if other global unicast addresses |
| | 197 | are available.</p> |
| | 198 | <blockquote> |
| | 199 | <p><strong>Rationale</strong>: The DHT relies on the publicly visible IP address of |
| | 200 | each node to remain constant. Since multi-homing is common in IPv6, |
| | 201 | it is particularly important to bind the IPv6 socket to a well-defined |
| | 202 | address.</p> |
| | 203 | <p>While Teredo traffic can, in principle, be more efficient than |
| | 204 | native traffic, especially when speaking to other Teredo hosts, |
| | 205 | experience shows that Teredo routing tends to be brittle; hence, |
| | 206 | Teredo addresses should be avoided whenever possible.</p> |
| | 207 | <p>The same issues apply to multi-homed IPv4 hosts. However, in IPv4 |
| | 208 | multi-homing is not as common in IPv6, and in the presence of NAT |
| | 209 | the issues are somewhat more complicated, so this specification |
| | 210 | refrains from making any recommendations about binding of IPv4 |
| | 211 | sockets.</p> |
| | 212 | </blockquote> |
| | 213 | </div> |
| | 214 | </div> |
| | 215 | <div class="section" id="changes-to-the-bittorrent-protocol"> |
| | 216 | <h1>Changes to the BitTorrent protocol</h1> |
| | 217 | <p>The PORT message, as defined in BEP-5, is extended to work over both |
| | 218 | IPv4 and IPv6. The information provided by the PORT message only |
| | 219 | applies to the address family it is carried over: a PORT message sent |
| | 220 | over IPv4 only advertises participation in the IPv4 DHT, and a PORT |
| | 221 | message sent over IPv6 only advertises participation in the IPv6 DHT.</p> |
| | 222 | <blockquote> |
| | 223 | <strong>Rationale</strong>: in the presence of the LTEP extension negotiation |
| | 224 | protocol <a class="footnote-reference" href="#bep-10" id="id4">[2]</a>, which advertises a peer's addresses across |
| | 225 | address families, it might be possible to use the PORT message for |
| | 226 | both address families. However, since an implementation need not |
| | 227 | participate in both DHTs, nor use the same port in both DHTs, this |
| | 228 | specification leaves the role of bridging the two DHTs to the |
| | 229 | 'find_nodes' message (see below).</blockquote> |
| | 344 | </tbody> |
| | 345 | </table> |
| | 346 | <table class="docutils footnote" frame="void" id="bep-10" rules="none"> |
| | 347 | <colgroup><col class="label" /><col /></colgroup> |
| | 348 | <tbody valign="top"> |
| | 349 | <tr><td class="label"><a class="fn-backref" href="#id4">[2]</a></td><td>BEP_0010. Extension Protocol. |
| | 350 | (<a class="reference external" href="http://www.bittorrent.org/beps/bep_0010.html">http://www.bittorrent.org/beps/bep_0010.html</a>)</td></tr> |
| | 351 | </tbody> |
| | 352 | </table> |
| | 353 | <table class="docutils footnote" frame="void" id="ipv6" rules="none"> |
| | 354 | <colgroup><col class="label" /><col /></colgroup> |
| | 355 | <tbody valign="top"> |
| | 356 | <tr><td class="label"><a class="fn-backref" href="#id2">[3]</a></td><td><a class="reference external" href="http://www.faqs.org/rfcs/rfc2460.html">RFC 2460</a>. Internet Protocol, Version 6 (IPv6) Specification. |
| | 357 | S. Deering, R. Hinden. December 1998.</td></tr> |
| | 358 | </tbody> |
| | 359 | </table> |
| | 360 | <table class="docutils footnote" frame="void" id="ipv4" rules="none"> |
| | 361 | <colgroup><col class="label" /><col /></colgroup> |
| | 362 | <tbody valign="top"> |
| | 363 | <tr><td class="label"><a class="fn-backref" href="#id3">[4]</a></td><td><a class="reference external" href="http://www.faqs.org/rfcs/rfc791.html">RFC 791</a>. Internet Protocol. J. Postel. September 1981.</td></tr> |