Changeset 11188
- Timestamp:
- 11/20/09 09:16:55 (8 months ago)
- File:
-
- 1 edited
-
dotorg/trunk/html/beps/bep_0032.html (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/beps/bep_0032.html
r11186 r11188 39 39 <tr class="field"><th class="field-name">Title:</th><td class="field-body">BitTorrent DHT Extensions for IPv6</td> 40 40 </tr> 41 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1118 5</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_0032.rst">2009-1 0-29 23:46:53 +0000 (Thu, 29 Oct2009)</a></td>41 <tr class="field"><th class="field-name">Version:</th><td class="field-body">11187</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_0032.rst">2009-11-20 17:16:34 +0000 (Fri, 20 Nov 2009)</a></td> 44 44 </tr> 45 45 <tr class="field"><th class="field-name">Author:</th><td class="field-body">Juliusz Chroboczek <jch at pps.jussieu.fr></td> … … 55 55 <tr class="field"><th class="field-name">Created:</th><td class="field-body">14-Oct-2009</td> 56 56 </tr> 57 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body"></td> 57 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">15-Oct-2009: Promote same ID in IPv6 and IPv4 nodes. Drop values6. Added some rationales 58 11-Nov-2011: Change want to be a list of flags. Add nodes about MTU and source address selection. Define behaviour of PORT message.</td> 58 59 </tr> 59 60 </tbody> … … 101 102 <div class="section" id="abstract"> 102 103 <h1>Abstract</h1> 103 <p>This proposal describes a set of extensions to the BitTorrent DHT <a class="footnote-reference" href="#bep-5" id="id1">[1]</a>104 to allow operation over IPv6.</p>104 <p>This document describes a set of extensions to the BitTorrent DHT 105 <a class="footnote-reference" href="#bep-5" id="id1">[1]</a> to allow operation over IPv6.</p> 105 106 </div> 106 107 <div class="section" id="introduction"> … … 112 113 deploy BitTorrent over the IPv6 protocol, which does not suffer from 113 114 address exhaustion.</p> 114 <p>A number of extensions (mostly undocumented) to the BitTorrent protocol 115 have been defined in order to allow it to operate over IPv6. 116 Unfortunately, these extensions only allow locating IPv6 peers by using 117 trackers or through peer exchange -- but not from the DHT. This document 118 describes the procedures and message formats needed to deploy an IPv6 119 version of the BitTorrent DHT.</p> 120 <p>The extension described in this document also solves a long-standing 121 issue with the protocol defined in BEP-5. The presence of contact 122 information in the reply is no longer governed by the presence of 123 a "values" key; this avoids the well-known problem of contact 124 information being masked by peer information. While this is an 125 incompatible change, it is believed to be properly handled by all 126 deployed implementations.</p> 115 <p>A number of extensions (mostly undocumented) to the BitTorrent 116 protocol have been defined in order to allow it to operate over IPv6. 117 Unfortunately, these extensions only allow locating IPv6 peers by 118 using trackers or through peer exchange -- but not from the DHT. This 119 document describes the procedures and message formats used in the IPv6 120 DHT.</p> 127 121 </div> 128 122 <div class="section" id="operation"> 129 123 <h1>Operation</h1> 130 <p>There are two distinct DHTs: the existing IPv4 DHT, and the newIPv6 DHT.</p>124 <p>There are two distinct DHTs: the IPv4 DHT, and the IPv6 DHT.</p> 131 125 <p>The two DHTs are independent, meaning that no IPv6 data is stored in the 132 126 IPv4 DHT, and, conversely, no IPv4 data is stored in the IPv6 DHT. A node … … 137 131 slightly increases efficiency in the case where the two DHTs are 138 132 mostly congruent.</p> 139 <p> By default, messages only carry data in the address family implied by the140 network layer protocol. In the case of the "nodes" and "nodes6" arguments141 in replies to the find_nodes and get_peers requests, however, the requestor 142 may request that the reply contain "nodes", "nodes6" or both fields.</p>133 <p>Usually, messages only carry data in the address family implied by the 134 network layer protocol. In the case of the find_nodes and get_peers 135 requests, however, the requestor may optionally request that the reply 136 should contain IPv4 node information, IPv6 node information, or both.</p> 143 137 <div class="section" id="single-protocol-nodes"> 144 138 <h2>Single-protocol nodes</h2> … … 152 146 a dual-stack (IPv4 and IPv6) node can make bootstrap faster and 153 147 improve the reliability of the protocol by "leaking" data between the 154 two DHTs, as described in the following paragraphs.</p>148 two DHTs, as described in the following sections.</p> 155 149 <div class="section" id="bootstrapping"> 156 150 <h3>Bootstrapping</h3> 157 151 <p>A dual-stack node that is bootstrapping its DHT will send find_nodes 158 152 requests in order to populate its routing tables. In order to accelerate 159 this process, it should request both "nodes" and "nodes6" fields.</p>153 this process, it should request both IPv4 and IPv6 node information.</p> 160 154 </div> 161 155 <div class="section" id="steady-state-operation"> 162 156 <h3>Steady-state operation</h3> 163 <p>Once bootstrap is successful, a node should normally only request 164 "nodes" replies from IPv4 nodes, and "nodes6" replies from IPv6 nodes. 165 Requesting both address families in all requests is unlikely to 166 provide useful information, and hence uselessly increases network 167 traffic.</p>157 <p>Once bootstrap is successful, a node should normally only request IPv4 158 node information from IPv4 nodes, and IPv6 node information from IPv6 159 nodes. Requesting node information for both address families in all 160 requests is unlikely to provide useful information, and hence 161 increases network traffic with no benefit.</p> 168 162 <p>In order to increase the reliability of the DHT after a single-protocol 169 163 network outage, however, a node may <em>ocasionally</em> send a request for 170 "nodes" to an IPv6 node, or a request for "nodes6" to an IPv4 node.</p> 164 IPv4 node information to an IPv6 node, or a request for IPv6 node 165 information to an IPv4 node.</p> 171 166 </div> 172 167 </div> … … 206 201 Teredo addresses should be avoided whenever possible.</p> 207 202 <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 NAT203 multi-homing is not as common as in IPv6, and in the presence of NAT 209 204 the issues are somewhat more complicated, so this specification 210 205 refrains from making any recommendations about binding of IPv4 … … 217 212 <p>The PORT message, as defined in BEP-5, is extended to work over both 218 213 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> 214 applies to the address it was sent from; this implies that a PORT 215 message sent over IPv4 only advertises participation in the IPv4 DHT, 216 and a PORT message sent over IPv6 only advertises participation in the 217 IPv6 DHT.</p> 218 <p>Multihomed hosts should take care to only send PORT messages over 219 connections established from the address on which they participate in 220 the DHT.</p> 222 221 <blockquote> 223 222 <strong>Rationale</strong>: in the presence of the LTEP extension negotiation 224 223 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 for226 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>224 address families, it would in principle be possible to use the PORT 225 message for both address families. However, since an implementation 226 need not participate in both DHTs, nor use the same port in both 227 DHTs, this specification leaves the role of bridging the two DHTs to 228 the 'find_nodes' message (see below).</blockquote> 230 229 </div> 231 230 <div class="section" id="changes-and-extensions-to-existing-messages"> … … 238 237 strings, each of which contains compact format IPv4 contact 239 238 information for a single peer.</p> 240 <p>In a reply sent over IPv6, "values 'contains a list of strings, each239 <p>In a reply sent over IPv6, "values" contains a list of strings, each 241 240 of which contains compact format IPv6 contact information for a single 242 241 peer.</p> 243 242 <p>Implementations of this specification must be able to properly parse 244 243 hybrid "values" lists -- lists containing an arbitrary mixture of 245 6-octet IPv4 values and 18-octet IPv6 values. However, 246 implementations should not send such hybrid lists, and must not send 247 hybrid lists in a reply to an IPv4 request that doesn't contain 248 a "want" parameter.</p> 244 6-octet IPv4 values and 18-octet IPv6 values. However, implementations 245 should not send such hybrid lists, and must not send hybrid lists in 246 a reply to an IPv4 request that doesn't contain a "want" parameter.</p> 249 247 <blockquote> 250 248 <strong>Rationale</strong>: a request sent over IPv4 with no "want" parameter … … 257 255 <div class="section" id="nodes6"> 258 256 <h3>nodes6</h3> 259 <p>The "nodes6" parameter is analogous to the existing "nodes" parameter:260 whenpresent, it carries a string containing the compact IPv6 node261 info for the 8 closest good nodes in the sending node's IPv6 routing262 table. This parameter is allowed in replies to the find_nodes and 263 get_peers messages (see below).</p>257 <p>The "nodes6" parameter is analogous to the "nodes" parameter: when 258 present, it carries a string containing the compact IPv6 node 259 information for the 8 closest good nodes in the sending node's IPv6 260 routing table. This parameter is allowed in replies to the find_nodes 261 and get_peers messages (see below).</p> 264 262 </div> 265 263 <div class="section" id="want"> … … 281 279 sundry flags, which can simply be included in the top-level 282 280 dictionary of the message. Extending the "want" parameter without 283 good reason is discouraged.</blockquote>281 good reason is not recommended.</blockquote> 284 282 </div> 285 283 </div> … … 288 286 <div class="section" id="find-nodes-and-get-peers"> 289 287 <h3>find_nodes and get_peers</h3> 290 <p>A node sending a find_nodes or get_peers request should include291 a "want" parameter containing one or both of the characters "4" or 292 "6". A node replying to a find_nodes or get_peers request should 293 include a "nodes" parameter if and onlyif the request's "want"294 parameter included a "4", and should include a "nodes6" parameter if295 and only if the request's "want" parameter included a "6".</p>288 <p>A node sending a find_nodes or get_peers request may include a "want" 289 parameter containing one or both of the strings "n4" or "n6". A node 290 replying to a find_nodes or get_peers request that includes a "want" 291 parameter should include a "nodes" parameter if the request's "want" 292 parameter contained the string "n4", and should include a "nodes6" 293 parameter if the request's "want" parameter contained the string "n6".</p> 296 294 <p>In the absence of a "want" parameter, the reply should include "nodes" 297 295 if the request was sent over IPv4, and should include "nodes6" if the … … 301 299 defined in BEP-5, which specifies that "nodes" and "values" are 302 300 mutually exclusive. However, this change makes the DHT more 303 reliable, and has been deployed by most implementations for over304 a year with nonegative effects.</blockquote>305 <p>When a node receives a get_peers request and it has contact301 reliable, and has been deployed by most implementations with no 302 negative effects.</blockquote> 303 <p>When a node receives a get_peers request and it has peer contact 306 304 information for the matching address family and info-hash, it should 307 305 additionally include a "values" parameter containing a list of 6-octet … … 332 330 <div class="section" id="acknowledgements"> 333 331 <h1>Acknowledgements</h1> 334 <p>I gratefully acknowledge the influence of <em>The 8472</em> and <em>arvid</em> over335 this work.</p>332 <p>I gratefully acknowledge the help of <em>The 8472</em> and <em>arvid</em> in 333 developing this specification.</p> 336 334 </div> 337 335 <div class="section" id="references">
Note: See TracChangeset
for help on using the changeset viewer.